Extend emc unlock
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Atmosphère-NX
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
* version 2, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __ACCESS_TABLE_NAME__ EmcAccessTable1
|
||||||
|
#define __ACCESS_TABLE_ADDRESS__ MemoryRegionPhysicalDeviceExternalMemoryController1.GetAddress()
|
||||||
|
#define __ACCESS_TABLE_INC__ "secmon_emc_access_table_data.inc"
|
||||||
|
|
||||||
|
#include "secmon_define_access_table.inc"
|
||||||
|
|
||||||
|
#undef __ACCESS_TABLE_INC__
|
||||||
|
#undef __ACCESS_TABLE_ADDRESS__
|
||||||
|
#undef __ACCESS_TABLE_NAME__
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Atmosphère-NX
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms and conditions of the GNU General Public License,
|
||||||
|
* version 2, as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define __ACCESS_TABLE_NAME__ EmcAccessTable2
|
||||||
|
#define __ACCESS_TABLE_ADDRESS__ MemoryRegionPhysicalDeviceExternalMemoryController2.GetAddress()
|
||||||
|
#define __ACCESS_TABLE_INC__ "secmon_emc_access_table_data.inc"
|
||||||
|
|
||||||
|
#include "secmon_define_access_table.inc"
|
||||||
|
|
||||||
|
#undef __ACCESS_TABLE_INC__
|
||||||
|
#undef __ACCESS_TABLE_ADDRESS__
|
||||||
|
#undef __ACCESS_TABLE_NAME__
|
||||||
@@ -965,3 +965,76 @@ SetRegisterAllowed(0xECC);
|
|||||||
SetRegisterAllowed(0xED0);
|
SetRegisterAllowed(0xED0);
|
||||||
SetRegisterAllowed(0xED4);
|
SetRegisterAllowed(0xED4);
|
||||||
SetRegisterAllowed(0xED8);
|
SetRegisterAllowed(0xED8);
|
||||||
|
SetRegisterAllowed(0xEDC);
|
||||||
|
SetRegisterAllowed(0xEE0);
|
||||||
|
SetRegisterAllowed(0xEE4);
|
||||||
|
SetRegisterAllowed(0xEE8);
|
||||||
|
SetRegisterAllowed(0xEEC);
|
||||||
|
SetRegisterAllowed(0xEF0);
|
||||||
|
SetRegisterAllowed(0xEF4);
|
||||||
|
SetRegisterAllowed(0xEF8);
|
||||||
|
SetRegisterAllowed(0xEFC);
|
||||||
|
SetRegisterAllowed(0xF00);
|
||||||
|
SetRegisterAllowed(0xF04);
|
||||||
|
SetRegisterAllowed(0xF08);
|
||||||
|
SetRegisterAllowed(0xF0C);
|
||||||
|
SetRegisterAllowed(0xF10);
|
||||||
|
SetRegisterAllowed(0xF14);
|
||||||
|
SetRegisterAllowed(0xF18);
|
||||||
|
SetRegisterAllowed(0xF1C);
|
||||||
|
SetRegisterAllowed(0xF20);
|
||||||
|
SetRegisterAllowed(0xF24);
|
||||||
|
SetRegisterAllowed(0xF28);
|
||||||
|
SetRegisterAllowed(0xF2C);
|
||||||
|
SetRegisterAllowed(0xF30);
|
||||||
|
SetRegisterAllowed(0xF34);
|
||||||
|
SetRegisterAllowed(0xF38);
|
||||||
|
SetRegisterAllowed(0xF3C);
|
||||||
|
SetRegisterAllowed(0xF40);
|
||||||
|
SetRegisterAllowed(0xF44);
|
||||||
|
SetRegisterAllowed(0xF48);
|
||||||
|
SetRegisterAllowed(0xF4C);
|
||||||
|
SetRegisterAllowed(0xF50);
|
||||||
|
SetRegisterAllowed(0xF54);
|
||||||
|
SetRegisterAllowed(0xF58);
|
||||||
|
SetRegisterAllowed(0xF5C);
|
||||||
|
SetRegisterAllowed(0xF60);
|
||||||
|
SetRegisterAllowed(0xF64);
|
||||||
|
SetRegisterAllowed(0xF68);
|
||||||
|
SetRegisterAllowed(0xF6C);
|
||||||
|
SetRegisterAllowed(0xF70);
|
||||||
|
SetRegisterAllowed(0xF74);
|
||||||
|
SetRegisterAllowed(0xF78);
|
||||||
|
SetRegisterAllowed(0xF7C);
|
||||||
|
SetRegisterAllowed(0xF80);
|
||||||
|
SetRegisterAllowed(0xF84);
|
||||||
|
SetRegisterAllowed(0xF88);
|
||||||
|
SetRegisterAllowed(0xF8C);
|
||||||
|
SetRegisterAllowed(0xF90);
|
||||||
|
SetRegisterAllowed(0xF94);
|
||||||
|
SetRegisterAllowed(0xF98);
|
||||||
|
SetRegisterAllowed(0xF9C);
|
||||||
|
SetRegisterAllowed(0xFA0);
|
||||||
|
SetRegisterAllowed(0xFA4);
|
||||||
|
SetRegisterAllowed(0xFA8);
|
||||||
|
SetRegisterAllowed(0xFAC);
|
||||||
|
SetRegisterAllowed(0xFB0);
|
||||||
|
SetRegisterAllowed(0xFB4);
|
||||||
|
SetRegisterAllowed(0xFB8);
|
||||||
|
SetRegisterAllowed(0xFBC);
|
||||||
|
SetRegisterAllowed(0xFC0);
|
||||||
|
SetRegisterAllowed(0xFC4);
|
||||||
|
SetRegisterAllowed(0xFC8);
|
||||||
|
SetRegisterAllowed(0xFCC);
|
||||||
|
SetRegisterAllowed(0xFD0);
|
||||||
|
SetRegisterAllowed(0xFD4);
|
||||||
|
SetRegisterAllowed(0xFD8);
|
||||||
|
SetRegisterAllowed(0xFDC);
|
||||||
|
SetRegisterAllowed(0xFE0);
|
||||||
|
SetRegisterAllowed(0xFE4);
|
||||||
|
SetRegisterAllowed(0xFE8);
|
||||||
|
SetRegisterAllowed(0xFEC);
|
||||||
|
SetRegisterAllowed(0xFF0);
|
||||||
|
SetRegisterAllowed(0xFF4);
|
||||||
|
SetRegisterAllowed(0xFF8);
|
||||||
|
SetRegisterAllowed(0xFFC);
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace ams::secmon {
|
|||||||
constexpr inline const MemoryRegion MemoryRegionPhysicalIramBootCode = MemoryRegion(UINT64_C(0x40020000), 0x20000);
|
constexpr inline const MemoryRegion MemoryRegionPhysicalIramBootCode = MemoryRegion(UINT64_C(0x40020000), 0x20000);
|
||||||
static_assert(MemoryRegionPhysicalIram.Contains(MemoryRegionPhysicalIramBootCode));
|
static_assert(MemoryRegionPhysicalIram.Contains(MemoryRegionPhysicalIramBootCode));
|
||||||
|
|
||||||
constexpr inline const MemoryRegion MemoryRegionVirtualDevice = MemoryRegion(UINT64_C(0x1F0040000), UINT64_C(0x40000));
|
constexpr inline const MemoryRegion MemoryRegionVirtualDevice = MemoryRegion(UINT64_C(0x1F0040000), UINT64_C(0x40000 + 0x2000));
|
||||||
static_assert(MemoryRegionVirtual.Contains(MemoryRegionVirtualDevice));
|
static_assert(MemoryRegionVirtual.Contains(MemoryRegionVirtualDevice));
|
||||||
|
|
||||||
constexpr inline const MemoryRegion MemoryRegionVirtualDeviceEmpty = MemoryRegion(MemoryRegionVirtualDevice.GetStartAddress(), 0);
|
constexpr inline const MemoryRegion MemoryRegionVirtualDeviceEmpty = MemoryRegion(MemoryRegionVirtualDevice.GetStartAddress(), 0);
|
||||||
@@ -155,7 +155,9 @@ namespace ams::secmon {
|
|||||||
HANDLER(Disp1, Sdmmc, UINT64_C(0x54200000), UINT64_C(0x3000), true, ## __VA_ARGS__) \
|
HANDLER(Disp1, Sdmmc, UINT64_C(0x54200000), UINT64_C(0x3000), true, ## __VA_ARGS__) \
|
||||||
HANDLER(Dsi, Disp1, UINT64_C(0x54300000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
HANDLER(Dsi, Disp1, UINT64_C(0x54300000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
||||||
HANDLER(MipiCal, Dsi, UINT64_C(0x700E3000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
HANDLER(MipiCal, Dsi, UINT64_C(0x700E3000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
||||||
HANDLER(Soctherm, MipiCal, UINT64_C(0x700E2000), UINT64_C(0x1000), true, ## __VA_ARGS__)
|
HANDLER(Soctherm, MipiCal, UINT64_C(0x700E2000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
||||||
|
HANDLER(ExternalMemoryController1, Soctherm, UINT64_C(0x7001e000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
||||||
|
HANDLER(ExternalMemoryController2, ExternalMemoryController1, UINT64_C(0x7001f000), UINT64_C(0x1000), true, ## __VA_ARGS__) \
|
||||||
|
|
||||||
#define DEFINE_DEVICE_REGION(_NAME_, _PREV_, _ADDRESS_, _SIZE_, _SECURE_) \
|
#define DEFINE_DEVICE_REGION(_NAME_, _PREV_, _ADDRESS_, _SIZE_, _SECURE_) \
|
||||||
constexpr inline const MemoryRegion MemoryRegionVirtualDevice##_NAME_ = MemoryRegion(MemoryRegionVirtualDevice##_PREV_.GetEndAddress() + 0x1000, _SIZE_); \
|
constexpr inline const MemoryRegion MemoryRegionVirtualDevice##_NAME_ = MemoryRegion(MemoryRegionVirtualDevice##_PREV_.GetEndAddress() + 0x1000, _SIZE_); \
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ namespace ams::secmon::smc {
|
|||||||
#include "secmon_define_pmc_access_table.inc"
|
#include "secmon_define_pmc_access_table.inc"
|
||||||
#include "secmon_define_mc_access_table.inc"
|
#include "secmon_define_mc_access_table.inc"
|
||||||
#include "secmon_define_emc_access_table.inc"
|
#include "secmon_define_emc_access_table.inc"
|
||||||
|
#include "secmon_define_emc1_access_table.inc"
|
||||||
|
#include "secmon_define_emc2_access_table.inc"
|
||||||
#include "secmon_define_soctherm_access_table.inc"
|
#include "secmon_define_soctherm_access_table.inc"
|
||||||
#include "secmon_define_mc01_access_table.inc"
|
#include "secmon_define_mc01_access_table.inc"
|
||||||
|
|
||||||
@@ -106,6 +108,8 @@ namespace ams::secmon::smc {
|
|||||||
{ PmcAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDevicePmc.GetAddress(), PmcAccessTable::Address, PmcAccessTable::Size, },
|
{ PmcAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDevicePmc.GetAddress(), PmcAccessTable::Address, PmcAccessTable::Size, },
|
||||||
{ McAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDeviceMemoryController.GetAddress(), McAccessTable::Address, McAccessTable::Size, },
|
{ McAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDeviceMemoryController.GetAddress(), McAccessTable::Address, McAccessTable::Size, },
|
||||||
{ EmcAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDeviceExternalMemoryController.GetAddress(), EmcAccessTable::Address, EmcAccessTable::Size, },
|
{ EmcAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDeviceExternalMemoryController.GetAddress(), EmcAccessTable::Address, EmcAccessTable::Size, },
|
||||||
|
{ EmcAccessTable1::ReducedAccessTable.data(), MemoryRegionVirtualDeviceExternalMemoryController1.GetAddress(), EmcAccessTable1::Address, EmcAccessTable1::Size, },
|
||||||
|
{ EmcAccessTable2::ReducedAccessTable.data(), MemoryRegionVirtualDeviceExternalMemoryController2.GetAddress(), EmcAccessTable2::Address, EmcAccessTable2::Size, },
|
||||||
{ SocthermAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDeviceSoctherm.GetAddress(), SocthermAccessTable::Address, SocthermAccessTable::Size, },
|
{ SocthermAccessTable::ReducedAccessTable.data(), MemoryRegionVirtualDeviceSoctherm.GetAddress(), SocthermAccessTable::Address, SocthermAccessTable::Size, },
|
||||||
{ Mc01AccessTable::ReducedAccessTable.data(), Mc01AccessTable::Address + MemoryRegionVirtualDeviceMemoryController0.GetAddress(), Mc01AccessTable::Address + MemoryRegionPhysicalDeviceMemoryController0.GetAddress(), Mc01AccessTable::Size, },
|
{ Mc01AccessTable::ReducedAccessTable.data(), Mc01AccessTable::Address + MemoryRegionVirtualDeviceMemoryController0.GetAddress(), Mc01AccessTable::Address + MemoryRegionPhysicalDeviceMemoryController0.GetAddress(), Mc01AccessTable::Size, },
|
||||||
{ Mc01AccessTable::ReducedAccessTable.data(), Mc01AccessTable::Address + MemoryRegionVirtualDeviceMemoryController1.GetAddress(), Mc01AccessTable::Address + MemoryRegionPhysicalDeviceMemoryController1.GetAddress(), Mc01AccessTable::Size, },
|
{ Mc01AccessTable::ReducedAccessTable.data(), Mc01AccessTable::Address + MemoryRegionVirtualDeviceMemoryController1.GetAddress(), Mc01AccessTable::Address + MemoryRegionPhysicalDeviceMemoryController1.GetAddress(), Mc01AccessTable::Size, },
|
||||||
|
|||||||
Reference in New Issue
Block a user