Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/include/vmparam.h
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
#define SGROWSIZ (128UL*1024) /* amount to grow stack */ | #define SGROWSIZ (128UL*1024) /* amount to grow stack */ | ||||
#endif | #endif | ||||
/* | /* | ||||
* We provide a machine specific single page allocator through the use | * We provide a machine specific single page allocator through the use | ||||
* of the direct mapped segment. This uses 2MB pages for reduced | * of the direct mapped segment. This uses 2MB pages for reduced | ||||
* TLB pressure. | * TLB pressure. | ||||
*/ | */ | ||||
#ifndef KASAN | #if !defined(KASAN) && !defined(KMSAN) | ||||
#define UMA_MD_SMALL_ALLOC | #define UMA_MD_SMALL_ALLOC | ||||
#endif | #endif | ||||
/* | /* | ||||
* The physical address space is densely populated. | * The physical address space is densely populated. | ||||
*/ | */ | ||||
#define VM_PHYSSEG_DENSE | #define VM_PHYSSEG_DENSE | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | |||||
* page table indexes from pmap.h for precision. | * page table indexes from pmap.h for precision. | ||||
* | * | ||||
* 0x0000000000000000 - 0x00007fffffffffff user map | * 0x0000000000000000 - 0x00007fffffffffff user map | ||||
* 0x0000800000000000 - 0xffff7fffffffffff does not exist (hole) | * 0x0000800000000000 - 0xffff7fffffffffff does not exist (hole) | ||||
* 0xffff800000000000 - 0xffff804020100fff recursive page table (512GB slot) | * 0xffff800000000000 - 0xffff804020100fff recursive page table (512GB slot) | ||||
* 0xffff804020100fff - 0xffff807fffffffff unused | * 0xffff804020100fff - 0xffff807fffffffff unused | ||||
* 0xffff808000000000 - 0xffff847fffffffff large map (can be tuned up) | * 0xffff808000000000 - 0xffff847fffffffff large map (can be tuned up) | ||||
* 0xffff848000000000 - 0xfffff77fffffffff unused (large map extends there) | * 0xffff848000000000 - 0xfffff77fffffffff unused (large map extends there) | ||||
* 0xfffff78000000000 - 0xfffff7ffffffffff 512GB KASAN shadow map | * 0xfffff60000000000 - 0xfffff7ffffffffff 2TB KMSAN origin map, optional | ||||
* 0xfffff78000000000 - 0xfffff7bfffffffff 512GB KASAN shadow map, optional | |||||
alc: Can you double check the end address here? I'm not clear on why it changed. | |||||
Done Inline ActionsI think it was a typo. markj: I think it was a typo. | |||||
* 0xfffff80000000000 - 0xfffffbffffffffff 4TB direct map | * 0xfffff80000000000 - 0xfffffbffffffffff 4TB direct map | ||||
* 0xfffffc0000000000 - 0xfffffdffffffffff unused | * 0xfffffc0000000000 - 0xfffffdffffffffff 2TB KMSAN shadow map, optional | ||||
* 0xfffffe0000000000 - 0xffffffffffffffff 2TB kernel map | * 0xfffffe0000000000 - 0xffffffffffffffff 2TB kernel map | ||||
Not Done Inline ActionsAre we out of static KVA allocation? (4TB direct map is already somewhat limiting I believe, it is not impossible to build a machine with >4TB or RAM) kib: Are we out of static KVA allocation?
(4TB direct map is already somewhat limiting I believe… | |||||
Done Inline ActionsIt seems so. We could perhaps start growing the direct map up to 6TB automatically. In this case KMSAN would have to be disabled at boot time. I'll add a static assertion to catch the case where someone tries to simultaneously configure KMSAN and increase NDMPML4E at compile time. In the longer term I think we'd want to swap the direct map and large map in order to support machines with large RAM. Or wait until LA57 is more widely implemented in hw. markj: It seems so. We could perhaps start growing the direct map up to 6TB automatically. In this… | |||||
* | * | ||||
* Within the kernel map: | * Within the kernel map: | ||||
* | * | ||||
* 0xfffffe0000000000 vm_page_array | * 0xfffffe0000000000 vm_page_array | ||||
* 0xffffffff80000000 KERNBASE | * 0xffffffff80000000 KERNBASE | ||||
*/ | */ | ||||
#define VM_MIN_KERNEL_ADDRESS KV4ADDR(KPML4BASE, 0, 0, 0) | #define VM_MIN_KERNEL_ADDRESS KV4ADDR(KPML4BASE, 0, 0, 0) | ||||
#define VM_MAX_KERNEL_ADDRESS KV4ADDR(KPML4BASE + NKPML4E - 1, \ | #define VM_MAX_KERNEL_ADDRESS KV4ADDR(KPML4BASE + NKPML4E - 1, \ | ||||
NPDPEPG-1, NPDEPG-1, NPTEPG-1) | NPDPEPG-1, NPDEPG-1, NPTEPG-1) | ||||
#define DMAP_MIN_ADDRESS KV4ADDR(DMPML4I, 0, 0, 0) | #define DMAP_MIN_ADDRESS KV4ADDR(DMPML4I, 0, 0, 0) | ||||
#define DMAP_MAX_ADDRESS KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0) | #define DMAP_MAX_ADDRESS KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0) | ||||
#define KASAN_MIN_ADDRESS KV4ADDR(KASANPML4I, 0, 0, 0) | #define KASAN_MIN_ADDRESS KV4ADDR(KASANPML4I, 0, 0, 0) | ||||
#define KASAN_MAX_ADDRESS KV4ADDR(KASANPML4I + NKASANPML4E, 0, 0, 0) | #define KASAN_MAX_ADDRESS KV4ADDR(KASANPML4I + NKASANPML4E, 0, 0, 0) | ||||
#define KMSAN_SHAD_MIN_ADDRESS KV4ADDR(KMSANSHADPML4I, 0, 0, 0) | |||||
#define KMSAN_SHAD_MAX_ADDRESS KV4ADDR(KMSANSHADPML4I + NKMSANSHADPML4E, \ | |||||
0, 0, 0) | |||||
#define KMSAN_ORIG_MIN_ADDRESS KV4ADDR(KMSANORIGPML4I, 0, 0, 0) | |||||
#define KMSAN_ORIG_MAX_ADDRESS KV4ADDR(KMSANORIGPML4I + NKMSANORIGPML4E, \ | |||||
0, 0, 0) | |||||
#define LARGEMAP_MIN_ADDRESS KV4ADDR(LMSPML4I, 0, 0, 0) | #define LARGEMAP_MIN_ADDRESS KV4ADDR(LMSPML4I, 0, 0, 0) | ||||
#define LARGEMAP_MAX_ADDRESS KV4ADDR(LMEPML4I + 1, 0, 0, 0) | #define LARGEMAP_MAX_ADDRESS KV4ADDR(LMEPML4I + 1, 0, 0, 0) | ||||
#define KERNBASE KV4ADDR(KPML4I, KPDPI, 0, 0) | #define KERNBASE KV4ADDR(KPML4I, KPDPI, 0, 0) | ||||
#define UPT_MAX_ADDRESS KV4ADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I) | #define UPT_MAX_ADDRESS KV4ADDR(PML4PML4I, PML4PML4I, PML4PML4I, PML4PML4I) | ||||
#define UPT_MIN_ADDRESS KV4ADDR(PML4PML4I, 0, 0, 0) | #define UPT_MIN_ADDRESS KV4ADDR(PML4PML4I, 0, 0, 0) | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |
Can you double check the end address here? I'm not clear on why it changed.