panic: move to separate file, add KASSERT macro

This commit is contained in:
anna 2021-11-01 23:54:55 +01:00
parent 24c6e9504d
commit b6385aea0a
Signed by: fef
GPG key ID: EC22E476DC2D3D84
10 changed files with 100 additions and 34 deletions

View file

@ -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)