mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 12:21:18 +00:00
kern: use size instead of phys addr as sentinel value in InitializeCore linear mapping logic
This commit is contained in:
parent
2cedf2bcf0
commit
2effe130e3
1 changed files with 2 additions and 2 deletions
|
@ -274,7 +274,7 @@ namespace ams::kern::init {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (cur_phys_addr == 0) {
|
||||
if (cur_size == 0) {
|
||||
cur_phys_addr = region.GetAddress();
|
||||
cur_size = region.GetSize();
|
||||
} else if (cur_phys_addr + cur_size == region.GetAddress()) {
|
||||
|
@ -296,7 +296,7 @@ namespace ams::kern::init {
|
|||
}
|
||||
|
||||
/* Map the last block, which we may have skipped. */
|
||||
if (cur_phys_addr != 0) {
|
||||
if (cur_size != 0) {
|
||||
const uintptr_t cur_virt_addr = cur_phys_addr + linear_region_phys_to_virt_diff;
|
||||
ttbr1_table.Map(cur_virt_addr, cur_size, cur_phys_addr, KernelRwDataAttribute, g_initial_page_allocator);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue