FreeNOS
Enumerations | Functions | Variables
ARM64Control Namespace Reference

ARM64 System Control Coprocessor (CP15). More...

Enumerations

enum  Register {
  MainID = 0 , CoreID , SystemControl , AuxControl ,
  DomainControl , TranslationTable0 , TranslationTable1 , TranslationTableCtrl ,
  CacheClear , DataCacheClean , FlushPrefetchBuffer , InstructionCacheClear ,
  InstructionTLBClear , DataTLBClear , UnifiedTLBClear , UserProcID ,
  InstructionFaultAddress , InstructionFaultStatus , DataFaultAddress , DataFaultStatus ,
  SystemFrequency , PhysicalTimerValue , PhysicalTimerControl , PhysicalTimerCount ,
  MemoryModelFeature , MemoryAttrIndirection , VectorBaseAddress , DAIF
}
 System Control Registers. More...
 
enum  AuxControlFlags { DisablePageColoring = (1 << 6) , SMPBit = (1 << 6) }
 Aux Control flags. More...
 
enum  DomainControlFlags { DomainClient = 1 , DomainManager = 3 }
 Domain Control flags. More...
 

Functions

u64 read (Register reg)
 Read a register from the CP15.
 
void write (Register reg, u64 value)
 Write register to the CP15.
 
void set (Register reg, u64 flags)
 
void unset (Register reg, u64 flags)
 
void set (AuxControlFlags flags)
 Set auxillary flags in CP15.
 
void set (DomainControlFlags flags)
 Set domain control flags in CP15.
 

Variables

enum ARM64Control::Register ALIGN
 

Detailed Description

ARM64 System Control Coprocessor (CP15).

The ARM64 Architecture defines a coprocessor to manage various subsystems in the ARM64 core, including virtual memory, interrupts, debugging and more. It appears as coprocessor number 15 to the ARM64 core and is accessible by the MRC (ARM64 Register from Coprocessor) and MCR () instructions.

See also
ARM64 Architecture Reference Manual, page xxx

Enumeration Type Documentation

◆ AuxControlFlags

Aux Control flags.

Enumerator
DisablePageColoring 
SMPBit 

Definition at line 90 of file ARM64Control.h.

◆ DomainControlFlags

Domain Control flags.

Enumerator
DomainClient 
DomainManager 

Definition at line 99 of file ARM64Control.h.

◆ Register

System Control Registers.

Enumerator
MainID 
CoreID 
SystemControl 
AuxControl 
DomainControl 
TranslationTable0 
TranslationTable1 
TranslationTableCtrl 
CacheClear 
DataCacheClean 
FlushPrefetchBuffer 
InstructionCacheClear 
InstructionTLBClear 
DataTLBClear 
UnifiedTLBClear 
UserProcID 
InstructionFaultAddress 
InstructionFaultStatus 
DataFaultAddress 
DataFaultStatus 
SystemFrequency 
PhysicalTimerValue 
PhysicalTimerControl 
PhysicalTimerCount 
MemoryModelFeature 
MemoryAttrIndirection 
VectorBaseAddress 
DAIF 

Definition at line 53 of file ARM64Control.h.

Function Documentation

◆ read()

u64 ARM64Control::read ( Register  reg)

Read a register from the CP15.

Parameters
regThe Register to read.
Returns
32-bit value of the register.

Definition at line 24 of file ARM64Control.cpp.

References DAIF, MemoryModelFeature, PhysicalTimerControl, PhysicalTimerCount, PhysicalTimerValue, SystemControl, and SystemFrequency.

Referenced by ARM64Paging::enableMMU(), ARM64Timer::getSystemFrequency(), set(), and unset().

◆ set() [1/3]

void ARM64Control::set ( AuxControlFlags  flags)

Set auxillary flags in CP15.

Parameters
flagsAuxillary flags to set

Definition at line 116 of file ARM64Control.cpp.

References AuxControl, flags, and set().

◆ set() [2/3]

void ARM64Control::set ( DomainControlFlags  flags)

Set domain control flags in CP15.

Parameters
flagsNew domain control flags

Definition at line 121 of file ARM64Control.cpp.

References DomainControl, flags, and set().

◆ set() [3/3]

void ARM64Control::set ( Register  reg,
u64  flags 
)

Definition at line 102 of file ARM64Control.cpp.

References flags, read(), and write().

Referenced by set(), and set().

◆ unset()

void ARM64Control::unset ( Register  reg,
u64  flags 
)

Definition at line 109 of file ARM64Control.cpp.

References flags, read(), and write().

◆ write()

void ARM64Control::write ( Register  reg,
u64  value 
)

Variable Documentation

◆ ALIGN

enum ARM64Control::Register ARM64Control::ALIGN