diff options
author | Frans Kaashoek <[email protected]> | 2011-07-29 07:31:27 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-07-29 07:31:27 -0400 |
commit | 9aa0337dc1452a911ac52698c833246a618fc9f3 (patch) | |
tree | 28e25817d4f7c9f7f1e6988949012f46d6c28fb7 /mp.c | |
parent | dccb915282854476ce47752df6631dcce3b8f661 (diff) | |
download | xv6-labs-9aa0337dc1452a911ac52698c833246a618fc9f3.tar.gz xv6-labs-9aa0337dc1452a911ac52698c833246a618fc9f3.tar.bz2 xv6-labs-9aa0337dc1452a911ac52698c833246a618fc9f3.zip |
Map kernel high
Very important to give qemu memory through PHYSTOP :(
Diffstat (limited to 'mp.c')
-rw-r--r-- | mp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,6 +5,7 @@ #include "types.h" #include "defs.h" #include "param.h" +#include "memlayout.h" #include "mp.h" #include "x86.h" #include "mmu.h" @@ -39,6 +40,7 @@ mpsearch1(uchar *addr, int len) { uchar *e, *p; + addr = p2v((uint) addr); e = addr+len; for(p = addr; p < e; p += sizeof(struct mp)) if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0) @@ -83,7 +85,7 @@ mpconfig(struct mp **pmp) if((mp = mpsearch()) == 0 || mp->physaddr == 0) return 0; - conf = (struct mpconf*)mp->physaddr; + conf = (struct mpconf*) p2v((uint) mp->physaddr); if(memcmp(conf, "PCMP", 4) != 0) return 0; if(conf->version != 1 && conf->version != 4) |