mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
Kernel: Expand the kernel memory slot from 8 MiB to 16 MiB
We were only 448 KiB away from filling up the old slot size we reserve for the kernel above the 3 GiB mark. This expands the slot to 16 MiB, which allows us to continue booting the kernel until somebody takes the time to improve our loader.
This commit is contained in:
parent
4ba36c6a49
commit
8cd5477e54
Notes:
sideshowbarker
2024-07-18 21:58:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/8cd5477e54a
@ -51,7 +51,7 @@ boot_pd0_pt0:
|
||||
.skip 4096 * 4
|
||||
.global boot_pd3_pts
|
||||
boot_pd3_pts:
|
||||
.skip 4096 * 4
|
||||
.skip 4096 * 8
|
||||
.global boot_pd3_pt1023
|
||||
boot_pd3_pt1023:
|
||||
.skip 4096
|
||||
@ -87,7 +87,11 @@ boot_pd3 : 512 pde's
|
||||
1: boot_pd3_pts[1] (3074-3076MB) (pseudo 512 4KB pages)
|
||||
2: boot_pd3_pts[2] (3076-3078MB) (pseudo 512 4KB pages)
|
||||
3: boot_pd3_pts[3] (3078-3080MB) (pseudo 512 4KB pages)
|
||||
4: boot_pd3_pt1023 (4094-4096MB) (for page table mappings)
|
||||
4: boot_pd3_pts[4] (3082-3084MB) (pseudo 512 4KB pages)
|
||||
5: boot_pd3_pts[5] (3084-3086MB) (pseudo 512 4KB pages)
|
||||
6: boot_pd3_pts[6] (3086-3088MB) (pseudo 512 4KB pages)
|
||||
7: boot_pd3_pts[7] (3088-3090MB) (pseudo 512 4KB pages)
|
||||
8: boot_pd3_pt1023 (4094-4096MB) (for page table mappings)
|
||||
|
||||
the 9 page tables each contain 512 pte's that map individual 4KB pages
|
||||
|
||||
@ -141,7 +145,7 @@ start:
|
||||
|
||||
/* clear pd3's pt's */
|
||||
movl $(boot_pd3_pts - 0xc0000000), %edi
|
||||
movl $(1024 * 5), %ecx
|
||||
movl $(1024 * 9), %ecx
|
||||
xorl %eax, %eax
|
||||
rep stosl
|
||||
|
||||
@ -153,7 +157,7 @@ start:
|
||||
orl $0x3, 0(%edi)
|
||||
|
||||
/* add boot_pd3_pts to boot_pd3 */
|
||||
movl $4, %ecx
|
||||
movl $8, %ecx
|
||||
movl $(boot_pd3 - 0xc0000000), %edi
|
||||
movl $(boot_pd3_pts - 0xc0000000), %eax
|
||||
|
||||
@ -178,8 +182,8 @@ start:
|
||||
addl $4096, %eax
|
||||
loop 1b
|
||||
|
||||
/* pseudo identity map the 3072-3080MB range */
|
||||
movl $(512 * 4), %ecx
|
||||
/* pseudo identity map the 3072-3090MB range */
|
||||
movl $(512 * 8), %ecx
|
||||
movl $(boot_pd3_pts - 0xc0000000), %edi
|
||||
xorl %eax, %eax
|
||||
|
||||
|
@ -56,7 +56,7 @@ extern "C" PageDirectoryEntry boot_pd3[1024];
|
||||
|
||||
UNMAP_AFTER_INIT PageDirectory::PageDirectory()
|
||||
{
|
||||
m_range_allocator.initialize_with_range(VirtualAddress(0xc0800000), 0x3f000000);
|
||||
m_range_allocator.initialize_with_range(VirtualAddress(0xc1000000), 0x30800000);
|
||||
m_identity_range_allocator.initialize_with_range(VirtualAddress(FlatPtr(0x00000000)), 0x00200000);
|
||||
|
||||
// Adopt the page tables already set up by boot.S
|
||||
|
Loading…
Reference in New Issue
Block a user