diff options
author | luoqi <luoqi@FreeBSD.org> | 2000-04-20 14:40:11 +0000 |
---|---|---|
committer | luoqi <luoqi@FreeBSD.org> | 2000-04-20 14:40:11 +0000 |
commit | 55f56d1501cf88edb060370ea3d05225de9a96ae (patch) | |
tree | f73b2b7311a15ea9c07ffcd1efa7ea0f72701cba /sys/i386 | |
parent | a23484c4eacb20446ba2ed07cb3602a49d0e1db9 (diff) | |
download | FreeBSD-src-55f56d1501cf88edb060370ea3d05225de9a96ae.zip FreeBSD-src-55f56d1501cf88edb060370ea3d05225de9a96ae.tar.gz |
IO apics are not necessarily page aligned, they are only required to be aligned
on 1K boundary. Correct a typo that would cause problem to a second IO apic.
Pointed out by: Steve Passe <smp.csn.net>
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/pmap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 6f87229..a0ef61a 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -426,9 +426,10 @@ pmap_bootstrap(firstaddr, loadaddr) for (j = 0; j < mp_napics; j++) { /* same page frame as a previous IO apic? */ if (((vm_offset_t)SMPpt[NPTEPG-2-j] & PG_FRAME) == - (io_apic_address[0] & PG_FRAME)) { + (io_apic_address[i] & PG_FRAME)) { ioapic[i] = (ioapic_t *)((u_int)SMP_prvspace - + (NPTEPG-2-j)*PAGE_SIZE); + + (NPTEPG-2-j) * PAGE_SIZE + + (io_apic_address[i] & PAGE_MASK)); break; } /* use this slot if available */ @@ -436,7 +437,8 @@ pmap_bootstrap(firstaddr, loadaddr) SMPpt[NPTEPG-2-j] = (pt_entry_t)(PG_V | PG_RW | pgeflag | (io_apic_address[i] & PG_FRAME)); ioapic[i] = (ioapic_t *)((u_int)SMP_prvspace - + (NPTEPG-2-j)*PAGE_SIZE); + + (NPTEPG-2-j) * PAGE_SIZE + + (io_apic_address[i] & PAGE_MASK)); break; } } |