From 339dd49c209d95fca8f6eb6512f674f5f25f0c30 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 11 Jun 2020 19:28:38 -0700 Subject: [PATCH] exo2: address volca review commentary --- libexosphere/include/exosphere/se/se_hash.hpp | 2 +- libexosphere/include/exosphere/tegra/tegra_mc.hpp | 5 +++-- libexosphere/source/se/se_execute.cpp | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libexosphere/include/exosphere/se/se_hash.hpp b/libexosphere/include/exosphere/se/se_hash.hpp index 934ced60..e8eed4dd 100644 --- a/libexosphere/include/exosphere/se/se_hash.hpp +++ b/libexosphere/include/exosphere/se/se_hash.hpp @@ -21,7 +21,7 @@ namespace ams::se { constexpr inline int Sha256HashSize = crypto::Sha256Generator::HashSize; union Sha256Hash { - u8 bytes[Sha256HashSize / sizeof( u8)]; + u8 bytes[Sha256HashSize / sizeof(u8) ]; u32 words[Sha256HashSize / sizeof(u32)]; }; diff --git a/libexosphere/include/exosphere/tegra/tegra_mc.hpp b/libexosphere/include/exosphere/tegra/tegra_mc.hpp index 72947de8..107bf548 100644 --- a/libexosphere/include/exosphere/tegra/tegra_mc.hpp +++ b/libexosphere/include/exosphere/tegra/tegra_mc.hpp @@ -544,7 +544,8 @@ DEFINE_MC_REG_BIT_ENUM(CLIENT_ACCESS4_TSECWRB, (135 - (MC_CLIENT_ACCESS_N DEFINE_MC_REG_BIT_ENUM(CLIENT_ACCESS4_GPUSRD2, (136 - (MC_CLIENT_ACCESS_NUM_CLIENTS * 4)), DISABLE, ENABLE); DEFINE_MC_REG_BIT_ENUM(CLIENT_ACCESS4_GPUSWR2, (137 - (MC_CLIENT_ACCESS_NUM_CLIENTS * 4)), DISABLE, ENABLE); -constexpr inline u32 MC_IRAM_BOM_WRITE_MASK = 0xFFFFF000u; -constexpr inline u32 MC_IRAM_TOM_WRITE_MASK = 0xFFFFF000u; +DEFINE_MC_REG(IRAM_BOM_IRAM_BOM, 12, BITSIZEOF(u32) - 12); +DEFINE_MC_REG(IRAM_TOM_IRAM_TOM, 12, BITSIZEOF(u32) - 12); DEFINE_MC_REG_BIT_ENUM(IRAM_REG_CTRL_IRAM_CFG_WRITE_ACCESS, 0, ENABLED, DISABLED); + diff --git a/libexosphere/source/se/se_execute.cpp b/libexosphere/source/se/se_execute.cpp index 4f811ee8..29e42dfb 100644 --- a/libexosphere/source/se/se_execute.cpp +++ b/libexosphere/source/se/se_execute.cpp @@ -26,6 +26,7 @@ namespace ams::se { u32 size; }; static_assert(util::is_pod::value); + static_assert(sizeof(LinkedListEntry) == 0xC); uintptr_t GetPhysicalAddress(const void *ptr) { const uintptr_t virt_address = reinterpret_cast(ptr);