mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-15 09:36:35 +00:00
kern: add new KMemoryState
This commit is contained in:
parent
0230609cca
commit
d2664c60a3
3 changed files with 7 additions and 0 deletions
|
@ -105,6 +105,8 @@ namespace ams::kern {
|
||||||
|
|
||||||
KMemoryState_GeneratedCode = ams::svc::MemoryState_GeneratedCode | KMemoryState_FlagMapped | KMemoryState_FlagReferenceCounted | KMemoryState_FlagCanDebug,
|
KMemoryState_GeneratedCode = ams::svc::MemoryState_GeneratedCode | KMemoryState_FlagMapped | KMemoryState_FlagReferenceCounted | KMemoryState_FlagCanDebug,
|
||||||
KMemoryState_CodeOut = ams::svc::MemoryState_CodeOut | KMemoryState_FlagMapped | KMemoryState_FlagReferenceCounted,
|
KMemoryState_CodeOut = ams::svc::MemoryState_CodeOut | KMemoryState_FlagMapped | KMemoryState_FlagReferenceCounted,
|
||||||
|
|
||||||
|
KMemoryState_Coverage = ams::svc::MemoryState_Coverage | KMemoryState_FlagMapped,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
|
@ -130,6 +132,7 @@ namespace ams::kern {
|
||||||
static_assert(KMemoryState_Kernel == 0x00002013);
|
static_assert(KMemoryState_Kernel == 0x00002013);
|
||||||
static_assert(KMemoryState_GeneratedCode == 0x00402214);
|
static_assert(KMemoryState_GeneratedCode == 0x00402214);
|
||||||
static_assert(KMemoryState_CodeOut == 0x00402015);
|
static_assert(KMemoryState_CodeOut == 0x00402015);
|
||||||
|
static_assert(KMemoryState_Coverage == 0x00002016);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum KMemoryPermission : u8 {
|
enum KMemoryPermission : u8 {
|
||||||
|
|
|
@ -381,6 +381,7 @@ namespace ams::kern {
|
||||||
case KMemoryState_SharedCode:
|
case KMemoryState_SharedCode:
|
||||||
case KMemoryState_GeneratedCode:
|
case KMemoryState_GeneratedCode:
|
||||||
case KMemoryState_CodeOut:
|
case KMemoryState_CodeOut:
|
||||||
|
case KMemoryState_Coverage:
|
||||||
return m_alias_code_region_start;
|
return m_alias_code_region_start;
|
||||||
case KMemoryState_Code:
|
case KMemoryState_Code:
|
||||||
case KMemoryState_CodeData:
|
case KMemoryState_CodeData:
|
||||||
|
@ -414,6 +415,7 @@ namespace ams::kern {
|
||||||
case KMemoryState_SharedCode:
|
case KMemoryState_SharedCode:
|
||||||
case KMemoryState_GeneratedCode:
|
case KMemoryState_GeneratedCode:
|
||||||
case KMemoryState_CodeOut:
|
case KMemoryState_CodeOut:
|
||||||
|
case KMemoryState_Coverage:
|
||||||
return m_alias_code_region_end - m_alias_code_region_start;
|
return m_alias_code_region_end - m_alias_code_region_start;
|
||||||
case KMemoryState_Code:
|
case KMemoryState_Code:
|
||||||
case KMemoryState_CodeData:
|
case KMemoryState_CodeData:
|
||||||
|
@ -450,6 +452,7 @@ namespace ams::kern {
|
||||||
case KMemoryState_SharedCode:
|
case KMemoryState_SharedCode:
|
||||||
case KMemoryState_GeneratedCode:
|
case KMemoryState_GeneratedCode:
|
||||||
case KMemoryState_CodeOut:
|
case KMemoryState_CodeOut:
|
||||||
|
case KMemoryState_Coverage:
|
||||||
return is_in_region && !is_in_heap && !is_in_alias;
|
return is_in_region && !is_in_heap && !is_in_alias;
|
||||||
case KMemoryState_Normal:
|
case KMemoryState_Normal:
|
||||||
MESOSPHERE_ASSERT(is_in_heap);
|
MESOSPHERE_ASSERT(is_in_heap);
|
||||||
|
|
|
@ -94,6 +94,7 @@ namespace ams::svc {
|
||||||
MemoryState_Kernel = 0x13,
|
MemoryState_Kernel = 0x13,
|
||||||
MemoryState_GeneratedCode = 0x14,
|
MemoryState_GeneratedCode = 0x14,
|
||||||
MemoryState_CodeOut = 0x15,
|
MemoryState_CodeOut = 0x15,
|
||||||
|
MemoryState_Coverage = 0x16,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MemoryPermission : u32 {
|
enum MemoryPermission : u32 {
|
||||||
|
|
Loading…
Reference in a new issue