diff options
author | Frans Kaashoek <[email protected]> | 2011-08-08 13:30:08 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-08-08 13:30:08 -0400 |
commit | a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2 (patch) | |
tree | 9d049eae2080a7c330fb7ac3ec9ff6e557a310e4 /memlayout.h | |
parent | 11b7438b1046eecca6135b52ddbe686008099fa5 (diff) | |
download | xv6-labs-a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2.tar.gz xv6-labs-a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2.tar.bz2 xv6-labs-a56c8d609b24e4c1c3a8a5bacdced6ae53376ee2.zip |
One definition of several macros and constants
Diffstat (limited to 'memlayout.h')
-rw-r--r-- | memlayout.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/memlayout.h b/memlayout.h index 3958062..6c44db2 100644 --- a/memlayout.h +++ b/memlayout.h @@ -9,7 +9,7 @@ #define IOSPACEE 0x100000 // end IO space #define PHYSTOP 0xE000000 // use phys mem up to here as free pool -// Key addresses for address space layout (see kmap in vm.c for the actual layout) +// Key addresses for address space layout (see kmap in vm.c for the layout) #define KERNBASE 0xF0000000 // First kernel virtual address #define USERTOP (KERNBASE-PGSIZE) // Highest user virtual address #define KERNLINK 0xF0100000 // Address where kernel is linked @@ -24,3 +24,5 @@ static inline void *p2v(uint a) { return (void *) a + KERNBASE; } #define V2P(a) ((uint) a - KERNBASE) #define P2V(a) ((void *) a + KERNBASE) +#define V2P_WO(x) ((x) - KERNBASE) // same as V2P, but without casts +#define P2V_WO(x) ((x) + KERNBASE) // same as V2P, but without casts |