The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a7f6c2ff732db1d0032066109ee0dd5af1a39b81

commit a7f6c2ff732db1d0032066109ee0dd5af1a39b81
Author:     Mark Johnston <[email protected]>
AuthorDate: 2023-10-04 16:23:36 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2023-10-04 16:53:16 +0000

    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
---
 usr.sbin/bhyve/Makefile           | 1 -
 usr.sbin/bhyve/amd64/Makefile.inc | 1 +
 usr.sbin/bhyve/{ => amd64}/rtc.c  | 0
 usr.sbin/bhyve/{ => amd64}/rtc.h  | 0
 usr.sbin/bhyve/bhyverun.c         | 8 +++++++-
 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
similarity index 100%
rename from usr.sbin/bhyve/rtc.c
rename to usr.sbin/bhyve/amd64/rtc.c
diff --git a/usr.sbin/bhyve/rtc.h b/usr.sbin/bhyve/amd64/rtc.h
similarity index 100%
rename from usr.sbin/bhyve/rtc.h
rename to 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) {

Reply via email to