Timer
https://developer.arm.com/documentation/102379/0101/The-processor-timers?lang=en
Count & Freq
CNTPCT_EL0
- Current System Count Value
CNTFRQ_EL0
- Frequency of the System Count
- Write-able at the highest implemented EL, Readable at all EL
Registers
Register Purpose <timer>_CTL_EL<x>
Control register <timer>_CVAL_EL<x>
Comparator value <timer>_TVAL_EL<x>
Timer value
Timer Register prefix EL EL1 physical timer CNTP EL0
EL1 virtual time CNTV EL0
Non-secure EL2 physical timer CNTHP EL2
Non-secure EL2 virtual timer CNTHV EL2
EL3 physical timer CNTPS EL1
Secure EL2 physical timer CNTHPS EL2
Secure EL2 virtual timer CNTHVS EL2
Configuration
CVAL
- Comparator Register
- 64bit Timer Condition Met:
CVAL <= System Count
TVAL
- Timer Register
- 32bit Timer Condition Met:
TVAL <= 0
정리
- CVAL은 System Count와 일치할 때..
- TVAL은 TVAL 만큼 Count한 이후에..
Interrupts
CNTP_CTL
Link to original
ENABLE
: Enables the timerIMASK
: Interrupt MaskISTATUS
: Reports whether the timer is firing (=CVAL <= System Count
) whenENABLE==1
https://cirosantilli.com/linux-kernel-module-cheat/arm-timer.html
Virtual Memory
- ARMv8 Programmers Guide: Chapter 12: The Memory Management Unit
- Chapter 12 The Memory Management Unit