diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_memory_region.h | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/k_memory_region_type.h | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/core/hle/kernel/k_memory_region.h b/src/core/hle/kernel/k_memory_region.h index 374b24bd3..782c21fbf 100644 --- a/src/core/hle/kernel/k_memory_region.h +++ b/src/core/hle/kernel/k_memory_region.h | |||
| @@ -91,7 +91,7 @@ public: | |||
| 91 | return (this->GetType() | type) == this->GetType(); | 91 | return (this->GetType() | type) == this->GetType(); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | constexpr bool HasTypeAttribute(KMemoryRegionAttr attr) const { | 94 | constexpr bool HasTypeAttribute(u32 attr) const { |
| 95 | return (this->GetType() | attr) == this->GetType(); | 95 | return (this->GetType() | attr) == this->GetType(); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| @@ -103,7 +103,7 @@ public: | |||
| 103 | pair_address = a; | 103 | pair_address = a; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | constexpr void SetTypeAttribute(KMemoryRegionAttr attr) { | 106 | constexpr void SetTypeAttribute(u32 attr) { |
| 107 | type_id |= attr; | 107 | type_id |= attr; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| @@ -237,7 +237,7 @@ public: | |||
| 237 | return extents; | 237 | return extents; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | DerivedRegionExtents GetDerivedRegionExtents(KMemoryRegionAttr type_id) const { | 240 | DerivedRegionExtents GetDerivedRegionExtents(u32 type_id) const { |
| 241 | return GetDerivedRegionExtents(static_cast<KMemoryRegionType>(type_id)); | 241 | return GetDerivedRegionExtents(static_cast<KMemoryRegionType>(type_id)); |
| 242 | } | 242 | } |
| 243 | 243 | ||
diff --git a/src/core/hle/kernel/k_memory_region_type.h b/src/core/hle/kernel/k_memory_region_type.h index cf2653d28..5ea5d2ceb 100644 --- a/src/core/hle/kernel/k_memory_region_type.h +++ b/src/core/hle/kernel/k_memory_region_type.h | |||
| @@ -13,9 +13,7 @@ | |||
| 13 | 13 | ||
| 14 | namespace Kernel { | 14 | namespace Kernel { |
| 15 | 15 | ||
| 16 | enum KMemoryRegionType : u32 {}; | 16 | enum KMemoryRegionType : u32 { |
| 17 | |||
| 18 | enum KMemoryRegionAttr : typename std::underlying_type<KMemoryRegionType>::type { | ||
| 19 | KMemoryRegionAttr_CarveoutProtected = 0x04000000, | 17 | KMemoryRegionAttr_CarveoutProtected = 0x04000000, |
| 20 | KMemoryRegionAttr_DidKernelMap = 0x08000000, | 18 | KMemoryRegionAttr_DidKernelMap = 0x08000000, |
| 21 | KMemoryRegionAttr_ShouldKernelMap = 0x10000000, | 19 | KMemoryRegionAttr_ShouldKernelMap = 0x10000000, |
| @@ -23,7 +21,7 @@ enum KMemoryRegionAttr : typename std::underlying_type<KMemoryRegionType>::type | |||
| 23 | KMemoryRegionAttr_NoUserMap = 0x40000000, | 21 | KMemoryRegionAttr_NoUserMap = 0x40000000, |
| 24 | KMemoryRegionAttr_LinearMapped = 0x80000000, | 22 | KMemoryRegionAttr_LinearMapped = 0x80000000, |
| 25 | }; | 23 | }; |
| 26 | DECLARE_ENUM_FLAG_OPERATORS(KMemoryRegionAttr); | 24 | DECLARE_ENUM_FLAG_OPERATORS(KMemoryRegionType); |
| 27 | 25 | ||
| 28 | namespace impl { | 26 | namespace impl { |
| 29 | 27 | ||
| @@ -82,8 +80,8 @@ public: | |||
| 82 | return *this; | 80 | return *this; |
| 83 | } | 81 | } |
| 84 | 82 | ||
| 85 | constexpr KMemoryRegionTypeValue& SetAttribute(KMemoryRegionAttr attr) { | 83 | constexpr KMemoryRegionTypeValue& SetAttribute(u32 attr) { |
| 86 | m_value |= static_cast<u32>(attr); | 84 | m_value |= attr; |
| 87 | return *this; | 85 | return *this; |
| 88 | } | 86 | } |
| 89 | 87 | ||
| @@ -95,9 +93,9 @@ public: | |||
| 95 | return new_type; | 93 | return new_type; |
| 96 | } | 94 | } |
| 97 | 95 | ||
| 98 | constexpr KMemoryRegionTypeValue DeriveAttribute(KMemoryRegionAttr attr) const { | 96 | constexpr KMemoryRegionTypeValue DeriveAttribute(u32 attr) const { |
| 99 | KMemoryRegionTypeValue new_type = *this; | 97 | KMemoryRegionTypeValue new_type = *this; |
| 100 | new_type.m_value |= static_cast<u32>(attr); | 98 | new_type.m_value |= attr; |
| 101 | return new_type; | 99 | return new_type; |
| 102 | } | 100 | } |
| 103 | 101 | ||