summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/apic.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-08-25 14:06:42 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-08-25 14:06:42 +0200
commit19219d5a9552171887f4d7e314b25bae2d3fc2f8 (patch)
tree5afa23cc863cfffb528a3ec78c7a5acbe403344a /sys/src/9/pc/apic.c
parent69f5a04ac39f63f0b16df41cc268b3227b5cac99 (diff)
archmp: checksum _MP_ structure before use, coherence() and comments (import from sources)
we used to only test the checksum of the PCMP structure referenced by the _MP_ without checking _MP_ itself. now fixed. geoff added some coherence() calls and comments in the mpstartup and apic code which seems to be a good idea.
Diffstat (limited to 'sys/src/9/pc/apic.c')
-rw-r--r--sys/src/9/pc/apic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/src/9/pc/apic.c b/sys/src/9/pc/apic.c
index 0788e5adf..eada39531 100644
--- a/sys/src/9/pc/apic.c
+++ b/sys/src/9/pc/apic.c
@@ -242,6 +242,7 @@ lapicstartap(Apic* apic, int v)
int i;
ulong crhi;
+ /* make apic's processor do a warm reset */
crhi = apic->apicno<<24;
lapicw(LapicICRHI, crhi);
lapicw(LapicICRLO, LapicFIELD|ApicLEVEL|LapicASSERT|ApicINIT);
@@ -249,8 +250,10 @@ lapicstartap(Apic* apic, int v)
lapicw(LapicICRLO, LapicFIELD|ApicLEVEL|LapicDEASSERT|ApicINIT);
delay(10);
+ /* assumes apic is not an 82489dx */
for(i = 0; i < 2; i++){
lapicw(LapicICRHI, crhi);
+ /* make apic's processor start at v in real mode */
lapicw(LapicICRLO, LapicFIELD|ApicEDGE|ApicSTARTUP|(v/BY2PG));
microdelay(200);
}