mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Make the "in early boot" flag read-only-after-init
This commit is contained in:
parent
7b3fdd178e
commit
3bf5e482cf
Notes:
sideshowbarker
2024-07-18 12:04:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3bf5e482cf1
@ -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 New Issue
Block a user