gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::ArmISA::TableWalker::LongDescriptor Class Reference

Long-descriptor format (LPAE) More...

#include <table_walker.hh>

Inheritance diagram for gem5::ArmISA::TableWalker::LongDescriptor:
gem5::ArmISA::TableWalker::DescriptorBase

Public Types

enum  EntryType { Invalid , Table , Block , Page }
 Descriptor type. More...
 

Public Member Functions

 LongDescriptor ()
 
uint8_t * getRawPtr () override
 
uint64_t getRawData () const override
 
std::string dbgHeader () const override
 
bool secure (bool have_security, WalkerState *currState) const override
 Returns true if this entry targets the secure physical address map.
 
EntryType type () const
 Return the descriptor type.
 
uint8_t offsetBits () const override
 Return the bit width of the page/block offset.
 
Addr pfn () const override
 Return the physical frame, bits shifted right.
 
Addr paddr () const
 Return the physical address of the entry.
 
Addr nextTableAddr () const
 Return the address of the next page table.
 
Addr nextDescAddr (Addr va) const
 Return the address of the next descriptor.
 
bool xn () const override
 Is execution allowed on this mapping?
 
bool pxn () const
 Is privileged execution allowed on this mapping? (LPAE only)
 
bool contiguousHint () const
 Contiguous hint bit.
 
bool global (WalkerState *currState) const override
 Is the translation global (no asid used)?
 
bool af () const
 Returns true if the access flag (AF) is set.
 
uint8_t sh () const
 2-bit shareability field
 
uint8_t ap () const override
 2-bit access protection flags
 
bool rw () const
 Read/write access protection flag.
 
bool user () const
 User/privileged level access protection flag.
 
TlbEntry::DomainType domain () const override
 
uint8_t attrIndx () const
 Attribute index.
 
uint8_t memAttr () const
 Memory attributes, only used by stage 2 translations.
 
void setAf ()
 Set access flag that this entry has been touched.
 
bool dirty () const
 This entry needs to be written back to memory.
 
bool secureTable () const
 Whether the subsequent levels of lookup are secure.
 
uint8_t apTable () const
 Two bit access protection flags for subsequent levels of lookup.
 
uint8_t rwTable () const
 R/W protection flag for subsequent levels of lookup.
 
uint8_t userTable () const
 User/privileged mode protection flag for subsequent levels of lookup.
 
bool xnTable () const
 Is execution allowed on subsequent lookup levels?
 
bool pxnTable () const
 Is privileged execution allowed on subsequent lookup levels?
 
- Public Member Functions inherited from gem5::ArmISA::TableWalker::DescriptorBase
 DescriptorBase ()
 
virtual uint8_t texcb () const
 
virtual bool shareable () const
 

Static Public Member Functions

static uint8_t ap (bool rw, bool user)
 Return the AP bits as compatible with the AP[2:0] format.
 

Public Attributes

uint64_t data
 The raw bits of the entry.
 
bool _dirty
 This entry has been modified (access flag set) and needs to be written back to memory.
 
bool aarch64
 True if the current lookup is performed in AArch64 state.
 
GrainSize grainSize
 Width of the granule size in bits.
 
uint8_t physAddrRange
 
- Public Attributes inherited from gem5::ArmISA::TableWalker::DescriptorBase
LookupLevel lookupLevel
 Current lookup level for this descriptor.
 

Detailed Description

Long-descriptor format (LPAE)

Definition at line 425 of file table_walker.hh.

Member Enumeration Documentation

◆ EntryType

Descriptor type.

Enumerator
Invalid 
Table 
Block 
Page 

Definition at line 429 of file table_walker.hh.

Constructor & Destructor Documentation

◆ LongDescriptor()

gem5::ArmISA::TableWalker::LongDescriptor::LongDescriptor ( )
inline

Definition at line 437 of file table_walker.hh.

Member Function Documentation

◆ af()

bool gem5::ArmISA::TableWalker::LongDescriptor::af ( ) const
inline

Returns true if the access flag (AF) is set.

Definition at line 683 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ ap() [1/2]

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::ap ( ) const
inlineoverridevirtual

2-bit access protection flags

Implements gem5::ArmISA::TableWalker::DescriptorBase.

Definition at line 699 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor(), and gem5::ArmISA::TableWalker::insertTableEntry().

◆ ap() [2/2]

static uint8_t gem5::ArmISA::TableWalker::LongDescriptor::ap ( bool rw,
bool user )
inlinestatic

Return the AP bits as compatible with the AP[2:0] format.

Utility function used to simplify the code in the TLB for performing permission checks.

Definition at line 726 of file table_walker.hh.

References rw(), and user().

◆ apTable()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::apTable ( ) const
inline

Two bit access protection flags for subsequent levels of lookup.

Definition at line 780 of file table_walker.hh.

References gem5::bits(), data, Table, and type().

◆ attrIndx()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::attrIndx ( ) const
inline

Attribute index.

Definition at line 740 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::memAttrsAArch64(), and gem5::ArmISA::TableWalker::memAttrsLPAE().

◆ contiguousHint()

bool gem5::ArmISA::TableWalker::LongDescriptor::contiguousHint ( ) const
inline

Contiguous hint bit.

Definition at line 654 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

◆ dbgHeader()

std::string gem5::ArmISA::TableWalker::LongDescriptor::dbgHeader ( ) const
inlineoverridevirtual

◆ dirty()

bool gem5::ArmISA::TableWalker::LongDescriptor::dirty ( ) const
inline

This entry needs to be written back to memory.

Definition at line 765 of file table_walker.hh.

References _dirty.

◆ domain()

TlbEntry::DomainType gem5::ArmISA::TableWalker::LongDescriptor::domain ( ) const
inlineoverridevirtual

◆ getRawData()

uint64_t gem5::ArmISA::TableWalker::LongDescriptor::getRawData ( ) const
inlineoverridevirtual

◆ getRawPtr()

uint8_t * gem5::ArmISA::TableWalker::LongDescriptor::getRawPtr ( )
inlineoverridevirtual

Implements gem5::ArmISA::TableWalker::DescriptorBase.

Definition at line 458 of file table_walker.hh.

References data.

◆ global()

◆ memAttr()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::memAttr ( ) const
inline

Memory attributes, only used by stage 2 translations.

Definition at line 748 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::memAttrsAArch64(), and gem5::ArmISA::TableWalker::memAttrsLPAE().

◆ nextDescAddr()

Addr gem5::ArmISA::TableWalker::LongDescriptor::nextDescAddr ( Addr va) const
inline

◆ nextTableAddr()

Addr gem5::ArmISA::TableWalker::LongDescriptor::nextTableAddr ( ) const
inline

Return the address of the next page table.

Definition at line 600 of file table_walker.hh.

References aarch64, gem5::bits(), data, gem5::ArmISA::Grain64KB, grainSize, gem5::mbits(), physAddrRange, Table, and type().

Referenced by gem5::ArmISA::TableWalker::insertPartialTableEntry(), and nextDescAddr().

◆ offsetBits()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::offsetBits ( ) const
inlineoverridevirtual

◆ paddr()

Addr gem5::ArmISA::TableWalker::LongDescriptor::paddr ( ) const
inline

Return the physical address of the entry.

Definition at line 584 of file table_walker.hh.

References aarch64, gem5::X86ISA::addr, gem5::bits(), data, gem5::ArmISA::Grain64KB, grainSize, gem5::mbits(), offsetBits(), and physAddrRange.

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor(), and pfn().

◆ pfn()

Addr gem5::ArmISA::TableWalker::LongDescriptor::pfn ( ) const
inlineoverridevirtual

Return the physical frame, bits shifted right.

Implements gem5::ArmISA::TableWalker::DescriptorBase.

Definition at line 577 of file table_walker.hh.

References offsetBits(), and paddr().

◆ pxn()

bool gem5::ArmISA::TableWalker::LongDescriptor::pxn ( ) const
inline

Is privileged execution allowed on this mapping? (LPAE only)

Definition at line 646 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor(), and gem5::ArmISA::TableWalker::insertTableEntry().

◆ pxnTable()

bool gem5::ArmISA::TableWalker::LongDescriptor::pxnTable ( ) const
inline

Is privileged execution allowed on subsequent lookup levels?

Definition at line 813 of file table_walker.hh.

References gem5::bits(), data, Table, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ rw()

bool gem5::ArmISA::TableWalker::LongDescriptor::rw ( ) const
inline

Read/write access protection flag.

Definition at line 708 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by ap().

◆ rwTable()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::rwTable ( ) const
inline

R/W protection flag for subsequent levels of lookup.

Definition at line 788 of file table_walker.hh.

References gem5::bits(), data, Table, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ secure()

bool gem5::ArmISA::TableWalker::LongDescriptor::secure ( bool have_security,
WalkerState * currState ) const
inlineoverridevirtual

Returns true if this entry targets the secure physical address map.

Implements gem5::ArmISA::TableWalker::DescriptorBase.

Definition at line 491 of file table_walker.hh.

References gem5::bits(), gem5::ArmISA::TableWalker::currState, data, Page, gem5::ArmISA::TableWalker::WalkerState::secureLookup, and type().

Referenced by gem5::ArmISA::TableWalker::insertPartialTableEntry().

◆ secureTable()

bool gem5::ArmISA::TableWalker::LongDescriptor::secureTable ( ) const
inline

Whether the subsequent levels of lookup are secure.

Definition at line 772 of file table_walker.hh.

References gem5::bits(), data, Table, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ setAf()

void gem5::ArmISA::TableWalker::LongDescriptor::setAf ( )
inline

Set access flag that this entry has been touched.

Mark the entry as requiring a writeback, in the future.

Definition at line 757 of file table_walker.hh.

References _dirty, and data.

◆ sh()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::sh ( ) const
inline

2-bit shareability field

Definition at line 691 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::memAttrsAArch64(), and gem5::ArmISA::TableWalker::memAttrsLPAE().

◆ type()

◆ user()

bool gem5::ArmISA::TableWalker::LongDescriptor::user ( ) const
inline

User/privileged level access protection flag.

Definition at line 716 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by ap().

◆ userTable()

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::userTable ( ) const
inline

User/privileged mode protection flag for subsequent levels of lookup.

Definition at line 797 of file table_walker.hh.

References gem5::bits(), data, Table, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ xn()

bool gem5::ArmISA::TableWalker::LongDescriptor::xn ( ) const
inlineoverridevirtual

Is execution allowed on this mapping?

Implements gem5::ArmISA::TableWalker::DescriptorBase.

Definition at line 638 of file table_walker.hh.

References gem5::bits(), data, Page, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ xnTable()

bool gem5::ArmISA::TableWalker::LongDescriptor::xnTable ( ) const
inline

Is execution allowed on subsequent lookup levels?

Definition at line 805 of file table_walker.hh.

References gem5::bits(), data, Table, and type().

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

Member Data Documentation

◆ _dirty

bool gem5::ArmISA::TableWalker::LongDescriptor::_dirty

This entry has been modified (access flag set) and needs to be written back to memory.

Definition at line 447 of file table_walker.hh.

Referenced by dirty(), and setAf().

◆ aarch64

bool gem5::ArmISA::TableWalker::LongDescriptor::aarch64

True if the current lookup is performed in AArch64 state.

Definition at line 450 of file table_walker.hh.

Referenced by nextDescAddr(), nextTableAddr(), paddr(), gem5::ArmISA::TableWalker::processWalkAArch64(), and gem5::ArmISA::TableWalker::processWalkLPAE().

◆ data

uint64_t gem5::ArmISA::TableWalker::LongDescriptor::data

◆ grainSize

◆ physAddrRange

uint8_t gem5::ArmISA::TableWalker::LongDescriptor::physAddrRange

The documentation for this class was generated from the following file:

Generated on Tue Jun 18 2024 16:24:17 for gem5 by doxygen 1.11.0