Skip to content

Commit

Permalink
arch,pt: switch page tables already in init_pagetables()
Browse files Browse the repository at this point in the history
This is mainly refactoring cleanup.
Boot stack is part of .bss.init section and as such is mapped.

Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Oct 27, 2023
1 parent ed9c283 commit 3c4f6ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions arch/x86/pagetables.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,6 @@ void init_pagetables(void) {
map_multiboot_areas();
map_used_memory();
map_tmp_mapping();

write_cr3(cr3.paddr);
}
2 changes: 0 additions & 2 deletions common/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ void __noreturn __text_init kernel_start(uint32_t multiboot_magic, unsigned long

/* Setup final pagetables */
init_pagetables();

write_cr3(cr3.paddr);
boot_flags.virt = true;

WRITE_SP(get_free_pages_top(PAGE_ORDER_2M, GFP_KERNEL_MAP));
Expand Down

0 comments on commit 3c4f6ef

Please sign in to comment.