exo2: implement the atmosphere extension mappers

This commit is contained in:
Michael Scire 2020-05-20 00:34:01 -07:00 committed by SciresM
parent 1e0124fb67
commit 36754e2c38
12 changed files with 370 additions and 102 deletions

View file

@ -97,12 +97,6 @@ namespace ams::secmon::smc {
return pkg1::MemoryMode_Auto;
}
pkg1::MemorySize GetPhysicalMemorySize() {
const auto dram_id = fuse::GetDramId();
AMS_ABORT_UNLESS(dram_id < fuse::DramId_Count);
return DramIdToMemorySize[dram_id];
}
pkg1::MemorySize GetAvailableMemorySize(pkg1::MemorySize size) {
return std::min(GetPhysicalMemorySize(), size);
}
@ -294,4 +288,11 @@ namespace ams::secmon::smc {
return SmcResult::NotImplemented;
}
/* For exosphere's usage. */
pkg1::MemorySize GetPhysicalMemorySize() {
const auto dram_id = fuse::GetDramId();
AMS_ABORT_UNLESS(dram_id < fuse::DramId_Count);
return DramIdToMemorySize[dram_id];
}
}