panic: move to separate file, add KASSERT macro
This commit is contained in:
parent
24c6e9504d
commit
b6385aea0a
10 changed files with 100 additions and 34 deletions
|
|
@ -38,7 +38,7 @@ int kmalloc_init(uintptr_t _phys_start, uintptr_t _phys_end)
|
|||
phys_start = image_end_phys;
|
||||
}
|
||||
|
||||
phys_start = uintptr_align(phys_start, +HUGEPAGE_SHIFT);
|
||||
phys_start = align_ceil(phys_start, HUGEPAGE_SIZE);
|
||||
/*
|
||||
* This is intentionally not aligned to hugepages, because __early_get_page()
|
||||
* shrinks it in single PAGE_SIZE steps whenever it is called anyway.
|
||||
|
|
@ -48,7 +48,7 @@ int kmalloc_init(uintptr_t _phys_start, uintptr_t _phys_end)
|
|||
* be able to allocate pages before the page frame allocator is set up
|
||||
* in the first place).
|
||||
*/
|
||||
phys_end = uintptr_align(phys_end, -PAGE_SHIFT);
|
||||
phys_end = align_floor(phys_end, PAGE_SIZE);
|
||||
|
||||
int err = pages_init();
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue