Difference between revisions of "Unit PlatformARMv8"
Line 1,655: | Line 1,655: | ||
<br /> | <br /> | ||
<br />To return from the fast interrupt request the handler uses the rfeia (Return From Exception Increment After) instruction which will load the pc and cpsr from the stack of the current mode (SYS or SVC). | <br />To return from the fast interrupt request the handler uses the rfeia (Return From Exception Increment After) instruction which will load the pc and cpsr from the stack of the current mode (SYS or SVC). | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ARMv8 helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetFPEXC:LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetFPSCR:LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv8StartMMU; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetTimerState(Timer:LongWord):LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv8SetTimerState(Timer,State:LongWord); assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetTimerCount(Timer:LongWord):Int64; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetTimerValue(Timer:LongWord):LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMV8SetTimerValue(Timer,Value:LongWord); assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetTimerCompare(Timer:LongWord):Int64; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMV8SetTimerCompare(Timer,High,Low:LongWord);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetTimerFrequency:LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetPageTableCoarse(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Coarse Page Table entry (1MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Coarse Page Table entry (1MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | Caller must call ARMv8InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetPageTableLarge(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Large Page Table entry (64KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Large Page Table entry (64KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''PageTable''' | ||
+ | | Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | Caller must call ARMv8InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetPageTableSmall(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Small Page Table entry (4KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Small Page Table entry (4KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | Caller must call ARMv8InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8GetPageTableSection(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Page Table Section (1MB) or Supersection (16MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Page Table Section (1MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | Caller must call ARMv8InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv8SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Page Table Supersection (16MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! '''PageTable''' | ||
+ | | Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | See page ??? | ||
+ | Caller must call ARMv8InvalidateTLB after changes if MMU is enabled | ||
|- | |- | ||
|} | |} |
Revision as of 04:53, 10 November 2016
Return to Unit Reference
Description
The ARMv8 does not support the SWP/SWPB instructions for syncronisation (Lock/Mutex/Semaphore etc) unless enabled.
On ARMv8 Unaligned memory access is always enabled.
On ARMv8 the Extended Page Table format is always enabled.
For usage of barriers (DMB/DSB/ISB) after cache maintenance operations see: ARM.Reference_Manual_1.pdf - Appendix G Barrier Litmus Tests
Note: This unit currently only supports ARMv8 in Aarch32 mode, support for Aarch64 mode will be added in future.
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure ARMv8Init;
Note | None documented |
---|
ARMv8 platform functions
procedure ARMv8CPUInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8FPUInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8MMUInit;
Note | None documented |
---|
procedure ARMv8CacheInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8TimerInit(Frequency:LongWord); assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8PageTableInit;
Note | None documented |
---|
procedure ARMv8SystemCall(Number:LongWord; Param1,Param2,Param3:LongWord); assembler; nostackframe;
Note | None documented |
---|
function ARMv8CPUGetMode:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8CPUGetState:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8CPUGetCurrent:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8CPUGetMainID:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8CPUGetMultiprocessorID:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8CPUGetModel:LongWord;
Note | None documented |
---|
function ARMv8CPUGetRevision:LongWord;
Note | None documented |
---|
function ARMv8CPUGetDescription:String;
Note | None documented |
---|
function ARMv8FPUGetState:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L1CacheGetType:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L1DataCacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L1DataCacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L1InstructionCacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L1InstructionCacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L2CacheGetType:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L2CacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8L2CacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8Halt; assembler; nostackframe; public name'_haltproc';
Note | See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8Pause; assembler; nostackframe;
Note | See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8SendEvent; assembler; nostackframe;
Note | See Page A8-316 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8WaitForEvent; assembler; nostackframe;
Note | See Page A8-808 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8WaitForInterrupt; assembler; nostackframe;
Note | See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8DataMemoryBarrier; assembler; nostackframe;
Note | See page A8-90 of the ARMv7 Architecture Reference Manual
Note that this is also available in the FPC RTL as ReadBarrier/WriteBarrier See: \source\rtl\arm\arm.inc
|
---|
procedure ARMv8DataSynchronizationBarrier; assembler; nostackframe;
Note | See page A8-92 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InstructionMemoryBarrier; assembler; nostackframe;
Note | See page A8-102 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateTLB; assembler; nostackframe;
Note | See page B3-138 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateDataTLB; assembler; nostackframe;
Note | See page B3-138 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateInstructionTLB; assembler; nostackframe;
Note | See page B3-138 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8CleanDataCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateDataCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateL1DataCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8CleanAndInvalidateDataCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateInstructionCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8CleanDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8CleanAndInvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8InvalidateInstructionCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8CleanDataCacheSetWay(SetWay:LongWord); assembler; nostackframe;
SetWay | Set/Way/Level will be passed in r0 |
---|---|
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
procedure ARMv8InvalidateDataCacheSetWay(SetWay:LongWord); assembler; nostackframe;
SetWay | Set/Way/Level will be passed in r0 |
---|---|
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
procedure ARMv8CleanAndInvalidateDataCacheSetWay(SetWay:LongWord); assembler; nostackframe;
SetWay | Set/Way/Level will be passed in r0 |
---|---|
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
procedure ARMv8FlushPrefetchBuffer; assembler; nostackframe;
Note | See page A8-102 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8FlushBranchTargetCache; assembler; nostackframe;
Note | See page B3-127 of the ARMv7 Architecture Reference Manual |
---|
procedure ARMv8ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
|
procedure ARMv8ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
|
procedure ARMv8ContextSwitchFIQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
|
procedure ARMv8ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
|
function ARMv8InterlockedOr(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedXor(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedAnd(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedDecrement(var Target:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedIncrement(var Target:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedAddExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8InterlockedCompareExchange(var Target:LongInt; Source,Compare:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8PageTableGetEntry(Address:PtrUInt):TPageTableEntry;
Note | None documented |
---|
function ARMv8PageTableSetEntry(const Entry:TPageTableEntry):LongWord;
Note | None documented |
---|
function ARMv8VectorTableGetEntry(Number:LongWord):PtrUInt;
Note | None documented |
---|
function ARMv8VectorTableSetEntry(Number:LongWord; Address:PtrUInt):LongWord;
Note | None documented |
---|
function ARMv8FirstBitSet(Value:LongWord):LongWord; assembler; nostackframe;
Note | ARM arm states that CLZ is supported for ARMv5 and above |
---|
function ARMv8CountLeadingZeros(Value:LongWord):LongWord; assembler; nostackframe;
Note | ARM arm states that CLZ is supported for ARMv5 and above |
---|
ARMv8 thread functions
procedure ARMv8PrimaryInit; assembler; nostackframe;
Note | None documented |
---|
function ARMv8SpinLock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinUnlock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinLockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinUnlockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinLockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinUnlockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinLockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinUnlockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8SpinCheckIRQ(Spin:PSpinEntry):Boolean;
Return | True if the mask would enable IRQ on restore, False if it would not |
---|
function ARMv8SpinCheckFIQ(Spin:PSpinEntry):Boolean;
Return | True if the mask would enable FIQ on restore, False if it would not |
---|
function ARMv8SpinExchangeIRQ(Spin1,Spin2:PSpinEntry):LongWord;
Note | None documented |
---|
function ARMv8SpinExchangeFIQ(Spin1,Spin2:PSpinEntry):LongWord;
Note | None documented |
---|
function ARMv8MutexLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Mutex | Pointer to the Mutex entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8MutexUnlock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Mutex | Pointer to the Mutex entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv8MutexTryLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Mutex | Pointer to the Mutex entry to try to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed, ERROR_LOCKED if already locked or another error code on failure (Returned in R0) |
function ARMv8ThreadGetCurrent:TThreadHandle; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8ThreadSetCurrent(Thread:TThreadHandle):LongWord; assembler; nostackframe;
Note | See page ??? |
---|
function ARMv8ThreadSetupStack(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;
StackBase | Pointer to the base (highest address) of the allocated stack (as returned by ThreadAllocateStack |
---|---|
StartProc | The procedure the thread will start executing when resumed |
ReturnProc | The procedure the thread will return to on exit |
Return | Pointer to the starting address of the stack, which will be the Stack Pointer on the first context switch |
Note | At the point of a context switch the thread stack will look like this:
|
ARMv8 IRQ functions
function ARMv8DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Note | None documented |
---|
ARMv8 FIQ functions
function ARMv8DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Note | None documented |
---|
ARMv8 SWI functions
function ARMv8DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle; inline;
Note | None documented |
---|
ARMv8 interrupt functions
procedure ARMv8ResetHandler; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8UndefinedInstructionHandler; assembler; nostackframe;
Note | This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup |
---|
procedure ARMv8SoftwareInterruptHandler; assembler; nostackframe;
Note | This routine is registered as the vector for SWI requests in the vector table loaded during startup. When the processor executes an SVC it switches to SWI mode, stores the address of the next instruction in the SWI mode link register (lr_svc) and saves the current program status register into the SWI mode saved program status register (spsr_svc).
|
---|
procedure ARMv8PrefetchAbortHandler; assembler; nostackframe;
Note | This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup |
---|
procedure ARMv8DataAbortHandler; assembler; nostackframe;
Note | This routine is registered as the vector for data abort exception in the vector table loaded during startup |
---|
procedure ARMv8ReservedHandler; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8IRQHandler; assembler; nostackframe;
Note | This routine is registered as the vector for IRQ requests in the vector table loaded during startup.
|
---|
procedure ARMv8FIQHandler; assembler; nostackframe;
Note | This routine is registered as the vector for FIQ requests in the vector table loaded during startup.
|
---|
ARMv8 helper functions
function ARMv8GetFPEXC:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8GetFPSCR:LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8StartMMU; assembler; nostackframe;
Note | None documented |
---|
function ARMv8GetTimerState(Timer:LongWord):LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv8SetTimerState(Timer,State:LongWord); assembler; nostackframe;
Note | None documented |
---|
function ARMv8GetTimerCount(Timer:LongWord):Int64; assembler; nostackframe;
Note | None documented |
---|
function ARMv8GetTimerValue(Timer:LongWord):LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMV8SetTimerValue(Timer,Value:LongWord); assembler; nostackframe;
Note | None documented |
---|
function ARMv8GetTimerCompare(Timer:LongWord):Int64; assembler; nostackframe;
Note | None documented |
---|
procedure ARMV8SetTimerCompare(Timer,High,Low:LongWord);
Note | None documented |
---|
function ARMv8GetTimerFrequency:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv8GetPageTableCoarse(Address:PtrUInt):LongWord;
Note | See page ??? |
---|
function ARMv8SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;
Note | See page ???
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled |
---|
function ARMv8GetPageTableLarge(Address:PtrUInt):LongWord;
Note | See page ??? |
---|
function ARMv8SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
PageTable | Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords |
---|---|
Note | See page ???
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled |
function ARMv8GetPageTableSmall(Address:PtrUInt):LongWord;
Note | See page ??? |
---|
function ARMv8SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Note | See page ???
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled |
---|
function ARMv8GetPageTableSection(Address:PtrUInt):LongWord;
Note | See page ??? |
---|
function ARMv8SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Note | See page ???
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled |
---|
function ARMv8SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
PageTable | Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords |
---|---|
Note | See page ???
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled |
Return to Unit Reference