mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 01:41:59 -05:00
Kernel: Make the "in early boot" flag read-only-after-init
This commit is contained in:
parent
7b3fdd178e
commit
3bf5e482cf
1 changed files with 4 additions and 4 deletions
|
@ -75,7 +75,7 @@ multiboot_module_entry_t multiboot_copy_boot_modules_array[16];
|
|||
size_t multiboot_copy_boot_modules_count;
|
||||
|
||||
extern "C" const char kernel_cmdline[4096];
|
||||
bool g_in_early_boot;
|
||||
READONLY_AFTER_INIT bool g_in_early_boot;
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
|
@ -259,15 +259,15 @@ void init_stage2(void*)
|
|||
|
||||
load_kernel_symbol_table();
|
||||
|
||||
// Switch out of early boot mode.
|
||||
g_in_early_boot = false;
|
||||
|
||||
// NOTE: Everything marked READONLY_AFTER_INIT becomes non-writable after this point.
|
||||
MM.protect_readonly_after_init_memory();
|
||||
|
||||
// NOTE: Everything marked UNMAP_AFTER_INIT becomes inaccessible after this point.
|
||||
MM.unmap_memory_after_init();
|
||||
|
||||
// Switch out of early boot mode.
|
||||
g_in_early_boot = false;
|
||||
|
||||
int error;
|
||||
|
||||
// FIXME: It would be nicer to set the mode from userspace.
|
||||
|
|
Loading…
Reference in a new issue