diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-12-19 21:28:44 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-12-21 07:05:34 -0500 |
| commit | 55e371a3a1ae14faae27e1c666e7c1311ad38b0e (patch) | |
| tree | 3efec5eebaa90808d8b0313b9e017945753eb47b /src/core/hle/kernel/process_capability.cpp | |
| parent | 4fbfde34a1675435426b54bf27bd6b1b8dcb5ff4 (diff) | |
kernel/process_capability: Handle kernel version capability flags
Diffstat (limited to 'src/core/hle/kernel/process_capability.cpp')
| -rw-r--r-- | src/core/hle/kernel/process_capability.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp index ef506b9f38..fb4467793d 100644 --- a/src/core/hle/kernel/process_capability.cpp +++ b/src/core/hle/kernel/process_capability.cpp @@ -315,7 +315,19 @@ ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) { } ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { - // TODO: Implement + // Yes, the internal member variable is checked in the actual kernel here. + // This might look odd for options that are only allowed to be initialized + // just once, however the kernel has a separate initialization function for + // kernel processes and userland processes. The kernel variant sets this + // member variable ahead of time. + + const u32 major_version = kernel_version >> 19; + + if (major_version != 0 || flags < 0x80000) { + return ERR_INVALID_CAPABILITY_DESCRIPTOR; + } + + kernel_version = flags; return RESULT_SUCCESS; } |
