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>
This commit is contained in:
Luoqi Chen 2000-04-20 14:40:11 +00:00
parent 0111d08629
commit c71d557034
2 changed files with 10 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}