8b99158d66
vm: fix overflow in memblock do_alloc when allocating large aligned blocks
...
allocating a large power-of-2 block with memblock may cause the base pointer of a region to exceed the limit pointer after it has been aligned during the free region scan in do_alloc().
2023-12-24 09:37:52 +00:00
1cbab5f2f4
vm: optimise vm_zone_init by only making blocks from free regions during boot
2023-12-24 09:35:50 +00:00
9f3c080e41
vm: minimum and maximum zone IDs are now defined in arch/../vm.h
2023-05-07 21:39:31 +01:00
223b37a113
vm: only align slab headers when offslab is being used
2023-05-01 18:12:46 +01:00
b6f8c1ccaa
kernel: don't use typedef for enums or non-opaque structs
2023-04-13 11:40:52 +01:00
b1b16ba19c
kernel: reduce log message spam during boot
2023-04-09 17:14:19 +01:00
dd6c190720
memblock: fix returned memory region overrunning reserved memory region
2023-03-24 14:17:28 +00:00
2bfb6bcd78
kernel: add c++ support
2023-03-20 20:41:39 +00:00
ff19915466
vm: mark memory holes as reserved under sparse memory model
2023-02-17 19:34:12 +00:00
8c4c224435
vm: fix get_or_create_page not allocating enough memory for sparse page map
2023-02-08 21:29:45 +00:00
22eabbedbc
vm: log per-zone free memory during init
2023-02-08 21:29:20 +00:00
9792aa512d
vm: use vm_memory_mode() to determine which model to initialise
2023-02-08 21:28:47 +00:00
6c6ca6920b
vm: handle null vm_pages and empty zones in zone init
2023-02-08 20:26:51 +00:00
b32791ade7
vm: zero sector array; perform overflow checks
2023-02-08 20:26:18 +00:00
a595b3040a
vm: remove debug message from get_or_create_page
2023-02-08 20:25:52 +00:00
a9f8069aab
vm: add sparse mm support to vm_page functions
2023-02-08 20:25:24 +00:00
a7d4166c89
vm: implement a sparse memory model
2023-02-08 17:13:01 +00:00
b8eb88627a
vm: add huge page order size definitions
2023-02-08 17:11:08 +00:00
4edc7e308e
vm: refactor page_array and functions into a separate source file
2023-02-07 21:18:08 +00:00
9879bbf646
vm: optimise page array size and initialisation.
...
* the page array now only extends up to the last non-reserved memory frame.
* rather than memset'ing the whole array to zero, we only initialise p_flags
for each page in vm_page_array_init, and then leave it to group_pages_into_block
to initialise the other parts of vm_page_t.
2023-02-07 16:00:28 +00:00
51ad3d48fd
memblock: mark bytes preceding an aligned allocation as reserved.
...
this prevents tiny holes of free memory appearing between
blocks of aligned allocations.
2023-02-07 15:57:18 +00:00
e9d4b60181
vm: print log messages during initialisation
2023-02-07 15:43:14 +00:00
bf0b4d412c
vm: use direct page mapping to convert virt/phys addresses
2023-02-07 15:40:06 +00:00
0516ef06a3
vm: explicitly initialise kmalloc in vm_bootstrap
...
if kmalloc is called with count=N before vm_bootstrap is finished,
the request will be fulfilled using memblock_alloc.
if N is a power of 2, the returned pointer will be aligned to
an N-byte boundary.
2023-02-06 20:50:38 +00:00
5c7bde4fdf
vm: add alignment parameter to cache allocator
...
caches with object size N, where N is a power of two, will naturally
align their objects on N-byte boundaries.
all other caches will align to an 8-byte boundary by default.
2023-02-06 20:50:38 +00:00
109616ec30
vm: add memblock support to vm_virt_to_phys, add vm_phys_to_virt
2023-02-06 20:50:38 +00:00
998f05d337
memblock: add functions to convert allocated pointers between virt/phys
2023-02-06 20:50:38 +00:00
6afb3bd10d
memblock: add alignment parameter to alloc functions
2023-02-06 20:50:38 +00:00
21907010bd
memblock: return NULL on virtual alloc failure
2023-02-05 10:49:59 +00:00
247bb2b530
kernel: port sandbox components
2023-02-03 20:51:23 +00:00
40f83922da
sandbox: moved all sources to main kernel tree
2023-02-03 20:43:38 +00:00
e714d619ba
kernel: remove placeholder vm subsystem
2023-02-03 20:37:45 +00:00
e922a776c3
Added stubs for the kernel memory manager
2022-12-28 23:04:09 +00:00