mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 19:54:22 -04:00
svc: refactor/rename MemoryInfo fields
This commit is contained in:
parent
d9159f81d2
commit
4866e80769
21 changed files with 138 additions and 138 deletions
|
@ -468,9 +468,9 @@ namespace ams::kern {
|
|||
|
||||
Result KPageTableBase::CheckMemoryState(const KMemoryInfo &info, u32 state_mask, u32 state, u32 perm_mask, u32 perm, u32 attr_mask, u32 attr) const {
|
||||
/* Validate the states match expectation. */
|
||||
R_UNLESS((info.m_state & state_mask) == state, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS((info.m_perm & perm_mask) == perm, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS((info.m_attribute & attr_mask) == attr, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS((info.m_state & state_mask) == state, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS((info.m_permission & perm_mask) == perm, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS((info.m_attribute & attr_mask) == attr, svc::ResultInvalidCurrentMemory());
|
||||
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
@ -524,12 +524,12 @@ namespace ams::kern {
|
|||
|
||||
/* Validate all blocks in the range have correct state. */
|
||||
const KMemoryState first_state = info.m_state;
|
||||
const KMemoryPermission first_perm = info.m_perm;
|
||||
const KMemoryPermission first_perm = info.m_permission;
|
||||
const KMemoryAttribute first_attr = info.m_attribute;
|
||||
while (true) {
|
||||
/* Validate the current block. */
|
||||
R_UNLESS(info.m_state == first_state, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS(info.m_perm == first_perm, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS(info.m_permission == first_perm, svc::ResultInvalidCurrentMemory());
|
||||
R_UNLESS((info.m_attribute | ignore_attr) == (first_attr | ignore_attr), svc::ResultInvalidCurrentMemory());
|
||||
|
||||
/* Validate against the provided masks. */
|
||||
|
@ -1720,9 +1720,9 @@ namespace ams::kern {
|
|||
.m_ipc_lock_count = 0,
|
||||
.m_device_use_count = 0,
|
||||
.m_ipc_disable_merge_count = 0,
|
||||
.m_perm = KMemoryPermission_None,
|
||||
.m_permission = KMemoryPermission_None,
|
||||
.m_attribute = KMemoryAttribute_None,
|
||||
.m_original_perm = KMemoryPermission_None,
|
||||
.m_original_permission = KMemoryPermission_None,
|
||||
.m_disable_merge_attribute = KMemoryBlockDisableMergeAttribute_None,
|
||||
};
|
||||
out_page_info->flags = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue