exo2: implement SmcGenerateAesKek, SmcLoadAesKey

This commit is contained in:
Michael Scire 2020-05-15 11:10:28 -07:00 committed by SciresM
parent 864b6085a8
commit bf546d5fb3
8 changed files with 239 additions and 65 deletions

View file

@ -35,6 +35,12 @@ namespace ams::secmon::smc {
PsciAlreadyOn = static_cast<u32>(-4),
};
#define SMC_R_SUCCEEEDED(res) (res == SmcResult::Success)
#define SMC_R_FAILED(res) (res != SmcResult::Success)
#define SMC_R_TRY(res_expr) ({ const auto _tmp_r_try_rc = (res_expr); if (SMC_R_FAILED(_tmp_r_try_rc)) { return _tmp_r_try_rc; } })
#define SMC_R_UNLESS(cond, RES) ({ if (!(cond)) { return SmcResult::RES; }})
struct SmcArguments {
u64 r[8];
};