diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-19 01:38:30 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-03-21 22:45:02 +0100 |
commit | c17beefe3d1e4850b3518a45892c0c5c6e11c95a (patch) | |
tree | bd4a0f20b6f95f0394a7777e86ceffd1dcd9ba10 /src/core/hle/kernel/arch/arm64 | |
parent | hle: kernel: KMemoryRegion: Derive region values. (diff) | |
download | yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.gz yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.bz2 yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.lz yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.xz yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.tar.zst yuzu-c17beefe3d1e4850b3518a45892c0c5c6e11c95a.zip |
Diffstat (limited to 'src/core/hle/kernel/arch/arm64')
-rw-r--r-- | src/core/hle/kernel/arch/arm64/k_memory_region_device_types.inc | 20 |
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 @@ +// Copyright 2021 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +// All architectures must define NumArchitectureDeviceRegions. +constexpr inline const auto NumArchitectureDeviceRegions = 3; + +constexpr inline const auto KMemoryRegionType_Uart = + KMemoryRegionType_ArchDeviceBase.DeriveSparse(0, NumArchitectureDeviceRegions, 0); +constexpr inline const auto KMemoryRegionType_InterruptCpuInterface = + KMemoryRegionType_ArchDeviceBase.DeriveSparse(0, NumArchitectureDeviceRegions, 1) + .SetAttribute(KMemoryRegionAttr_NoUserMap); +constexpr inline const auto KMemoryRegionType_InterruptDistributor = + KMemoryRegionType_ArchDeviceBase.DeriveSparse(0, NumArchitectureDeviceRegions, 2) + .SetAttribute(KMemoryRegionAttr_NoUserMap); +static_assert(KMemoryRegionType_Uart.GetValue() == (0x1D)); +static_assert(KMemoryRegionType_InterruptCpuInterface.GetValue() == + (0x2D | KMemoryRegionAttr_NoUserMap)); +static_assert(KMemoryRegionType_InterruptDistributor.GetValue() == + (0x4D | KMemoryRegionAttr_NoUserMap)); |