From owner-freebsd-smp Wed Sep 11 13:54:30 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA29532 for smp-outgoing; Wed, 11 Sep 1996 13:54:30 -0700 (PDT) Received: from clem.systemsix.com (clem.systemsix.com [198.99.86.131]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA29527 for ; Wed, 11 Sep 1996 13:54:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by clem.systemsix.com (8.6.12/8.6.12) with SMTP id OAA11976; Wed, 11 Sep 1996 14:54:05 -0600 Message-Id: <199609112054.OAA11976@clem.systemsix.com> X-Authentication-Warning: clem.systemsix.com: Host localhost didn't use HELO protocol X-Mailer: exmh version 1.6.5 12/11/95 From: Steve Passe To: rv@groa.uct.ac.za (Russell Vincent) cc: freebsd-smp@freebsd.org Subject: Re: Intel XXpress - some SMP benchmarks In-reply-to: Your message of "Sat, 10 Sep 1996 11:26:52 +0200." Mime-Version: 1.0 Content-Type: text/plain Date: Wed, 11 Sep 1996 14:54:05 -0600 Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I have submitted formal bug reports via send-pr for the following 4 issues: ------------------------------------------------------------------------------- Subject: SMP kernel fix 960909.1 --- It has the internal identification `kern/1591'. >Category: kern >Responsible: freebsd-bugs >Synopsis: i386/i386/mpcore.s stores _mpfps at incorrect address ------------------------------------------------------------------------------- Subject: SMP kernel fix 960909.2 --- It has the internal identification `kern/1592'. >Category: kern >Responsible: freebsd-bugs >Synopsis: kernel incorrectly reads CPU # from APIC ID register ------------------------------------------------------------------------------- Subject: SMP kernel fix 960909.3 --- It has the internal identification `kern/1593'. >Category: kern >Responsible: freebsd-bugs >Synopsis: i386/i386/locore.s contains useless line ------------------------------------------------------------------------------- Subject: SMP kernel fix 960909.4 --- It has the internal identification `kern/1594'. >Category: kern >Responsible: freebsd-bugs >Synopsis: apic_startup() needs work ------------------------------------------------------------------------------- =============================================================================== In addition to the kernel patches enumerated in send-pr reports `kern/1592' and `kern/1594' the following patches need to be done for the XXPRESS to run the SMP kernel. They are just band-aids and as such I didn't feel they should be submitted to send-pr. The correct solution will require some sort of 'physical' to 'virtual' mapping table for IDs. The basis of the problem is that the kernel expects the BSP to have ID #0 and the AP to have ID #1. The Intel XXPRESS numbers it's CPUs 0 (BSP), 2, 3 and 4. These band-aids merely shift 2,3,4 to 1,2,3. You also need to set the BIOS to use cache 'write-thru' as oppossed to cache 'write-back' to make the XXPRESS happy. ------------------------------------------------------------------------------- --- sys/i386/include/smp.h, line 25, change: from: return (apic_base[APIC_ID] >> 24); to: /* XPPRESS numbers CPUs 0, 2, 3, 4 */ unsigned int num = ((apic_base[APIC_ID] >> 24) & 0xf); return num ? num-1 : 0; --- sys/i386/include/smpasm.h: add: #define CPUNBR 0x02000000 add: /* XPPRESS numbers CPUs 0, 2, 3, 4 */ #define MODIFY_XXPRESS_ID(reg) \ andl $0x0f000000, reg; \ je 9f; \ shrl $24,reg; \ decl reg; \ shll $24,reg; \ 9: nop change "GETCPUID()" macro to: #define GETCPUID(reg) \ movl _apic_base, reg; \ movl APIC_ID(reg), reg; \ shrl $24, reg; \ andl $15, reg; \ je 9f; \ decl reg; \ 9: nop --- sys/i386/i386/locore.s: line 268, change: andl $0xff000000, %eax to: MODIFY_XXPRESS_ID(%eax) --- sys/i386/i386/swtch.s: line 452, change: andl $0xff000000, %eax to: MODIFY_XXPRESS_ID(%eax) --- sys/i386/i386/mplock.s: line 48, change: andl $0xff000000, %ecx to: MODIFY_XXPRESS_ID(%ecx) line 59, change: andl $0xff000000, %ecx to: MODIFY_XXPRESS_ID(%ecx) line 87, change: andl $0xff000000, %ecx to: MODIFY_XXPRESS_ID(%ecx) line 99, change: andl $0xff000000, %ecx to: MODIFY_XXPRESS_ID(%ecx) =============================================================================== The last issue in the XXPRESS port was the "less code" works better bug. Russel has since discovered that changing the cache option to "write-thru" fixes this so I will not bother to descibe those experiments. -- Steve Passe | powered by smp@csn.net | FreeBSD