Comments.
[pintos-anon] / src / threads / mmu.h
index 2af85bc335848d445c7b283c01983374b10e7c15..4d4aa6ac3ced70add98f368abdf0ce6a6c26e1b3 100644 (file)
@@ -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