mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 23:59:49 -04:00
kern: update KMemoryRegion to store last address rather than size
This commit is contained in:
parent
5da6b60008
commit
aac8af8bf5
3 changed files with 36 additions and 37 deletions
|
@ -139,10 +139,10 @@ namespace ams::kern::init {
|
|||
InitializeSlabResourceCounts();
|
||||
|
||||
/* Insert the root region for the virtual memory tree, from which all other regions will derive. */
|
||||
KMemoryLayout::GetVirtualMemoryRegionTree().InsertDirectly(KernelVirtualAddressSpaceBase, KernelVirtualAddressSpaceSize);
|
||||
KMemoryLayout::GetVirtualMemoryRegionTree().InsertDirectly(KernelVirtualAddressSpaceBase, KernelVirtualAddressSpaceBase + KernelVirtualAddressSpaceSize - 1);
|
||||
|
||||
/* Insert the root region for the physical memory tree, from which all other regions will derive. */
|
||||
KMemoryLayout::GetPhysicalMemoryRegionTree().InsertDirectly(KernelPhysicalAddressSpaceBase, KernelPhysicalAddressSpaceSize);
|
||||
KMemoryLayout::GetPhysicalMemoryRegionTree().InsertDirectly(KernelPhysicalAddressSpaceBase, KernelPhysicalAddressSpaceBase + KernelPhysicalAddressSpaceSize - 1);
|
||||
|
||||
/* Save start and end for ease of use. */
|
||||
const uintptr_t code_start_virt_addr = reinterpret_cast<uintptr_t>(_start);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue