aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 15:17:39 -0400
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-10-27 15:17:39 -0400
commit559dfe7bb24d95fbbc32fd571c7f53e13e42342c (patch)
treef609afa83501aa72af800654f0695ccaa514a6ef /src/core/hle/kernel
parent3063037b9945c3d5d3b9b34d02764c93103ebb27 (diff)
Switch 2 GPU memory: svc 0x80, gpu sub-session jobs, VM range, SM 0x808
- svc 0x80 (address, size, mask 0x20, attr 0x20) marks memory GPU accessible for nn::gpu::sdk::CreateGpuAccessibleMemory; accept it. - gpu 22's sub-session is served by the gpu object; sub 101 registers memory, sub 211 submits a job whose id event is signalled at once. - gpu 203 reports [0x8000000, 0xC000000000) as the in-process VirtualMachine range that serves AllocSpace (NVN reserves fixed VA at 0x8000000 up to 512 GiB). - Report SM 0x808: NVN2's engine class table is only returned for it. With this NVN device init allocates its GPU memory and opens /dev/nvhost-tsg-gpu.
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/svc.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index d2e45fabb6..0d4b2937c2 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -2512,7 +2512,14 @@ void Call(Core::System& system, u32 imm) {
LOG_INFO(Kernel_SVC, "svc {:#04x} in [0]={:#x} [1]={:#x} [2]={:#x} [3]={:#x}", imm,
GetArg64(args, 0), GetArg64(args, 1), GetArg64(args, 2), GetArg64(args, 3));
}
- if (process.Is64Bit()) {
+ if (imm == 0x80) {
+ // Switch 2 only. nn::gpu::sdk::CreateGpuAccessibleMemory and nn::gs native memory call it
+ // as (address, size, mask = 0x20, attr = 0x20), like svcSetMemoryAttribute with a new
+ // "GPU accessible" attribute. Emulated guest memory is always GPU-visible: accept it.
+ LOG_WARNING(Kernel_SVC, "(STUBBED) Switch 2 svc 0x80 addr={:#x} size={:#x} mask={:#x} attr={:#x}",
+ GetArg64(args, 0), GetArg64(args, 1), GetArg64(args, 2), GetArg64(args, 3));
+ args[0] = 0;
+ } else if (process.Is64Bit()) {
Call64(system, imm, args);
} else {
Call32(system, imm, args);