gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ArmISA::TableWalker::LongDescriptor Class Reference

Long-descriptor format (LPAE) More...

#include <table_walker.hh>

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

Public Types

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

Public Member Functions

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

Public Attributes

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

Detailed Description

Long-descriptor format (LPAE)

Definition at line 374 of file table_walker.hh.

Member Enumeration Documentation

Descriptor type.

Enumerator
Invalid 
Table 
Block 
Page 

Definition at line 377 of file table_walker.hh.

Member Function Documentation

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

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

Definition at line 563 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

uint8_t ArmISA::TableWalker::LongDescriptor::ap ( ) const
inlinevirtual

2-bit access protection flags

Implements ArmISA::TableWalker::DescriptorBase.

Definition at line 577 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

static uint8_t 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 601 of file table_walker.hh.

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

Two bit access protection flags for subsequent levels of lookup.

Definition at line 649 of file table_walker.hh.

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

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

Attribute index.

Definition at line 614 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

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

Contiguous hint bit.

Definition at line 538 of file table_walker.hh.

References bits(), Block, data, Page, and type().

virtual std::string ArmISA::TableWalker::LongDescriptor::dbgHeader ( ) const
inlinevirtual
bool ArmISA::TableWalker::LongDescriptor::dirty ( ) const
inline

This entry needs to be written back to memory.

Definition at line 636 of file table_walker.hh.

References _dirty.

TlbEntry::DomainType ArmISA::TableWalker::LongDescriptor::domain ( ) const
inlinevirtual

Implements ArmISA::TableWalker::DescriptorBase.

Definition at line 606 of file table_walker.hh.

References Block, ArmISA::TlbEntry::Client, Page, and type().

virtual uint64_t ArmISA::TableWalker::LongDescriptor::getRawData ( ) const
inlinevirtual

Implements ArmISA::TableWalker::DescriptorBase.

Definition at line 391 of file table_walker.hh.

References data.

bool ArmISA::TableWalker::LongDescriptor::global ( WalkerState currState) const
inlinevirtual
uint8_t ArmISA::TableWalker::LongDescriptor::memAttr ( ) const
inline

Memory attributes, only used by stage 2 translations.

Definition at line 621 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

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

Return the address of the next descriptor.

Definition at line 505 of file table_walker.hh.

References aarch64, bits(), grainSize, ArmISA::L1, ArmISA::TableWalker::DescriptorBase::lookupLevel, nextTableAddr(), ArmISA::pa, ArmISA::stride, Table, and type().

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

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

Return the address of the next page table.

Definition at line 495 of file table_walker.hh.

References aarch64, data, grainSize, mbits(), Table, and type().

Referenced by nextDescAddr().

uint8_t ArmISA::TableWalker::LongDescriptor::offsetBits ( ) const
inlinevirtual
Addr ArmISA::TableWalker::LongDescriptor::paddr ( Addr  va) const
inline

Return the complete physical address given a VA.

Definition at line 478 of file table_walker.hh.

References aarch64, data, mbits(), ArmISA::n, and offsetBits().

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

Return the physical address of the entry.

Definition at line 487 of file table_walker.hh.

References aarch64, data, mbits(), and offsetBits().

Addr ArmISA::TableWalker::LongDescriptor::pfn ( ) const
inlinevirtual

Return the physical frame, bits shifted right.

Implements ArmISA::TableWalker::DescriptorBase.

Definition at line 470 of file table_walker.hh.

References aarch64, bits(), data, and offsetBits().

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

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

Definition at line 531 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

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

Is privileged execution allowed on subsequent lookup levels?

Definition at line 678 of file table_walker.hh.

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

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

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

Read/write access protection flag.

Definition at line 585 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

R/W protection flag for subsequent levels of lookup.

Definition at line 656 of file table_walker.hh.

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

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

bool ArmISA::TableWalker::LongDescriptor::secure ( bool  have_security,
WalkerState currState 
) const
inlinevirtual

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

Implements ArmISA::TableWalker::DescriptorBase.

Definition at line 411 of file table_walker.hh.

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

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

Whether the subsequent levels of lookup are secure.

Definition at line 642 of file table_walker.hh.

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

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

void 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 629 of file table_walker.hh.

References _dirty, and data.

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

2-bit shareability field

Definition at line 570 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

EntryType ArmISA::TableWalker::LongDescriptor::type ( ) const
inline
bool ArmISA::TableWalker::LongDescriptor::user ( ) const
inline

User/privileged level access protection flag.

Definition at line 592 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

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

Definition at line 664 of file table_walker.hh.

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

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

bool ArmISA::TableWalker::LongDescriptor::xn ( ) const
inlinevirtual

Is execution allowed on this mapping?

Implements ArmISA::TableWalker::DescriptorBase.

Definition at line 524 of file table_walker.hh.

References bits(), Block, data, Page, and type().

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

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

Is execution allowed on subsequent lookup levels?

Definition at line 671 of file table_walker.hh.

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

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

Member Data Documentation

bool ArmISA::TableWalker::LongDescriptor::_dirty

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

Definition at line 389 of file table_walker.hh.

Referenced by dirty(), and setAf().

bool ArmISA::TableWalker::LongDescriptor::aarch64

True if the current lookup is performed in AArch64 state.

Definition at line 418 of file table_walker.hh.

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

uint64_t ArmISA::TableWalker::LongDescriptor::data
GrainSize ArmISA::TableWalker::LongDescriptor::grainSize

Width of the granule size in bits.

Definition at line 421 of file table_walker.hh.

Referenced by nextDescAddr(), nextTableAddr(), offsetBits(), ArmISA::TableWalker::processWalkLPAE(), and type().


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

Generated on Fri Jun 9 2017 13:04:30 for gem5 by doxygen 1.8.6