mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:47:44 +00:00
Kernel: Make sure super pages are in the first 16MiB of physical memory
This was broken by recent changes.
This commit is contained in:
parent
e01cc39eed
commit
a364f5c7b7
3 changed files with 15 additions and 0 deletions
|
@ -300,6 +300,9 @@ UNMAP_AFTER_INIT void MemoryManager::parse_memory_map()
|
||||||
m_user_physical_regions.append(PhysicalRegion::try_create(range.lower, range.upper).release_nonnull());
|
m_user_physical_regions.append(PhysicalRegion::try_create(range.lower, range.upper).release_nonnull());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Super pages are guaranteed to be in the first 16MB of physical memory
|
||||||
|
VERIFY(virtual_to_low_physical((FlatPtr)super_pages) + sizeof(super_pages) < 0x1000000);
|
||||||
|
|
||||||
// Append statically-allocated super physical physical_region.
|
// Append statically-allocated super physical physical_region.
|
||||||
m_super_physical_regions.append(PhysicalRegion::try_create(
|
m_super_physical_regions.append(PhysicalRegion::try_create(
|
||||||
PhysicalAddress(virtual_to_low_physical(FlatPtr(super_pages))),
|
PhysicalAddress(virtual_to_low_physical(FlatPtr(super_pages))),
|
||||||
|
|
|
@ -4,6 +4,7 @@ KERNEL_VIRTUAL_BASE = 0x2000000000;
|
||||||
|
|
||||||
PHDRS
|
PHDRS
|
||||||
{
|
{
|
||||||
|
boot_bss PT_LOAD ;
|
||||||
text PT_LOAD ;
|
text PT_LOAD ;
|
||||||
data PT_LOAD ;
|
data PT_LOAD ;
|
||||||
bss PT_LOAD ;
|
bss PT_LOAD ;
|
||||||
|
@ -16,6 +17,11 @@ SECTIONS
|
||||||
|
|
||||||
start_of_kernel_image = .;
|
start_of_kernel_image = .;
|
||||||
|
|
||||||
|
.boot_bss ALIGN(4K) (NOLOAD) : AT (ADDR(.boot_bss) - KERNEL_VIRTUAL_BASE)
|
||||||
|
{
|
||||||
|
*(.super_pages)
|
||||||
|
} :boot_bss
|
||||||
|
|
||||||
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
|
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
|
||||||
{
|
{
|
||||||
start_of_kernel_text = .;
|
start_of_kernel_text = .;
|
||||||
|
|
|
@ -4,6 +4,7 @@ KERNEL_VIRTUAL_BASE = 0xc0000000;
|
||||||
|
|
||||||
PHDRS
|
PHDRS
|
||||||
{
|
{
|
||||||
|
boot_bss PT_LOAD ;
|
||||||
text PT_LOAD ;
|
text PT_LOAD ;
|
||||||
data PT_LOAD ;
|
data PT_LOAD ;
|
||||||
bss PT_LOAD ;
|
bss PT_LOAD ;
|
||||||
|
@ -16,6 +17,11 @@ SECTIONS
|
||||||
|
|
||||||
start_of_kernel_image = .;
|
start_of_kernel_image = .;
|
||||||
|
|
||||||
|
.boot_bss ALIGN(4K) (NOLOAD) : AT (ADDR(.boot_bss) - KERNEL_VIRTUAL_BASE)
|
||||||
|
{
|
||||||
|
*(.super_pages)
|
||||||
|
} :boot_bss
|
||||||
|
|
||||||
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
|
.text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE)
|
||||||
{
|
{
|
||||||
start_of_kernel_text = .;
|
start_of_kernel_text = .;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue