Skip to content

Commit

Permalink
Function naming
Browse files Browse the repository at this point in the history
  • Loading branch information
phaubertin committed Jan 12, 2025
1 parent 60caf20 commit 0a71592
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions include/kernel/infrastructure/i686/boot_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

void boot_alloc_init(boot_alloc_t *boot_alloc, const bootinfo_t *bootinfo);

void boot_reinit_at_16mb(boot_alloc_t *boot_alloc);
void boot_alloc_reinit_at_16mb(boot_alloc_t *boot_alloc);

void boot_reinit_at_klimit(boot_alloc_t *boot_alloc);
void boot_alloc_reinit_at_klimit(boot_alloc_t *boot_alloc);

/**
* Allocate an object on the boot heap.
Expand Down
6 changes: 3 additions & 3 deletions kernel/infrastructure/i686/boot_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*
* This function sets up the allocator to allocate pages after the kernel loaded
* at 0x100000 (1MB). Once the kernel has been moved to 0x1000000 (16MB), the
* boot_reinit_at_16mb() function has to be called to start allocating pages
* boot_alloc_reinit_at_16mb() function has to be called to start allocating pages
* there.
*
* @param boot_alloc the allocator state initialized by this function
Expand All @@ -71,7 +71,7 @@ void boot_alloc_init(boot_alloc_t *boot_alloc, const bootinfo_t *bootinfo) {
* @param boot_alloc the allocator state initialized by this function
*
* */
void boot_reinit_at_16mb(boot_alloc_t *boot_alloc) {
void boot_alloc_reinit_at_16mb(boot_alloc_t *boot_alloc) {
boot_alloc->current_page = boot_alloc->first_page_at_16mb;
boot_alloc->page_limit = (char *)MEMORY_ADDR_16MB + BOOT_SIZE_AT_16MB;
}
Expand All @@ -90,7 +90,7 @@ void boot_reinit_at_16mb(boot_alloc_t *boot_alloc) {
* @param boot_alloc the allocator state initialized by this function
*
* */
void boot_reinit_at_klimit(boot_alloc_t *boot_alloc) {
void boot_alloc_reinit_at_klimit(boot_alloc_t *boot_alloc) {
boot_alloc->current_page = (void *)PHYS_TO_VIRT_AT_16MB(boot_alloc->current_page);
boot_alloc->page_limit = (char *)KLIMIT + BOOT_SIZE_AT_16MB;
}
Expand Down
8 changes: 3 additions & 5 deletions kernel/infrastructure/i686/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void machine_init(const config_t *config) {
* Do this after enabling PAE: we want the temporary PAE page tables to be
* allocated after 1MB because we won't need them anymore once the final
* address space is created. */
boot_reinit_at_16mb(&boot_alloc);
boot_alloc_reinit_at_16mb(&boot_alloc);

/* allocate per-CPU data
*
Expand Down Expand Up @@ -390,10 +390,8 @@ void machine_init(const config_t *config) {
* panic handler itself will then attempt to log). */
remap_text_video_memory();

/* From this point, we are ready to switch to the new address space, so we
* don't need to allocate any more pages from the boot allocator. Transfer
* the remaining pages to the run-time page allocator. */
boot_reinit_at_klimit(&boot_alloc);
/* Transfer the remaining pages to the run-time page allocator. */
boot_alloc_reinit_at_klimit(&boot_alloc);
initialize_page_allocator(&boot_alloc);

/* create slab cache to allocate PDPTs
Expand Down

0 comments on commit 0a71592

Please sign in to comment.