mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
Merge 2a67de78db into 01ae24e46e
This commit is contained in:
commit
3d346b8eae
|
|
@ -425,8 +425,15 @@ DECLARE_XBOXKRNL_EXPORT2(MmQueryAddressProtect, kMemory, kImplemented,
|
|||
|
||||
void MmSetAddressProtect_entry(lpvoid_t base_address, dword_t region_size,
|
||||
dword_t protect_bits) {
|
||||
if (!protect_bits) {
|
||||
XELOGE("MmSetAddressProtect: Failed due to incorrect protect_bits");
|
||||
constexpr uint32_t required_protect_bits =
|
||||
X_PAGE_NOACCESS | X_PAGE_READONLY | X_PAGE_READWRITE | X_PAGE_EXECUTE |
|
||||
X_PAGE_EXECUTE_READ | X_PAGE_EXECUTE_READWRITE;
|
||||
|
||||
if (xe::bit_count(protect_bits & required_protect_bits) != 1) {
|
||||
// Many titles use invalid combination with zero valid bits set.
|
||||
// We're skipping assertion for these cases to prevent unnecessary spam.
|
||||
// Affected titles: 594B07D1 (used on boot), 544307D1 (used in menu)
|
||||
assert_false(xe::bit_count(protect_bits & required_protect_bits) > 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue