sandbox: vm: organise pages into zoned blocks
This commit is contained in:
@@ -95,7 +95,13 @@ int memory_test(void)
|
||||
printf("allocated %d bytes at 0x%" PRIxPTR "\n", size, alloc);
|
||||
}
|
||||
|
||||
vm_bootstrap();
|
||||
vm_zone_descriptor_t zones[] = {
|
||||
{ .zd_id = VM_ZONE_DMA, .zd_name = "dma", .zd_base = 0x0, .zd_limit = MB_TO_BYTES(16) - 1 },
|
||||
{ .zd_id = VM_ZONE_NORMAL, .zd_name = "normal", .zd_base = MB_TO_BYTES(16), .zd_limit = MB_TO_BYTES(1024) - 1 },
|
||||
{ .zd_id = VM_ZONE_HIGHMEM, .zd_name = "highmem", .zd_base = MB_TO_BYTES(1024), .zd_limit = UINTPTR_MAX },
|
||||
};
|
||||
|
||||
vm_bootstrap(zones, sizeof zones / sizeof zones[0]);
|
||||
|
||||
printf("memory regions:\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user