X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fmmu.h;h=4d4aa6ac3ced70add98f368abdf0ce6a6c26e1b3;hb=2e6303a4b957eb770b0cab4172bd43a7c01c927d;hp=2af85bc335848d445c7b283c01983374b10e7c15;hpb=c1a96388f54148fd23bdc2a5aa8fc31f8e95fbcc;p=pintos-anon diff --git a/src/threads/mmu.h b/src/threads/mmu.h index 2af85bc..4d4aa6a 100644 --- a/src/threads/mmu.h +++ b/src/threads/mmu.h @@ -93,6 +93,16 @@ static inline void *pg_round_down (const void *va) { return (void *) ((uintptr_t) va & ~PGMASK); } +/* Base address of the 1:1 physical-to-virtual mapping. Physical + memory is mapped starting at this virtual address. Thus, + physical address 0 is accessible at PHYS_BASE, physical + address address 0x1234 at (uint8_t *) PHYS_BASE + 0x1234, and + so on. + + This address also marks the end of user programs' address + space. Up to this point in memory, user programs are allowed + to map whatever they like. At this point and above, the + virtual address space belongs to the kernel. */ #define PHYS_BASE ((void *) LOADER_PHYS_BASE) /* Returns kernel virtual address at which physical address PADDR