mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
kern: fix using memory config for half-of-true-size
This commit is contained in:
parent
31ad4eec1d
commit
29cc13543a
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ namespace ams::kern {
|
||||||
KPhysicalAddress KSystemControlBase::Init::GetKernelPhysicalBaseAddress(KPhysicalAddress base_address) {
|
KPhysicalAddress KSystemControlBase::Init::GetKernelPhysicalBaseAddress(KPhysicalAddress base_address) {
|
||||||
const size_t real_dram_size = KSystemControl::Init::GetRealMemorySize();
|
const size_t real_dram_size = KSystemControl::Init::GetRealMemorySize();
|
||||||
const size_t intended_dram_size = KSystemControl::Init::GetIntendedMemorySize();
|
const size_t intended_dram_size = KSystemControl::Init::GetIntendedMemorySize();
|
||||||
if (intended_dram_size * 2 < real_dram_size) {
|
if (intended_dram_size * 2 <= real_dram_size) {
|
||||||
return base_address;
|
return base_address;
|
||||||
} else {
|
} else {
|
||||||
return base_address + ((real_dram_size - intended_dram_size) / 2);
|
return base_address + ((real_dram_size - intended_dram_size) / 2);
|
||||||
|
|
Loading…
Reference in a new issue