mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-26 21:12:41 +02:00
kern: retrieve target firmware from exosphere instead of hardcoding
This commit is contained in:
parent
8295d4830d
commit
e179b5e1fa
@ -640,15 +640,10 @@ namespace ams::kern::board::nintendo::nx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool KDevicePageTable::Compare(const KPageGroup &compare_pg, KDeviceVirtualAddress device_address) const {
|
bool KDevicePageTable::Compare(const KPageGroup &compare_pg, KDeviceVirtualAddress device_address) const {
|
||||||
bool same_pages = false;
|
/* Check whether the page group we expect for the virtual address matches the page group we're validating. */
|
||||||
|
|
||||||
/* Make a page group. */
|
|
||||||
KPageGroup calc_pg(std::addressof(Kernel::GetBlockInfoManager()));
|
KPageGroup calc_pg(std::addressof(Kernel::GetBlockInfoManager()));
|
||||||
if (R_SUCCEEDED(this->MakePageGroup(std::addressof(calc_pg), device_address, compare_pg.GetNumPages() * PageSize))) {
|
return (R_SUCCEEDED(this->MakePageGroup(std::addressof(calc_pg), device_address, compare_pg.GetNumPages() * PageSize))) &&
|
||||||
same_pages = calc_pg.IsEquivalentTo(compare_pg);
|
calc_pg.IsEquivalentTo(compare_pg);
|
||||||
}
|
|
||||||
|
|
||||||
return same_pages;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Result KDevicePageTable::Map(size_t *out_mapped_size, const KPageGroup &pg, KDeviceVirtualAddress device_address, ams::svc::MemoryPermission device_perm, bool refresh_mappings) {
|
Result KDevicePageTable::Map(size_t *out_mapped_size, const KPageGroup &pg, KDeviceVirtualAddress device_address, ams::svc::MemoryPermission device_perm, bool refresh_mappings) {
|
||||||
|
Loading…
Reference in New Issue
Block a user