diff --git a/libxenia.vcxproj b/libxenia.vcxproj index ec7bcd3aa..3ce383cf0 100644 --- a/libxenia.vcxproj +++ b/libxenia.vcxproj @@ -176,6 +176,7 @@ + diff --git a/libxenia.vcxproj.filters b/libxenia.vcxproj.filters index c888fa31e..f5850d60c 100644 --- a/libxenia.vcxproj.filters +++ b/libxenia.vcxproj.filters @@ -718,6 +718,9 @@ src\xenia\kernel + + src\xenia\kernel + diff --git a/src/xenia/kernel/xboxkrnl_crypt.cc b/src/xenia/kernel/xboxkrnl_crypt.cc new file mode 100644 index 000000000..a7d25ea72 --- /dev/null +++ b/src/xenia/kernel/xboxkrnl_crypt.cc @@ -0,0 +1,46 @@ +/** +****************************************************************************** +* Xenia : Xbox 360 Emulator Research Project * +****************************************************************************** +* Copyright 2015 Ben Vanik. All rights reserved. * +* Released under the BSD license - see LICENSE in the root for more details. * +****************************************************************************** +*/ + +#include "xenia/base/logging.h" +#include "xenia/kernel/kernel_state.h" +#include "xenia/kernel/util/shim_utils.h" +#include "xenia/kernel/xboxkrnl_private.h" +#include "xenia/xbox.h" + +namespace xe { +namespace kernel { + +typedef struct { + xe::be count; + xe::be state[5]; + xe::be buffer[64]; +} XECRYPT_SHA_STATE; + +void XeCryptShaInit(pointer_t sha_state) { + sha_state.Zero(); +} +DECLARE_XBOXKRNL_EXPORT(XeCryptShaInit, ExportTag::kStub); + +void XeCryptShaUpdate(pointer_t sha_state, + lpvoid_t input, dword_t input_size) { + +} +DECLARE_XBOXKRNL_EXPORT(XeCryptShaUpdate, ExportTag::kStub); + +void XeCryptShaFinal(pointer_t sha_state, lpvoid_t out, + dword_t out_size) { + +} +DECLARE_XBOXKRNL_EXPORT(XeCryptShaFinal, ExportTag::kStub); + +void xe::kernel::xboxkrnl::RegisterCryptExports( + xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state) {} + +} // namespace kernel +} // namespace xe \ No newline at end of file diff --git a/src/xenia/kernel/xboxkrnl_module.cc b/src/xenia/kernel/xboxkrnl_module.cc index c14cbcdfc..8385d9a56 100644 --- a/src/xenia/kernel/xboxkrnl_module.cc +++ b/src/xenia/kernel/xboxkrnl_module.cc @@ -30,6 +30,7 @@ XboxkrnlModule::XboxkrnlModule(Emulator* emulator, KernelState* kernel_state) // Register all exported functions. xboxkrnl::RegisterAudioExports(export_resolver_, kernel_state_); xboxkrnl::RegisterAudioXmaExports(export_resolver_, kernel_state_); + xboxkrnl::RegisterCryptExports(export_resolver_, kernel_state_); xboxkrnl::RegisterDebugExports(export_resolver_, kernel_state_); xboxkrnl::RegisterErrorExports(export_resolver_, kernel_state_); xboxkrnl::RegisterHalExports(export_resolver_, kernel_state_); diff --git a/src/xenia/kernel/xboxkrnl_private.h b/src/xenia/kernel/xboxkrnl_private.h index be0ff9267..97e2c01cf 100644 --- a/src/xenia/kernel/xboxkrnl_private.h +++ b/src/xenia/kernel/xboxkrnl_private.h @@ -25,6 +25,8 @@ void RegisterAudioExports(xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state); void RegisterAudioXmaExports(xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state); +void RegisterCryptExports(xe::cpu::ExportResolver* export_resolver, + KernelState* kernel_state); void RegisterDebugExports(xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state); void RegisterErrorExports(xe::cpu::ExportResolver* export_resolver,