aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2023-10-04 16:23:36 +0000
committerMark Johnston <markj@FreeBSD.org>2023-10-04 16:53:16 +0000
commita7f6c2ff732db1d0032066109ee0dd5af1a39b81 (patch)
tree7c2e26028419c57e4ac0aa64188da8002eefc20f
parent548b11228f7a83785dcf6c4c8b0bbfed0284d794 (diff)
downloadsrc-a7f6c2ff732db1d0032066109ee0dd5af1a39b81.tar.gz
src-a7f6c2ff732db1d0032066109ee0dd5af1a39b81.zip
bhyve: Move the RTC driver to amd64/
No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D40734
-rw-r--r--usr.sbin/bhyve/Makefile1
-rw-r--r--usr.sbin/bhyve/amd64/Makefile.inc1
-rw-r--r--usr.sbin/bhyve/amd64/rtc.c (renamed from usr.sbin/bhyve/rtc.c)0
-rw-r--r--usr.sbin/bhyve/amd64/rtc.h (renamed from usr.sbin/bhyve/rtc.h)0
-rw-r--r--usr.sbin/bhyve/bhyverun.c8
5 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index 30ecf56ae748..ef78b149c68c 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -62,7 +62,6 @@ SRCS= \
qemu_fwcfg.c \
qemu_loader.c \
rfb.c \
- rtc.c \
smbiostbl.c \
sockstream.c \
spinup_ap.c \
diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc
index d655708210ce..a18b98a157ec 100644
--- a/usr.sbin/bhyve/amd64/Makefile.inc
+++ b/usr.sbin/bhyve/amd64/Makefile.inc
@@ -7,6 +7,7 @@ SRCS+= \
post.c \
ps2kbd.c \
ps2mouse.c \
+ rtc.c \
task_switch.c \
xmsr.c
diff --git a/usr.sbin/bhyve/rtc.c b/usr.sbin/bhyve/amd64/rtc.c
index ef1bdcaf7a2c..ef1bdcaf7a2c 100644
--- a/usr.sbin/bhyve/rtc.c
+++ b/usr.sbin/bhyve/amd64/rtc.c
diff --git a/usr.sbin/bhyve/rtc.h b/usr.sbin/bhyve/amd64/rtc.h
index 44f776741fb7..44f776741fb7 100644
--- a/usr.sbin/bhyve/rtc.h
+++ b/usr.sbin/bhyve/amd64/rtc.h
diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c
index 727a47892e41..7716ea119dd6 100644
--- a/usr.sbin/bhyve/bhyverun.c
+++ b/usr.sbin/bhyve/bhyverun.c
@@ -103,7 +103,9 @@
#include "snapshot.h"
#endif
#include "tpm_device.h"
-#include "rtc.h"
+#ifdef __amd64__
+#include "amd64/rtc.h"
+#endif
#include "vmgenc.h"
#include "vmexit.h"
#ifdef __amd64__
@@ -903,9 +905,11 @@ main(int argc, char *argv[])
case 'e':
set_config_bool("x86.strictio", true);
break;
+#ifdef __amd64__
case 'u':
set_config_bool("rtc.use_localtime", false);
break;
+#endif
case 'U':
set_config_value("uuid", optarg);
break;
@@ -1037,7 +1041,9 @@ main(int argc, char *argv[])
pci_irq_init(ctx);
ioapic_init(ctx);
+#ifdef __amd64__
rtc_init(ctx);
+#endif
sci_init(ctx);
if (qemu_fwcfg_init(ctx) != 0) {