mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
core: hle: kernel: KPageTable: Assert valid address on GetPhysicalAddr.
This commit is contained in:
parent
264bb5abf7
commit
2935c9d8de
1 changed files with 3 additions and 1 deletions
|
@ -248,7 +248,9 @@ public:
|
||||||
return !IsOutsideASLRRegion(address, size);
|
return !IsOutsideASLRRegion(address, size);
|
||||||
}
|
}
|
||||||
constexpr PAddr GetPhysicalAddr(VAddr addr) {
|
constexpr PAddr GetPhysicalAddr(VAddr addr) {
|
||||||
return page_table_impl.backing_addr[addr >> PageBits] + addr;
|
const auto backing_addr = page_table_impl.backing_addr[addr >> PageBits];
|
||||||
|
ASSERT(backing_addr);
|
||||||
|
return backing_addr + addr;
|
||||||
}
|
}
|
||||||
constexpr bool Contains(VAddr addr) const {
|
constexpr bool Contains(VAddr addr) const {
|
||||||
return address_space_start <= addr && addr <= address_space_end - 1;
|
return address_space_start <= addr && addr <= address_space_end - 1;
|
||||||
|
|
Loading…
Reference in a new issue