spl: update for new-ipc (fixes two bugs in sf)

This commit is contained in:
Michael Scire
2019-10-16 12:50:04 -07:00
committed by SciresM
parent 59140d8dfa
commit 635ae4e3da
23 changed files with 377 additions and 311 deletions

View File

@@ -21,7 +21,7 @@
namespace sts::spl {
class GeneralService : public IServiceObject {
class GeneralService : public sf::IServiceObject {
protected:
enum class CommandId {
/* 1.0.0+ */
@@ -32,6 +32,7 @@ namespace sts::spl {
GenerateAesKey = 4,
SetConfig = 5,
GenerateRandomBytes = 7,
ImportLotusKeyDeprecated = 9,
ImportLotusKey = 9,
DecryptLotusMessage = 10,
IsDevelopment = 11,
@@ -41,6 +42,7 @@ namespace sts::spl {
DecryptAesKey = 14,
CryptAesCtr = 15,
ComputeCmac = 16,
ImportEsKeyDeprecated = 17,
ImportEsKey = 17,
UnwrapTitleKey = 18,
LoadTitleKey = 19,
@@ -72,22 +74,22 @@ namespace sts::spl {
virtual ~GeneralService() { /* ... */ }
protected:
/* Actual commands. */
virtual Result GetConfig(Out<u64> out, u32 which);
virtual Result ExpMod(OutPointerWithClientSize<u8> out, InPointer<u8> base, InPointer<u8> exp, InPointer<u8> mod);
virtual Result GetConfig(sf::Out<u64> out, u32 which);
virtual Result ExpMod(const sf::OutPointerBuffer &out, const sf::InPointerBuffer &base, const sf::InPointerBuffer &exp, const sf::InPointerBuffer &mod);
virtual Result SetConfig(u32 which, u64 value);
virtual Result GenerateRandomBytes(OutPointerWithClientSize<u8> out);
virtual Result IsDevelopment(Out<bool> is_dev);
virtual Result GenerateRandomBytes(const sf::OutPointerBuffer &out);
virtual Result IsDevelopment(sf::Out<bool> is_dev);
virtual Result SetBootReason(BootReasonValue boot_reason);
virtual Result GetBootReason(Out<BootReasonValue> out);
virtual Result GetBootReason(sf::Out<BootReasonValue> out);
public:
DEFINE_SERVICE_DISPATCH_TABLE {
MAKE_SERVICE_COMMAND_META(GeneralService, GetConfig),
MAKE_SERVICE_COMMAND_META(GeneralService, ExpMod),
MAKE_SERVICE_COMMAND_META(GeneralService, SetConfig),
MAKE_SERVICE_COMMAND_META(GeneralService, GenerateRandomBytes),
MAKE_SERVICE_COMMAND_META(GeneralService, IsDevelopment),
MAKE_SERVICE_COMMAND_META(GeneralService, SetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(GeneralService, GetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(GetConfig),
MAKE_SERVICE_COMMAND_META(ExpMod),
MAKE_SERVICE_COMMAND_META(SetConfig),
MAKE_SERVICE_COMMAND_META(GenerateRandomBytes),
MAKE_SERVICE_COMMAND_META(IsDevelopment),
MAKE_SERVICE_COMMAND_META(SetBootReason, hos::Version_300),
MAKE_SERVICE_COMMAND_META(GetBootReason, hos::Version_300),
};
};