summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64/dat.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-06 22:41:42 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-06 22:41:42 +0100
commitbfbc5ab1970bbf9307e03a42e69b0d55eb92f2ef (patch)
tree8f71f8efd7cb541cbc26c0c4914b3de999d59c3d /sys/src/9/pc64/dat.h
parentf029ea1694b4f0f8ec0cc848b936b0122bd17347 (diff)
pc64: fix kmap()
kmapindex has to be per process, not per mach, as the process can be switched to another processor while the mapping is established. to bootstrap the first process, we have to temporarily set up so the kmap MMU's can be attached to the process. previously we assumed that the first two pages for the initial process where below 2GB and could be accessed with KADDR() directly. with 16GB machine, all the 2GB above KZERO are dedicated to the kernel so the user pages returned by newpage() need to be mapped.
Diffstat (limited to 'sys/src/9/pc64/dat.h')
-rw-r--r--sys/src/9/pc64/dat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/pc64/dat.h b/sys/src/9/pc64/dat.h
index ca0f745c9..0882634c8 100644
--- a/sys/src/9/pc64/dat.h
+++ b/sys/src/9/pc64/dat.h
@@ -142,6 +142,7 @@ struct PMMU
MMU* kmaphead;
MMU* kmaptail;
int kmapcount;
+ int kmapindex;
int mmucount;
};
@@ -182,7 +183,6 @@ struct Mach
u64int mmumap[4]; /* bitmap of pml4 entries for zapping */
MMU* mmufree; /* freelist for MMU structures */
int mmucount; /* number of MMU structures in freelist */
- int kmapindex; /* next KMAP page index for use */
ulong ticks; /* of the clock since boot time */
Label sched; /* scheduler wakeup */