]> Devi Nivas Git - cs3210-lab1.git/commitdiff
One more low address
authorFrans Kaashoek <kaashoek@225.sub-75-213-134.myvzw.com>
Wed, 10 Aug 2011 03:22:48 +0000 (23:22 -0400)
committerFrans Kaashoek <kaashoek@225.sub-75-213-134.myvzw.com>
Wed, 10 Aug 2011 03:22:48 +0000 (23:22 -0400)
lapic.c

diff --git a/lapic.c b/lapic.c
index e232abc21859ca878b254d352b5845095a52e28c..5a758be71d5e366c7ae8cc9deadf6cccbdfffba0 100644 (file)
--- a/lapic.c
+++ b/lapic.c
@@ -3,6 +3,7 @@
 
 #include "types.h"
 #include "defs.h"
+#include "memlayout.h"
 #include "traps.h"
 #include "mmu.h"
 #include "x86.h"
@@ -135,6 +136,7 @@ microdelay(int us)
 // Start additional processor running bootstrap code at addr.
 // See Appendix B of MultiProcessor Specification.
 void
+
 lapicstartap(uchar apicid, uint addr)
 {
   int i;
@@ -145,7 +147,7 @@ lapicstartap(uchar apicid, uint addr)
   // the AP startup code prior to the [universal startup algorithm]."
   outb(IO_RTC, 0xF);  // offset 0xF is shutdown code
   outb(IO_RTC+1, 0x0A);
-  wrv = (ushort*)(0x40<<4 | 0x67);  // Warm reset vector
+  wrv = (ushort*)P2V((0x40<<4 | 0x67));  // Warm reset vector
   wrv[0] = 0;
   wrv[1] = addr >> 4;