diff options
author | Mark Johnston <markj@FreeBSD.org> | 2023-10-04 16:20:57 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2023-10-04 16:53:16 +0000 |
commit | f927afc1a6fe8257e28d79e8bb77305c2958724a (patch) | |
tree | 7dcd6bd006fa42af22e0d6ab7921f2ab3b10aba9 | |
parent | 4f2bd4027b3261d159f6d673dc9ee9e84b4a3538 (diff) | |
download | src-f927afc1a6fe8257e28d79e8bb77305c2958724a.tar.gz src-f927afc1a6fe8257e28d79e8bb77305c2958724a.zip |
bhyve: Move some more amd64-specific drivers to their own subdir
No functional change intended.
Reviewed by: corvink, jhb, emaste
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40551
-rw-r--r-- | usr.sbin/bhyve/Makefile | 6 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/Makefile.inc | 7 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/atkbdc.c (renamed from usr.sbin/bhyve/atkbdc.c) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/atkbdc.h (renamed from usr.sbin/bhyve/atkbdc.h) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/post.c (renamed from usr.sbin/bhyve/post.c) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/ps2kbd.c (renamed from usr.sbin/bhyve/ps2kbd.c) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/ps2kbd.h (renamed from usr.sbin/bhyve/ps2kbd.h) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/ps2mouse.c (renamed from usr.sbin/bhyve/ps2mouse.c) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/amd64/ps2mouse.h (renamed from usr.sbin/bhyve/ps2mouse.h) | 0 | ||||
-rw-r--r-- | usr.sbin/bhyve/bhyverun.c | 6 | ||||
-rw-r--r-- | usr.sbin/bhyve/snapshot.c | 15 |
11 files changed, 25 insertions, 9 deletions
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile index 794bfbe4c8a3..86039a8c45da 100644 --- a/usr.sbin/bhyve/Makefile +++ b/usr.sbin/bhyve/Makefile @@ -17,7 +17,6 @@ BHYVE_SYSDIR?=${SRCTOP} SRCS= \ acpi.c \ acpi_device.c \ - atkbdc.c \ audio.c \ basl.c \ bhyvegc.c \ @@ -63,9 +62,6 @@ SRCS= \ pci_xhci.c \ pctestdev.c \ pm.c \ - post.c \ - ps2kbd.c \ - ps2mouse.c \ qemu_fwcfg.c \ qemu_loader.c \ rfb.c \ @@ -138,6 +134,4 @@ NO_WTHREAD_SAFETY= NO_WCAST_ALIGN= -SUBDIR= kbdlayout - .include <bsd.prog.mk> diff --git a/usr.sbin/bhyve/amd64/Makefile.inc b/usr.sbin/bhyve/amd64/Makefile.inc index 62de5f211a23..c52219cb8dd1 100644 --- a/usr.sbin/bhyve/amd64/Makefile.inc +++ b/usr.sbin/bhyve/amd64/Makefile.inc @@ -1,6 +1,13 @@ SRCS+= \ + atkbdc.c \ fwctl.c \ + post.c \ + ps2kbd.c \ + ps2mouse.c \ task_switch.c + .PATH: ${BHYVE_SYSDIR}/sys/amd64/vmm SRCS+= vmm_instruction_emul.c + +SUBDIR+= kbdlayout diff --git a/usr.sbin/bhyve/atkbdc.c b/usr.sbin/bhyve/amd64/atkbdc.c index c5dea0d220cf..c5dea0d220cf 100644 --- a/usr.sbin/bhyve/atkbdc.c +++ b/usr.sbin/bhyve/amd64/atkbdc.c diff --git a/usr.sbin/bhyve/atkbdc.h b/usr.sbin/bhyve/amd64/atkbdc.h index 05d28d819120..05d28d819120 100644 --- a/usr.sbin/bhyve/atkbdc.h +++ b/usr.sbin/bhyve/amd64/atkbdc.h diff --git a/usr.sbin/bhyve/post.c b/usr.sbin/bhyve/amd64/post.c index 53ca34f418b5..53ca34f418b5 100644 --- a/usr.sbin/bhyve/post.c +++ b/usr.sbin/bhyve/amd64/post.c diff --git a/usr.sbin/bhyve/ps2kbd.c b/usr.sbin/bhyve/amd64/ps2kbd.c index 6fe36dbc4a55..6fe36dbc4a55 100644 --- a/usr.sbin/bhyve/ps2kbd.c +++ b/usr.sbin/bhyve/amd64/ps2kbd.c diff --git a/usr.sbin/bhyve/ps2kbd.h b/usr.sbin/bhyve/amd64/ps2kbd.h index a9e25c213826..a9e25c213826 100644 --- a/usr.sbin/bhyve/ps2kbd.h +++ b/usr.sbin/bhyve/amd64/ps2kbd.h diff --git a/usr.sbin/bhyve/ps2mouse.c b/usr.sbin/bhyve/amd64/ps2mouse.c index f0b4b7cabd91..f0b4b7cabd91 100644 --- a/usr.sbin/bhyve/ps2mouse.c +++ b/usr.sbin/bhyve/amd64/ps2mouse.c diff --git a/usr.sbin/bhyve/ps2mouse.h b/usr.sbin/bhyve/amd64/ps2mouse.h index a4fae96aa4e6..a4fae96aa4e6 100644 --- a/usr.sbin/bhyve/ps2mouse.h +++ b/usr.sbin/bhyve/amd64/ps2mouse.h diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 4e2d5467cfaf..707e21caf506 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -82,7 +82,9 @@ #include "bhyverun.h" #include "acpi.h" -#include "atkbdc.h" +#ifdef __amd64__ +#include "amd64/atkbdc.h" +#endif #include "bootrom.h" #include "config.h" #include "inout.h" @@ -1454,7 +1456,9 @@ main(int argc, char *argv[]) init_inout(); kernemu_dev_init(); init_bootrom(ctx); +#ifdef __amd64__ atkbdc_init(ctx); +#endif pci_irq_init(ctx); ioapic_init(ctx); diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 7d8959756757..593930c7f8a3 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -75,7 +75,9 @@ #include "bhyverun.h" #include "acpi.h" -#include "atkbdc.h" +#ifdef __amd64__ +#include "amd64/atkbdc.h" +#endif #include "debug.h" #include "inout.h" #include "ipc.h" @@ -892,7 +894,12 @@ vm_restore_devices(struct restore_state *rstate) return (ret); } - return (vm_restore_device(rstate, atkbdc_snapshot, "atkbdc", NULL)); +#ifdef __amd64__ + ret = vm_restore_device(rstate, atkbdc_snapshot, "atkbdc", NULL); +#else + ret = 0; +#endif + return (ret); } int @@ -1131,8 +1138,12 @@ vm_snapshot_devices(int data_fd, xo_handle_t *xop) goto snapshot_err; } +#ifdef __amd64__ ret = vm_snapshot_device(atkbdc_snapshot, "atkbdc", NULL, data_fd, xop, meta, &offset); +#else + ret = 0; +#endif xo_close_list_h(xop, JSON_DEV_ARR_KEY); |