mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-06-30 00:45:42 +02:00
[service, spl] handle spl:mig AES generation commands
This commit is contained in:
parent
2861f27e2f
commit
2c1c67dd3b
3 changed files with 40 additions and 2 deletions
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
|
@ -28,9 +31,9 @@ SPL_MIG::SPL_MIG(Core::System& system_, std::shared_ptr<Module> module_)
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &SPL::GetConfig, "GetConfig"},
|
{0, &SPL::GetConfig, "GetConfig"},
|
||||||
{1, &SPL::ModularExponentiate, "ModularExponentiate"},
|
{1, &SPL::ModularExponentiate, "ModularExponentiate"},
|
||||||
{2, nullptr, "GenerateAesKek"},
|
{2, &SPL::GenerateAesKek, "GenerateAesKek"},
|
||||||
{3, nullptr, "LoadAesKey"},
|
{3, nullptr, "LoadAesKey"},
|
||||||
{4, nullptr, "GenerateAesKey"},
|
{4, &SPL::GenerateAesKey, "GenerateAesKey"},
|
||||||
{5, &SPL::SetConfig, "SetConfig"},
|
{5, &SPL::SetConfig, "SetConfig"},
|
||||||
{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"},
|
{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"},
|
||||||
{11, &SPL::IsDevelopment, "IsDevelopment"},
|
{11, &SPL::IsDevelopment, "IsDevelopment"},
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,36 @@ void Module::Interface::ModularExponentiate(HLERequestContext& ctx) {
|
||||||
rb.Push(ResultSecureMonitorNotImplemented);
|
rb.Push(ResultSecureMonitorNotImplemented);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Module::Interface::GenerateAesKek(HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
[[maybe_unused]] const auto key_source = rp.PopRaw<KeySource>();
|
||||||
|
const auto generation = rp.Pop<u32>();
|
||||||
|
const auto option = rp.Pop<u32>();
|
||||||
|
|
||||||
|
LOG_WARNING(Service_SPL, "(STUBBED) called, generation={:#x}, option={:#x}", generation,
|
||||||
|
option);
|
||||||
|
|
||||||
|
AccessKey access_key{};
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushRaw(access_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Module::Interface::GenerateAesKey(HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
[[maybe_unused]] const auto access_key = rp.PopRaw<AccessKey>();
|
||||||
|
[[maybe_unused]] const auto key_source = rp.PopRaw<KeySource>();
|
||||||
|
|
||||||
|
LOG_WARNING(Service_SPL, "(STUBBED) called");
|
||||||
|
|
||||||
|
AesKey aes_key{};
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 6};
|
||||||
|
rb.Push(ResultSuccess);
|
||||||
|
rb.PushRaw(aes_key);
|
||||||
|
}
|
||||||
|
|
||||||
void Module::Interface::SetConfig(HLERequestContext& ctx) {
|
void Module::Interface::SetConfig(HLERequestContext& ctx) {
|
||||||
UNIMPLEMENTED_MSG("SetConfig is not implemented!");
|
UNIMPLEMENTED_MSG("SetConfig is not implemented!");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
|
@ -25,6 +28,8 @@ public:
|
||||||
// General
|
// General
|
||||||
void GetConfig(HLERequestContext& ctx);
|
void GetConfig(HLERequestContext& ctx);
|
||||||
void ModularExponentiate(HLERequestContext& ctx);
|
void ModularExponentiate(HLERequestContext& ctx);
|
||||||
|
void GenerateAesKek(HLERequestContext& ctx);
|
||||||
|
void GenerateAesKey(HLERequestContext& ctx);
|
||||||
void SetConfig(HLERequestContext& ctx);
|
void SetConfig(HLERequestContext& ctx);
|
||||||
void GenerateRandomBytes(HLERequestContext& ctx);
|
void GenerateRandomBytes(HLERequestContext& ctx);
|
||||||
void IsDevelopment(HLERequestContext& ctx);
|
void IsDevelopment(HLERequestContext& ctx);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue