spl: Implement non-Lotus FsService commands.

This commit is contained in:
Michael Scire 2019-04-25 00:33:10 -07:00
parent 5633444d5e
commit 85e8506fa8
7 changed files with 140 additions and 3 deletions

View file

@ -168,7 +168,7 @@ SmcResult SmcWrapper::CryptAes(AsyncOperationKey *out_op, u32 mode, const IvCtr
return static_cast<SmcResult>(args.X[0]);
}
SmcResult SmcWrapper::GenerateSpecificAesKey(u64 *out, const KeySource &source, u32 generation, u32 which) {
SmcResult SmcWrapper::GenerateSpecificAesKey(AesKey *out_key, const KeySource &source, u32 generation, u32 which) {
SecmonArgs args;
args.X[0] = SmcFunctionId_GenerateSpecificAesKey;
@ -178,6 +178,8 @@ SmcResult SmcWrapper::GenerateSpecificAesKey(u64 *out, const KeySource &source,
args.X[4] = which;
svcCallSecureMonitor(&args);
out_key->data64[0] = args.X[1];
out_key->data64[1] = args.X[2];
return static_cast<SmcResult>(args.X[0]);
}