Quote:
kernel gets VM=PM
user gets VM=PM+4K (say to allow for some kernel space)
What does VM=PM+4K mean? My kernel doesn't have it's own address space. Calling kernel functions is only a matter of jumping from user to kernel(which is in the PM mappings).
Well my purpose for mapping PM to VM is to ease the complexity of the overall system. Here's a sample memory map of my proccess virtual space.
+------------------------+
;------------------------;
;-----USER CODE------;
;-----AND DATA ------;
;------------------------;
;........................; <--128TiB (start of code and data)
; - - - - - - - - - - - - - ;
;-USERMODE SHARED-;
;- LIBRARY/MODULE -;
; - - - - - - - - - - - - - ;
;........................;<--124TiB (start of shared usermode libs)
;~~~~~~~~~~~~~~~~~;
;------------------------;<--MAX_PM (end of PM mapping)
; / / / / / / / / / / /;
; / / / / / / / / / / /;<--16MiB(kernel base)
; / / / / / / / / / / /;
+------------------------+<<--PM is mapped at the bottom of all the process address space)
So, there would be some parts of memory between 0 to
MAX_PM that would be aliased to 124TiB above..
Also, I am using 1GiB pages in mapping the PM, would there be any changes in how cpu cache 1GB pages from 4KB or 2MB pages?