support file based/sd partition emusd configs
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
#include <exosphere/secmon/secmon_monitor_context.hpp>
|
||||
|
||||
namespace ams::secmon {
|
||||
|
||||
struct ConfigurationContext {
|
||||
union {
|
||||
SecureMonitorConfiguration secmon_cfg;
|
||||
@@ -28,7 +27,7 @@ namespace ams::secmon {
|
||||
};
|
||||
union {
|
||||
EmummcConfiguration emummc_cfg;
|
||||
u8 _raw_emummc_config[0x128];
|
||||
u8 _raw_emummc_config[0x1A0];
|
||||
};
|
||||
u8 sealed_device_keys[pkg1::KeyGeneration_Max][se::AesBlockSize];
|
||||
u8 sealed_master_keys[pkg1::KeyGeneration_Max][se::AesBlockSize];
|
||||
|
||||
@@ -29,10 +29,9 @@ namespace ams::secmon {
|
||||
enum EmummcSdType : u32 {
|
||||
EmummcSdType_None = 0,
|
||||
EmummcSdType_Partition_Emmc = 3,
|
||||
// Not (currently) supported
|
||||
// EmummcSdType_Partition_Sd = 1,
|
||||
// EmummcSdType_File_Sd = 2,
|
||||
// EmummcSdType_File_Emmc = 4,
|
||||
EmummcSdType_Partition_Sd = 1,
|
||||
EmummcSdType_File_Sd = 2,
|
||||
EmummcSdType_File_Emmc = 4,
|
||||
};
|
||||
|
||||
enum EmummcMmc {
|
||||
@@ -121,8 +120,7 @@ namespace ams::secmon {
|
||||
EmummcSdBaseConfiguration base_cfg;
|
||||
union {
|
||||
EmummcPartitionConfiguration partition_cfg;
|
||||
/* File based currently not supported */
|
||||
/* EmummcFileConfiguration file_cfg */
|
||||
EmummcFileConfiguration file_cfg;
|
||||
};
|
||||
|
||||
constexpr bool IsValid() const {
|
||||
@@ -134,7 +132,7 @@ namespace ams::secmon {
|
||||
}
|
||||
};
|
||||
static_assert(util::is_pod<EmummcSdConfiguration>::value);
|
||||
static_assert(sizeof(EmummcSdConfiguration) == 0x18);
|
||||
static_assert(sizeof(EmummcSdConfiguration) == 0x90);
|
||||
|
||||
struct EmummcConfiguration {
|
||||
EmummcEmmcConfiguration emmc_cfg;
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace ams::secmon {
|
||||
constexpr bool IsValid() const { return this->magic == Magic; }
|
||||
};
|
||||
static_assert(util::is_pod<SecureMonitorStorageConfiguration>::value);
|
||||
static_assert(sizeof(SecureMonitorStorageConfiguration) == 0x148);
|
||||
static_assert(sizeof(SecureMonitorStorageConfiguration) == 0x1C0);
|
||||
|
||||
struct SecureMonitorConfiguration {
|
||||
ams::TargetFirmware target_firmware;
|
||||
|
||||
@@ -501,6 +501,7 @@ namespace ams::sdmmc::impl {
|
||||
if (!is_read) {
|
||||
#ifdef ATMOSPHERE_IS_EXOSPHERE
|
||||
/* Allow unaligned writes */
|
||||
/* TODO: bad */
|
||||
constexpr u32 MmcWriteSectorAlignment = 0;
|
||||
#else
|
||||
constexpr u32 MmcWriteSectorAlignment = 16_KB / SectorSize;
|
||||
|
||||
Reference in New Issue
Block a user