summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/arch
diff options
context:
space:
mode:
authorGravatar bunnei2021-02-18 16:38:30 -0800
committerGravatar bunnei2021-03-21 14:45:02 -0700
commitc17beefe3d1e4850b3518a45892c0c5c6e11c95a (patch)
treebd4a0f20b6f95f0394a7777e86ceffd1dcd9ba10 /src/core/hle/kernel/arch
parenthle: kernel: KMemoryRegion: Derive region values. (diff)
downloadyuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.gz
yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.xz
yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.zip
hle: kernel: Add architecture and board specific memory regions.
Diffstat (limited to 'src/core/hle/kernel/arch')
-rw-r--r--src/core/hle/kernel/arch/arm64/k_memory_region_device_types.inc20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/core/hle/kernel/arch/arm64/k_memory_region_device_types.inc b/src/core/hle/kernel/arch/arm64/k_memory_region_device_types.inc
new file mode 100644
index 000000000..857b512ba
--- /dev/null
+++ b/src/core/hle/kernel/arch/arm64/k_memory_region_device_types.inc
@@ -0,0 +1,20 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5// All architectures must define NumArchitectureDeviceRegions.
6constexpr inline const auto NumArchitectureDeviceRegions = 3;
7
8constexpr inline const auto KMemoryRegionType_Uart =
9 KMemoryRegionType_ArchDeviceBase.DeriveSparse(0, NumArchitectureDeviceRegions, 0);
10constexpr inline const auto KMemoryRegionType_InterruptCpuInterface =
11 KMemoryRegionType_ArchDeviceBase.DeriveSparse(0, NumArchitectureDeviceRegions, 1)
12 .SetAttribute(KMemoryRegionAttr_NoUserMap);
13constexpr inline const auto KMemoryRegionType_InterruptDistributor =
14 KMemoryRegionType_ArchDeviceBase.DeriveSparse(0, NumArchitectureDeviceRegions, 2)
15 .SetAttribute(KMemoryRegionAttr_NoUserMap);
16static_assert(KMemoryRegionType_Uart.GetValue() == (0x1D));
17static_assert(KMemoryRegionType_InterruptCpuInterface.GetValue() ==
18 (0x2D | KMemoryRegionAttr_NoUserMap));
19static_assert(KMemoryRegionType_InterruptDistributor.GetValue() ==
20 (0x4D | KMemoryRegionAttr_NoUserMap));