diff options
author | neel <neel@FreeBSD.org> | 2013-11-25 23:31:00 +0000 |
---|---|---|
committer | neel <neel@FreeBSD.org> | 2013-11-25 23:31:00 +0000 |
commit | 944ff9ea5b14d61330fa6fc31c7874de47fbd5c0 (patch) | |
tree | a9a2cac7b8e5f11f40288b61a454af6867def6b9 /usr.sbin | |
parent | ffed78fe948f3203bab38c3418b8f513bb61f4e7 (diff) | |
download | FreeBSD-src-944ff9ea5b14d61330fa6fc31c7874de47fbd5c0.zip FreeBSD-src-944ff9ea5b14d61330fa6fc31c7874de47fbd5c0.tar.gz |
Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
actual value read by the guest from the device. The IOAPIC ID is now set to
zero in both MPtable/ACPI tables as well as in the ioapic device emulation.
Pointed out by: grehan@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bhyve/acpi.c | 2 | ||||
-rw-r--r-- | usr.sbin/bhyve/mptbl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c index 2c0cd2d..8ab048b 100644 --- a/usr.sbin/bhyve/acpi.c +++ b/usr.sbin/bhyve/acpi.c @@ -263,7 +263,7 @@ basl_fwrite_madt(FILE *fp) EFPRINTF(fp, "[0001]\t\tSubtable Type : 01\n"); EFPRINTF(fp, "[0001]\t\tLength : 0C\n"); /* iasl expects a hex value for the i/o apic id */ - EFPRINTF(fp, "[0001]\t\tI/O Apic ID : %02x\n", basl_ncpu); + EFPRINTF(fp, "[0001]\t\tI/O Apic ID : %02x\n", 0); EFPRINTF(fp, "[0001]\t\tReserved : 00\n"); EFPRINTF(fp, "[0004]\t\tAddress : fec00000\n"); EFPRINTF(fp, "[0004]\t\tInterrupt : 00000000\n"); diff --git a/usr.sbin/bhyve/mptbl.c b/usr.sbin/bhyve/mptbl.c index dd1271e..794ccc7 100644 --- a/usr.sbin/bhyve/mptbl.c +++ b/usr.sbin/bhyve/mptbl.c @@ -279,12 +279,12 @@ mptable_build(struct vmctx *ctx, int ncpu) mpch->entry_count += MPE_NUM_BUSES; mpei = (io_apic_entry_ptr)curraddr; - mpt_build_ioapic_entries(mpei, ncpu + 1); + mpt_build_ioapic_entries(mpei, 0); curraddr += sizeof(*mpei); mpch->entry_count++; mpie = (int_entry_ptr) curraddr; - mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, ncpu + 1); + mpt_build_ioint_entries(mpie, MPEII_MAX_IRQ, 0); curraddr += sizeof(*mpie) * MPEII_MAX_IRQ; mpch->entry_count += MPEII_MAX_IRQ; |