diff options
| author | 2021-03-20 00:43:00 -0700 | |
|---|---|---|
| committer | 2021-03-21 14:45:03 -0700 | |
| commit | 8d0ba7ee494af17c85ef2d617db5f2a7acaa37cf (patch) | |
| tree | 51890f6a5accc88ebbde67d32ce0c4cecd30b10b /src/core/hle/kernel | |
| parent | hle: kernel: k_memory_region: Refactor to simplify code. (diff) | |
| download | yuzu-8d0ba7ee494af17c85ef2d617db5f2a7acaa37cf.tar.gz yuzu-8d0ba7ee494af17c85ef2d617db5f2a7acaa37cf.tar.xz yuzu-8d0ba7ee494af17c85ef2d617db5f2a7acaa37cf.zip | |
common: common_sizes: Move Invalid to Size_* prefix and add missing values.
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/k_address_space_info.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/hle/kernel/k_address_space_info.cpp b/src/core/hle/kernel/k_address_space_info.cpp index eb8af660c..89906954d 100644 --- a/src/core/hle/kernel/k_address_space_info.cpp +++ b/src/core/hle/kernel/k_address_space_info.cpp | |||
| @@ -14,24 +14,24 @@ namespace { | |||
| 14 | 14 | ||
| 15 | // clang-format off | 15 | // clang-format off |
| 16 | constexpr std::array<KAddressSpaceInfo, 13> AddressSpaceInfos{{ | 16 | constexpr std::array<KAddressSpaceInfo, 13> AddressSpaceInfos{{ |
| 17 | { .bit_width = 32, .address = Size_2_MB , .size = Size_1_GB - Size_2_MB , .type = KAddressSpaceInfo::Type::MapSmall, }, | 17 | { .bit_width = 32, .address = Size_2_MB , .size = Size_1_GB - Size_2_MB , .type = KAddressSpaceInfo::Type::MapSmall, }, |
| 18 | { .bit_width = 32, .address = Size_1_GB , .size = Size_4_GB - Size_1_GB , .type = KAddressSpaceInfo::Type::MapLarge, }, | 18 | { .bit_width = 32, .address = Size_1_GB , .size = Size_4_GB - Size_1_GB , .type = KAddressSpaceInfo::Type::MapLarge, }, |
| 19 | { .bit_width = 32, .address = Invalid , .size = Size_1_GB , .type = KAddressSpaceInfo::Type::Heap, }, | 19 | { .bit_width = 32, .address = Size_Invalid, .size = Size_1_GB , .type = KAddressSpaceInfo::Type::Heap, }, |
| 20 | { .bit_width = 32, .address = Invalid , .size = Size_1_GB , .type = KAddressSpaceInfo::Type::Alias, }, | 20 | { .bit_width = 32, .address = Size_Invalid, .size = Size_1_GB , .type = KAddressSpaceInfo::Type::Alias, }, |
| 21 | { .bit_width = 36, .address = Size_128_MB, .size = Size_2_GB - Size_128_MB, .type = KAddressSpaceInfo::Type::MapSmall, }, | 21 | { .bit_width = 36, .address = Size_128_MB , .size = Size_2_GB - Size_128_MB, .type = KAddressSpaceInfo::Type::MapSmall, }, |
| 22 | { .bit_width = 36, .address = Size_2_GB , .size = Size_64_GB - Size_2_GB , .type = KAddressSpaceInfo::Type::MapLarge, }, | 22 | { .bit_width = 36, .address = Size_2_GB , .size = Size_64_GB - Size_2_GB , .type = KAddressSpaceInfo::Type::MapLarge, }, |
| 23 | { .bit_width = 36, .address = Invalid , .size = Size_6_GB , .type = KAddressSpaceInfo::Type::Heap, }, | 23 | { .bit_width = 36, .address = Size_Invalid, .size = Size_6_GB , .type = KAddressSpaceInfo::Type::Heap, }, |
| 24 | { .bit_width = 36, .address = Invalid , .size = Size_6_GB , .type = KAddressSpaceInfo::Type::Alias, }, | 24 | { .bit_width = 36, .address = Size_Invalid, .size = Size_6_GB , .type = KAddressSpaceInfo::Type::Alias, }, |
| 25 | { .bit_width = 39, .address = Size_128_MB, .size = Size_512_GB - Size_128_MB, .type = KAddressSpaceInfo::Type::Map39Bit, }, | 25 | { .bit_width = 39, .address = Size_128_MB , .size = Size_512_GB - Size_128_MB, .type = KAddressSpaceInfo::Type::Map39Bit, }, |
| 26 | { .bit_width = 39, .address = Invalid , .size = Size_64_GB , .type = KAddressSpaceInfo::Type::MapSmall }, | 26 | { .bit_width = 39, .address = Size_Invalid, .size = Size_64_GB , .type = KAddressSpaceInfo::Type::MapSmall }, |
| 27 | { .bit_width = 39, .address = Invalid , .size = Size_6_GB , .type = KAddressSpaceInfo::Type::Heap, }, | 27 | { .bit_width = 39, .address = Size_Invalid, .size = Size_6_GB , .type = KAddressSpaceInfo::Type::Heap, }, |
| 28 | { .bit_width = 39, .address = Invalid , .size = Size_64_GB , .type = KAddressSpaceInfo::Type::Alias, }, | 28 | { .bit_width = 39, .address = Size_Invalid, .size = Size_64_GB , .type = KAddressSpaceInfo::Type::Alias, }, |
| 29 | { .bit_width = 39, .address = Invalid , .size = Size_2_GB , .type = KAddressSpaceInfo::Type::Stack, }, | 29 | { .bit_width = 39, .address = Size_Invalid, .size = Size_2_GB , .type = KAddressSpaceInfo::Type::Stack, }, |
| 30 | }}; | 30 | }}; |
| 31 | // clang-format on | 31 | // clang-format on |
| 32 | 32 | ||
| 33 | constexpr bool IsAllowedIndexForAddress(std::size_t index) { | 33 | constexpr bool IsAllowedIndexForAddress(std::size_t index) { |
| 34 | return index < AddressSpaceInfos.size() && AddressSpaceInfos[index].address != Invalid; | 34 | return index < AddressSpaceInfos.size() && AddressSpaceInfos[index].address != Size_Invalid; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | using IndexArray = | 37 | using IndexArray = |