kern: add version bounds checking

This commit is contained in:
Michael Scire authored and SciresM committed 2020-08-18 15:17:40 -07:00
1 parent 56ec55f3c4
commit 47f2e93a42
5 files changed
+79 -4

No files matched your search

@@ -354,6 +354,10 @@ namespace ams::kern {
constexpr bool CanForceDebug() const {
return this->debug_capabilities.Get<DebugFlags::ForceDebug>();
}
constexpr u32 GetIntendedKernelMajorVersion() const { return this->intended_kernel_version.Get<KernelVersion::MajorVersion>(); }
constexpr u32 GetIntendedKernelMinorVersion() const { return this->intended_kernel_version.Get<KernelVersion::MinorVersion>(); }
constexpr u32 GetIntendedKernelVersion() const { return ams::svc::EncodeKernelVersion(this->GetIntendedKernelMajorVersion(), this->GetIntendedKernelMinorVersion()); }
};
}