summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2019-12-10 21:48:37 -0500
committerGravatar GitHub2019-12-10 21:48:37 -0500
commit34f8881d3e0e4fa99e9bb2838be19abcbc033e4e (patch)
tree957d1b1e5889e4cfdbd23f578595761155b5e5de /src
parentMerge pull request #3211 from FernandoS27/depth-mode (diff)
parentkernel/svc: Provide implementations for svcDumpInfo/svcDumpInfoNew (diff)
downloadyuzu-34f8881d3e0e4fa99e9bb2838be19abcbc033e4e.tar.gz
yuzu-34f8881d3e0e4fa99e9bb2838be19abcbc033e4e.tar.xz
yuzu-34f8881d3e0e4fa99e9bb2838be19abcbc033e4e.zip
Merge pull request #3201 from lioncash/dump
kernel/svc: Provide implementations for svcDumpInfo/svcDumpInfoNew
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/svc.cpp15
-rw-r--r--src/core/hle/kernel/svc_wrap.h11
2 files changed, 24 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index bd25de478..35ff26c39 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1781,6 +1781,17 @@ static ResultCode SignalToAddress(Core::System& system, VAddr address, u32 type,
1781 return address_arbiter.SignalToAddress(address, signal_type, value, num_to_wake); 1781 return address_arbiter.SignalToAddress(address, signal_type, value, num_to_wake);
1782} 1782}
1783 1783
1784static void KernelDebug([[maybe_unused]] Core::System& system,
1785 [[maybe_unused]] u32 kernel_debug_type, [[maybe_unused]] u64 param1,
1786 [[maybe_unused]] u64 param2, [[maybe_unused]] u64 param3) {
1787 // Intentionally do nothing, as this does nothing in released kernel binaries.
1788}
1789
1790static void ChangeKernelTraceState([[maybe_unused]] Core::System& system,
1791 [[maybe_unused]] u32 trace_state) {
1792 // Intentionally do nothing, as this does nothing in released kernel binaries.
1793}
1794
1784/// This returns the total CPU ticks elapsed since the CPU was powered-on 1795/// This returns the total CPU ticks elapsed since the CPU was powered-on
1785static u64 GetSystemTick(Core::System& system) { 1796static u64 GetSystemTick(Core::System& system) {
1786 LOG_TRACE(Kernel_SVC, "called"); 1797 LOG_TRACE(Kernel_SVC, "called");
@@ -2418,8 +2429,8 @@ static const FunctionDef SVC_Table[] = {
2418 {0x39, nullptr, "Unknown"}, 2429 {0x39, nullptr, "Unknown"},
2419 {0x3A, nullptr, "Unknown"}, 2430 {0x3A, nullptr, "Unknown"},
2420 {0x3B, nullptr, "Unknown"}, 2431 {0x3B, nullptr, "Unknown"},
2421 {0x3C, nullptr, "DumpInfo"}, 2432 {0x3C, SvcWrap<KernelDebug>, "KernelDebug"},
2422 {0x3D, nullptr, "DumpInfoNew"}, 2433 {0x3D, SvcWrap<ChangeKernelTraceState>, "ChangeKernelTraceState"},
2423 {0x3E, nullptr, "Unknown"}, 2434 {0x3E, nullptr, "Unknown"},
2424 {0x3F, nullptr, "Unknown"}, 2435 {0x3F, nullptr, "Unknown"},
2425 {0x40, nullptr, "CreateSession"}, 2436 {0x40, nullptr, "CreateSession"},
diff --git a/src/core/hle/kernel/svc_wrap.h b/src/core/hle/kernel/svc_wrap.h
index c2d8d0dc3..9452e3b6f 100644
--- a/src/core/hle/kernel/svc_wrap.h
+++ b/src/core/hle/kernel/svc_wrap.h
@@ -311,6 +311,17 @@ void SvcWrap(Core::System& system) {
311 func(system); 311 func(system);
312} 312}
313 313
314template <void func(Core::System&, u32)>
315void SvcWrap(Core::System& system) {
316 func(system, static_cast<u32>(Param(system, 0)));
317}
318
319template <void func(Core::System&, u32, u64, u64, u64)>
320void SvcWrap(Core::System& system) {
321 func(system, static_cast<u32>(Param(system, 0)), Param(system, 1), Param(system, 2),
322 Param(system, 3));
323}
324
314template <void func(Core::System&, s64)> 325template <void func(Core::System&, s64)>
315void SvcWrap(Core::System& system) { 326void SvcWrap(Core::System& system) {
316 func(system, static_cast<s64>(Param(system, 0))); 327 func(system, static_cast<s64>(Param(system, 0)));