mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 12:53:03 +00:00
kernel/process_capability: Handle kernel version capability flags
This commit is contained in:
parent
010bc677f3
commit
e0e84aede0
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,11 @@ public:
|
|||
return program_type;
|
||||
}
|
||||
|
||||
/// Gets the kernel version value.
|
||||
u32 GetKernelVersion() const {
|
||||
return kernel_version;
|
||||
}
|
||||
|
||||
private:
|
||||
/// Attempts to parse a given sequence of capability descriptors.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue