From 9aa0337dc1452a911ac52698c833246a618fc9f3 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Fri, 29 Jul 2011 07:31:27 -0400 Subject: Map kernel high Very important to give qemu memory through PHYSTOP :( --- mp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mp.c') diff --git a/mp.c b/mp.c index 5ab348e..b1e2813 100644 --- a/mp.c +++ b/mp.c @@ -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) -- cgit v1.2.3