kern/strat: update for new DebugFlags capability semantics

This commit is contained in:
Michael Scire
2024-10-09 16:50:20 -07:00
parent 52bc54205b
commit dfff4508fa
17 changed files with 142 additions and 110 deletions

View File

@@ -168,9 +168,10 @@ namespace ams::kern {
struct DebugFlags {
using IdBits = Field<0, CapabilityId<CapabilityType::DebugFlags> + 1>;
DEFINE_FIELD(AllowDebug, IdBits, 1, bool);
DEFINE_FIELD(ForceDebug, AllowDebug, 1, bool);
DEFINE_FIELD(Reserved, ForceDebug, 13);
DEFINE_FIELD(AllowDebug, IdBits, 1, bool);
DEFINE_FIELD(ForceDebugProd, AllowDebug, 1, bool);
DEFINE_FIELD(ForceDebug, ForceDebugProd, 1, bool);
DEFINE_FIELD(Reserved, ForceDebug, 12);
};
#undef DEFINE_FIELD
@@ -255,6 +256,10 @@ namespace ams::kern {
return m_debug_capabilities.Get<DebugFlags::AllowDebug>();
}
constexpr bool CanForceDebugProd() const {
return m_debug_capabilities.Get<DebugFlags::ForceDebugProd>();
}
constexpr bool CanForceDebug() const {
return m_debug_capabilities.Get<DebugFlags::ForceDebug>();
}