Date: Wed, 19 Apr 2000 20:23:04 -0400 (EDT) From: Luoqi Chen <luoqi@watermarkgroup.com> To: mihara@prd.fc.nec.co.jp, smp@csn.net Cc: freebsd-smp@FreeBSD.ORG Subject: Re: Multiple APIC support (RE: Issues with Spankin' new Poweredge 4400 w/ dual 866's and 133MHz FSB?) Message-ID: <200004200023.UAA24083@lor.watermarkgroup.com>
index | next in thread | raw e-mail
> We need to get one of the VM guys to look at the code in
> pmap.c:pmap_bootstrap()
> around line 422. I think this code assumes that IO apics are aligned to
> a PAGE_SIZE boundary which isn't true for your second IO apic @ 0xfff7ec00.
>
> --
> Steve Passe | powered by
> smp@csn.net | Symmetric MultiProcessor FreeBSD
>
You're right, the code in pmap.c assumes page alignment for IO apics but
according to MPspec they are only required to be aligned to 1K boundary.
There is also a typo that would cause problems if you have more than one
io apics that are on different pages. The following patch should fix these
problems.
-lq
Index: pmap.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/pmap.c,v
retrieving revision 1.252
diff -u -r1.252 pmap.c
--- pmap.c 2000/03/16 08:51:49 1.252
+++ pmap.c 2000/04/20 00:10:19
@@ -426,9 +426,10 @@
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 @@
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;
}
}
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004200023.UAA24083>
