فهرست منبع

Kernel: Rename bootloader to prekernel

There are a few occurrences of the old name that slipped through.
Gunnar Beutner 4 سال پیش
والد
کامیت
5ff1416076
3فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  1. 3 3
      Kernel/VM/MemoryManager.cpp
  2. 2 2
      Kernel/VM/MemoryManager.h
  3. 4 4
      Kernel/init.cpp

+ 3 - 3
Kernel/VM/MemoryManager.cpp

@@ -22,8 +22,8 @@
 #include <Kernel/VM/PhysicalRegion.h>
 #include <Kernel/VM/SharedInodeVMObject.h>
 
-extern u8* start_of_bootloader_image;
-extern u8* end_of_bootloader_image;
+extern u8* start_of_prekernel_image;
+extern u8* end_of_prekernel_image;
 extern u8* start_of_kernel_image;
 extern u8* end_of_kernel_image;
 extern FlatPtr start_of_kernel_text;
@@ -201,7 +201,7 @@ UNMAP_AFTER_INIT void MemoryManager::parse_memory_map()
     // Register used memory regions that we know of.
     m_used_memory_ranges.ensure_capacity(4);
     m_used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::LowMemory, PhysicalAddress(0x00000000), PhysicalAddress(1 * MiB) });
-    m_used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::Bootloader, PhysicalAddress(virtual_to_low_physical(FlatPtr(start_of_bootloader_image))), PhysicalAddress(page_round_up(virtual_to_low_physical(FlatPtr(end_of_bootloader_image)))) });
+    m_used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::Prekernel, PhysicalAddress(virtual_to_low_physical(FlatPtr(start_of_prekernel_image))), PhysicalAddress(page_round_up(virtual_to_low_physical(FlatPtr(end_of_prekernel_image)))) });
     m_used_memory_ranges.append(UsedMemoryRange { UsedMemoryRangeType::Kernel, PhysicalAddress(virtual_to_low_physical(FlatPtr(&start_of_kernel_image))), PhysicalAddress(page_round_up(virtual_to_low_physical(FlatPtr(&end_of_kernel_image)))) });
 
     if (multiboot_info_ptr->flags & 0x4) {

+ 2 - 2
Kernel/VM/MemoryManager.h

@@ -53,7 +53,7 @@ inline FlatPtr virtual_to_low_physical(FlatPtr virtual_)
 
 enum class UsedMemoryRangeType {
     LowMemory = 0,
-    Bootloader,
+    Prekernel,
     Kernel,
     BootModule,
     PhysicalPages,
@@ -61,7 +61,7 @@ enum class UsedMemoryRangeType {
 
 static constexpr StringView UserMemoryRangeTypeNames[] {
     "Low memory",
-    "Bootloader",
+    "Prekernel",
     "Kernel",
     "Boot module",
     "Physical Pages"

+ 4 - 4
Kernel/init.cpp

@@ -106,8 +106,8 @@ static Processor s_bsp_processor; // global but let's keep it "private"
 // init_stage2() function. Initialization continues there.
 
 extern "C" {
-u8 const* start_of_bootloader_image;
-u8 const* end_of_bootloader_image;
+u8 const* start_of_prekernel_image;
+u8 const* end_of_prekernel_image;
 __attribute__((section(".boot_bss"))) FlatPtr kernel_base;
 #if ARCH(X86_64)
 extern "C" u32 gdt64ptr;
@@ -127,8 +127,8 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
     setup_serial_debug();
 
     multiboot_info_ptr = boot_info.multiboot_info_ptr;
-    start_of_bootloader_image = boot_info.start_of_prekernel_image;
-    end_of_bootloader_image = boot_info.end_of_prekernel_image;
+    start_of_prekernel_image = boot_info.start_of_prekernel_image;
+    end_of_prekernel_image = boot_info.end_of_prekernel_image;
     kernel_base = boot_info.kernel_base;
 #if ARCH(X86_64)
     gdt64ptr = boot_info.gdt64ptr;