spl: Finish implementing EsService.

This commit is contained in:
Michael Scire 2019-04-24 23:42:32 -07:00
parent 0a194cb6a6
commit 99106076e6
5 changed files with 89 additions and 10 deletions

View file

@ -25,6 +25,9 @@ class SmcWrapper {
static inline u32 GetCryptAesMode(SmcCipherMode mode, u32 keyslot) {
return static_cast<u32>((mode << 4) | (keyslot & 7));
}
static inline u32 GetUnwrapEsKeyOption(EsKeyType type, u32 generation) {
return static_cast<u32>((type << 6) | (generation & 0x3F));
}
public:
static SmcResult SetConfig(SplConfigItem which, const u64 *value, size_t num_qwords);
static SmcResult GetConfig(u64 *out, size_t num_qwords, SplConfigItem which);