exo2: implement SmcGetConfig
This commit is contained in:
@@ -45,6 +45,14 @@ namespace ams::secmon {
|
||||
EmummcType type;
|
||||
u32 id;
|
||||
u32 fs_version;
|
||||
|
||||
constexpr bool IsValid() const {
|
||||
return this->magic == Magic;
|
||||
}
|
||||
|
||||
constexpr bool IsEmummcActive() const {
|
||||
return this->IsValid() && this->type != EmummcType_None;
|
||||
}
|
||||
};
|
||||
static_assert(util::is_pod<EmummcBaseConfiguration>::value);
|
||||
static_assert(sizeof(EmummcBaseConfiguration) == 0x10);
|
||||
@@ -66,6 +74,14 @@ namespace ams::secmon {
|
||||
EmummcFileConfiguration file_cfg;
|
||||
};
|
||||
EmummcFilePath emu_dir_path;
|
||||
|
||||
constexpr bool IsValid() const {
|
||||
return this->base_cfg.IsValid();
|
||||
}
|
||||
|
||||
constexpr bool IsEmummcActive() const {
|
||||
return this->base_cfg.IsEmummcActive();
|
||||
}
|
||||
};
|
||||
static_assert(util::is_pod<EmummcConfiguration>::value);
|
||||
static_assert(sizeof(EmummcConfiguration) <= 0x200);
|
||||
|
||||
@@ -65,6 +65,8 @@ namespace ams::secmon {
|
||||
constexpr bool EnableUserModePerformanceCounterAccess() const { return (this->flags & SecureMonitorConfigurationFlag_EnableUserModePerformanceCounterAccess) != 0; }
|
||||
constexpr bool ShouldUseBlankCalibrationBinary() const { return (this->flags & SecureMonitorConfigurationFlag_ShouldUseBlankCalibrationBinary) != 0; }
|
||||
constexpr bool AllowWritingToCalibrationBinarySysmmc() const { return (this->flags & SecureMonitorConfigurationFlag_AllowWritingToCalibrationBinarySysmmc) != 0; }
|
||||
|
||||
constexpr bool IsDevelopmentFunctionEnabled(bool for_kern) const { return for_kern ? this->IsDevelopmentFunctionEnabledForKernel() : this->IsDevelopmentFunctionEnabledForUser(); }
|
||||
};
|
||||
static_assert(util::is_pod<SecureMonitorConfiguration>::value);
|
||||
static_assert(sizeof(SecureMonitorConfiguration) == 0x80);
|
||||
|
||||
Reference in New Issue
Block a user