diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-14 16:43:52 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-14 16:43:52 +0200 |
commit | 0c33f0461f466754b47797f6f860c70520a8ccbb (patch) | |
tree | b2efed97dc192349bc1c099cec4a48d20c31bbbf /i386 | |
parent | 5de6c7117d078528e506c7a7030ad6d6005111bd (diff) | |
download | gnumach-0c33f0461f466754b47797f6f860c70520a8ccbb.tar.gz gnumach-0c33f0461f466754b47797f6f860c70520a8ccbb.tar.bz2 gnumach-0c33f0461f466754b47797f6f860c70520a8ccbb.zip |
pmap: Add MAPWINDOW_SIZE macro
Diffstat (limited to 'i386')
-rw-r--r-- | i386/intel/pmap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index cba7890e..d15e2418 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -429,6 +429,7 @@ pt_entry_t *kernel_page_dir; * physical-to-physical transfers. */ static pmap_mapwindow_t mapwindows[PMAP_NMAPWINDOWS * NCPUS]; +#define MAPWINDOW_SIZE (PMAP_NMAPWINDOWS * NCPUS * PAGE_SIZE) #ifdef __x86_64__ static inline pt_entry_t * @@ -857,9 +858,9 @@ void pmap_bootstrap(void) } for (; pte < ptable+NPTES; pte++) { - if (va >= kernel_virtual_end - PMAP_NMAPWINDOWS * NCPUS * PAGE_SIZE && va < kernel_virtual_end) + if (va >= kernel_virtual_end - MAPWINDOW_SIZE && va < kernel_virtual_end) { - pmap_mapwindow_t *win = &mapwindows[atop(va - (kernel_virtual_end - PMAP_NMAPWINDOWS * NCPUS * PAGE_SIZE))]; + pmap_mapwindow_t *win = &mapwindows[atop(va - (kernel_virtual_end - MAPWINDOW_SIZE))]; win->entry = pte; win->vaddr = va; } @@ -1054,7 +1055,7 @@ void pmap_virtual_space( vm_offset_t *endp) { *startp = kernel_virtual_start; - *endp = kernel_virtual_end - PMAP_NMAPWINDOWS * NCPUS * PAGE_SIZE; + *endp = kernel_virtual_end - MAPWINDOW_SIZE; } /* |