diff options
author | jhb <jhb@FreeBSD.org> | 2013-12-24 19:10:56 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2013-12-24 19:10:56 +0000 |
commit | bf62f8539bc3dfcf812136b77722d3be351331bb (patch) | |
tree | f7eda763fda15b7ff2fb37d31dddc1519ca2884a /usr.sbin/bhyve | |
parent | 4620ae454b718b9bf42934f2b3ffd9723cd6f3b4 (diff) | |
download | FreeBSD-src-bf62f8539bc3dfcf812136b77722d3be351331bb.zip FreeBSD-src-bf62f8539bc3dfcf812136b77722d3be351331bb.tar.gz |
MFC 259013:
Fix the processor table entry structure to use a fixed-width type for
32-bit fields so it is the correct size on amd64. Remove a workaround
for the broken structure from bhyve(8).
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r-- | usr.sbin/bhyve/mptbl.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/usr.sbin/bhyve/mptbl.c b/usr.sbin/bhyve/mptbl.c index 794ccc7..c311cba 100644 --- a/usr.sbin/bhyve/mptbl.c +++ b/usr.sbin/bhyve/mptbl.c @@ -74,19 +74,6 @@ __FBSDID("$FreeBSD$"); /* Number of i/o intr entries */ #define MPEII_MAX_IRQ 16 -/* Define processor entry struct since <x86/mptable.h> gets it wrong */ -typedef struct BPROCENTRY { - u_char type; - u_char apic_id; - u_char apic_version; - u_char cpu_flags; - uint32_t cpu_signature; - uint32_t feature_flags; - uint32_t reserved1; - uint32_t reserved2; -} *bproc_entry_ptr; -CTASSERT(sizeof(struct BPROCENTRY) == 20); - /* Bus entry defines */ #define MPE_NUM_BUSES 2 #define MPE_BUSNAME_LEN 6 @@ -134,7 +121,7 @@ mpt_build_mpch(mpcth_t mpch) } static void -mpt_build_proc_entries(bproc_entry_ptr mpep, int ncpu) +mpt_build_proc_entries(proc_entry_ptr mpep, int ncpu) { int i; @@ -247,7 +234,7 @@ mptable_build(struct vmctx *ctx, int ncpu) mpcth_t mpch; bus_entry_ptr mpeb; io_apic_entry_ptr mpei; - bproc_entry_ptr mpep; + proc_entry_ptr mpep; mpfps_t mpfp; int_entry_ptr mpie; char *curraddr; @@ -268,7 +255,7 @@ mptable_build(struct vmctx *ctx, int ncpu) mpt_build_mpch(mpch); curraddr += sizeof(*mpch); - mpep = (bproc_entry_ptr)curraddr; + mpep = (proc_entry_ptr)curraddr; mpt_build_proc_entries(mpep, ncpu); curraddr += sizeof(*mpep) * ncpu; mpch->entry_count += ncpu; |