34 #ifndef ARM_OCSD_PE_CONTEXT_H_INCLUDED 35 #define ARM_OCSD_PE_CONTEXT_H_INCLUDED 37 #include "opencsd/ocsd_if_types.h" 57 void setSecLevel(
const ocsd_sec_level sl) { m_context.security_level = sl; };
58 void setEL(
const ocsd_ex_level el) { m_context.exception_level = el; m_context.el_valid = el > ocsd_EL_unknown ? 1 : 0; };
59 void setCtxtID(
const uint32_t
id) { m_context.context_id = id; m_context.ctxt_id_valid = 1; };
60 void setVMID(
const uint32_t
id) { m_context.vmid = id; m_context.vmid_valid = 1; };
61 void set64bit(
const bool is64bit) { m_context.bits64 = is64bit ? 1 : 0; };
63 const ocsd_sec_level
getSecLevel()
const {
return m_context.security_level; };
64 const ocsd_ex_level
getEL()
const {
return m_context.exception_level; };
65 const bool ELvalid()
const {
return (m_context.el_valid == 1); };
66 const uint32_t
getCtxtID()
const {
return (m_context.ctxt_id_valid == 1) ? m_context.context_id : 0; };
67 const bool ctxtIDvalid()
const {
return (m_context.ctxt_id_valid == 1); };
68 const uint32_t
getVMID()
const {
return (m_context.vmid_valid == 1) ? m_context.vmid : 0; };
69 const bool VMIDvalid()
const {
return (m_context.vmid_valid == 1); };
72 operator const ocsd_pe_context &()
const {
return m_context; };
75 ocsd_pe_context m_context;
92 m_context.context_id = 0;
93 m_context.ctxt_id_valid = 0;
94 m_context.el_valid = 0;
95 m_context.exception_level = ocsd_EL_unknown;
96 m_context.security_level = ocsd_sec_secure;
98 m_context.vmid_valid = 0;
109 m_context = *context;
114 #endif // ARM_OCSD_PE_CONTEXT_H_INCLUDED const ocsd_ex_level getEL() const
void setVMID(const uint32_t id)
void set64bit(const bool is64bit)
void setCtxtID(const uint32_t id)
void setSecLevel(const ocsd_sec_level sl)
const uint32_t getCtxtID() const
OcsdPeContext & operator=(const OcsdPeContext &ctxt)
const bool ctxtIDvalid() const
const uint32_t getVMID() const
const ocsd_sec_level getSecLevel() const
const bool VMIDvalid() const
const bool ELvalid() const
void setEL(const ocsd_ex_level el)
Handler for the ocsd_pe_context structure.