Difference between revisions of "Unit PlatformARMv8"

From Ultibo.org
Jump to: navigation, search
Line 1,516: Line 1,516:
 
! '''Note'''
 
! '''Note'''
 
| None documented
 
| None documented
 +
|-
 +
|}
 +
</div></div>
 +
<br />
 +
 +
'''ARMv8 interrupt 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;">procedure ARMv8ResetHandler; 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 ARMv8UndefinedInstructionHandler; assembler; nostackframe;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle an undefined instruction exception</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup
 +
|-
 +
|}
 +
</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 ARMv8SoftwareInterruptHandler; assembler; nostackframe;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a software interrupt (SWI) from a system call (SVC)</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''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).
 +
<br />The SWI handler first saves the SWI mode lr and spsr (which represent the location and state to return to) onto the SYS mode stack using the srsdb (Store Return State Decrement Before) instruction.
 +
<br />       
 +
<br />The SWI handler then switches to SYS mode and saves all the neccessary registers for the return to the interrupted thread before switching back to SWI mode in order to process the software interrupt. Because we arrive here from an interrupt the thread that was executing has no opportunity to save registers and will be unaware on return that it was interrupted. For this reason we must save all of the general purpose registers (r0 to r12) as well as the SYS mode link register (lr). We do not save the stack pointer (r13) because we use it to store the other registers and will return it to the correct value before we return from the SWI handler. The program counter (r15) does not need to be saved as it now points to this code.
 +
<br />       
 +
<br />The SystemCall function should pass the parameters of the call as follows:
 +
<br />       
 +
<br />R0 - System Call Number (eg SYSTEM_CALL_CONTEXT_SWITCH)
 +
<br />R1 - Parameter 1
 +
<br />R2 - Parameter 2
 +
<br />R3 - Parameter 3
 +
<br />         
 +
<br />To process the software interrupt
 +
<br />??????
 +
<br />       
 +
<br />To return from the software interrupt
 +
<br />??????
 +
|-
 +
|}
 +
</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 ARMv8PrefetchAbortHandler; assembler; nostackframe;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a prefetch abort exception</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup
 +
|-
 +
|}
 +
</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 ARMv8DataAbortHandler; assembler; nostackframe;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a data abort exception</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| This routine is registered as the vector for data abort exception in the vector table loaded during startup
 +
|-
 +
|}
 +
</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 ARMv8ReservedHandler; 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 ARMv8IRQHandler; assembler; nostackframe;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle an interrupt request IRQ from an interrupt source</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| This routine is registered as the vector for IRQ requests in the vector table loaded during startup.
 +
<br />At the end of each instruction the processor checks the IRQ line and if triggered it will lookup the vector in the vector table and jump to the routine listed.
 +
<br />       
 +
<br />When the processor receives an IRQ it switches to IRQ mode, stores the address of the next instruction in the IRQ mode link register (lr_irq) and saves the current program status register into the IRQ mode saved program status register (spsr_irq).
 +
<br />       
 +
<br />The IRQ handler first saves the IRQ mode lr and spsr (which represent the location and state to return to) onto the SYS mode stack using the srsdb (Store Return State Decrement Before) instruction.
 +
<br />       
 +
<br />The IRQ handler then switches to SYS mode and saves all the neccessary registers for the return to the interrupted thread before switching back to IRQ mode in order to process the interrupt request. Because we arrive here from an interrupt the thread that was executing has no opportunity to save registers and will be unaware on return that it was interrupted. For this reason we must save all of the general purpose registers (r0 to r12) as well as the SYS mode link register (lr). We do not save the stack pointer (r13) because we use it to store the other registers and will return it to the correct value before we return from the IRQ handler. The program counter (r15) does not need to be saved as it now points to this code.
 +
<br />       
 +
<br />To process the interrupt request the handler calls the DispatchIRQ function which will dispatch the interrupt to a registered handler for processing. The handler must clear the interrupt source before it returns or the interrupt will simply occur again immediately once reenabled.
 +
<br />       
 +
<br />To return from the interrupt request the handler uses the rfeia (Return From Exception Increment After) instruction which will load the pc and cpsr from the SYS mode stack.
 +
|-
 +
|}
 +
</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 ARMv8FIQHandler; assembler; nostackframe;</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a fast interrupt request FIQ from an interrupt source</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! '''Note'''
 +
| This routine is registered as the vector for FIQ requests in the vector table loaded during startup.
 +
<br />At the end of each instruction the processor checks the FIQ line and if triggered it will lookup the vector in the vector table and jump to the routine listed.
 +
<br />     
 +
<br />When the processor receives an FIQ it switches to FIQ mode, stores the address of the next instruction in the FIQ mode link register (lr_fiq) and saves the current program status register into the FIQ mode saved program status register (spsr_fiq).
 +
<br />       
 +
<br />The FIQ handler first checks the spsr to determine if the task being interrupted is a normal thread or an exception or interrupt handler.
 +
<br />       
 +
The FIQ handler then saves the FIQ mode lr and spsr (which represent the location and state to return to) onto either the SYS mode or SVC mode stack using the srsdb (Store Return State Decrement Before) instruction depending on the value of spsr.
 +
<br />       
 +
<br />The FIQ handler switches to SYS or SVC mode and saves all the neccessary registers for the return to the interrupted task before switching back to FIQ mode in order to process the interrupt request. Because we arrive here from an interrupt the task that was executing has no opportunity to save registers and will be unaware on return that it was interrupted. For this reason we must save all of the general purpose registers (r0 to r12) as well as the SYS mode link register (lr). We do not save the stack pointer (r13) because we use it to store the other registers and will return it to the correct value before we return from the FIQ handler. The program counter (r15) does not need to be saved as it now points to this code.
 +
<br />       
 +
<br />To process the fast interrupt request the handler calls the DispatchFIQ function which will dispatch the interrupt to a registered handler for processing. The handler must clear the interrupt source before it returns or the fast interrupt will simply occur again immediately once reenabled.
 +
<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).
 
|-
 
|-
 
|}
 
|}

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

[Expand]
procedure ARMv8Init;
Description: To be documented


ARMv8 platform functions

[Expand]
procedure ARMv8CPUInit; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8FPUInit; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8MMUInit;
Description: To be documented


[Expand]
procedure ARMv8CacheInit; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8TimerInit(Frequency:LongWord); assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8PageTableInit;
Description: Initialize the Hardware Page Tables before enabling the MMU


[Expand]
procedure ARMv8SystemCall(Number:LongWord; Param1,Param2,Param3:LongWord); assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CPUGetMode:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CPUGetState:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CPUGetCurrent:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CPUGetMainID:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CPUGetMultiprocessorID:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CPUGetModel:LongWord;
Description: To be documented


[Expand]
function ARMv8CPUGetRevision:LongWord;
Description: To be documented


[Expand]
function ARMv8CPUGetDescription:String;
Description: To be documented


[Expand]
function ARMv8FPUGetState:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L1CacheGetType:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L1DataCacheGetSize:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L1DataCacheGetLineSize:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L1InstructionCacheGetSize:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L1InstructionCacheGetLineSize:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L2CacheGetType:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L2CacheGetSize:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8L2CacheGetLineSize:LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8Halt; assembler; nostackframe; public name'_haltproc';
Description: The purpose of the Wait For Interrupt operation is to put the processor in to a low power state


[Expand]
procedure ARMv8Pause; assembler; nostackframe;
Description: The purpose of the Wait For Interrupt operation is to put the processor in to a low power state


[Expand]
procedure ARMv8SendEvent; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8WaitForEvent; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8WaitForInterrupt; assembler; nostackframe;
Description: The purpose of the Wait For Interrupt operation is to put the processor in to a low power state


[Expand]
procedure ARMv8DataMemoryBarrier; assembler; nostackframe;
Description: Perform a data memory barrier operation using the c7 (Cache Operations) register of system control coprocessor CP15


[Expand]
procedure ARMv8DataSynchronizationBarrier; assembler; nostackframe;
Description: Perform a data synchronization barrier operation


[Expand]
procedure ARMv8InstructionMemoryBarrier; assembler; nostackframe;
Description: Perform a instruction synchronization barrier operation


[Expand]
procedure ARMv8InvalidateTLB; assembler; nostackframe;
Description: Perform an invalidate entire TLB operation using the c8 (TLB Operations) register of system control coprocessor CP15


[Expand]
procedure ARMv8InvalidateDataTLB; assembler; nostackframe;
Description: Perform an invalidate data TLB (Unlocked/Data) operation using the c8 (TLB Operations) register of system control coprocessor CP15


[Expand]
procedure ARMv8InvalidateInstructionTLB; assembler; nostackframe;
Description: Perform an invalidate instruction TLB (Unlocked/Instruction) operation using the c8 (TLB Operations) register of system control coprocessor CP15


[Expand]
procedure ARMv8InvalidateCache; assembler; nostackframe;
Description: Perform an invalidate both caches operation using the c7 (Cache Operations) register of system control coprocessor CP15


[Expand]
procedure ARMv8CleanDataCache; assembler; nostackframe;
Description: Perform a clean entire data cache operation


[Expand]
procedure ARMv8InvalidateDataCache; assembler; nostackframe;
Description: Perform an invalidate entire data cache operation


[Expand]
procedure ARMv8InvalidateL1DataCache; assembler; nostackframe;
Description: Perform an invalidate entire L1 data cache operation


[Expand]
procedure ARMv8CleanAndInvalidateDataCache; assembler; nostackframe;
Description: Perform a clean and invalidate entire data cache operation


[Expand]
procedure ARMv8InvalidateInstructionCache; assembler; nostackframe;
Description: Perform an invalidate entire instruction cache operation using the c7 (Cache Operations) register of system control coprocessor CP15


[Expand]
procedure ARMv8CleanDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Description: Perform a clean data cache by MVA to PoC operation


[Expand]
procedure ARMv8InvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Description: Perform an invalidate data cache by MVA to PoC operation


[Expand]
procedure ARMv8CleanAndInvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Description: Perform a clean and invalidate data cache by MVA to PoC operation


[Expand]
procedure ARMv8InvalidateInstructionCacheRange(Address,Size:LongWord); assembler; nostackframe; 
Description: Perform an invalidate instruction caches by MVA to PoU operation


[Expand]
procedure ARMv8CleanDataCacheSetWay(SetWay:LongWord); assembler; nostackframe;
Description: Perform a clean data cache line by set/way operation


[Expand]
procedure ARMv8InvalidateDataCacheSetWay(SetWay:LongWord); assembler; nostackframe;
Description: Perform an invalidate data cache line by set/way operation


[Expand]
procedure ARMv8CleanAndInvalidateDataCacheSetWay(SetWay:LongWord); assembler; nostackframe;
Description: Perform a clean and invalidate data cache line by set/way operation


[Expand]
procedure ARMv8FlushPrefetchBuffer; assembler; nostackframe;
Description: Perform an Instruction Synchronization Barrier operation


[Expand]
procedure ARMv8FlushBranchTargetCache; assembler; nostackframe;
Description: Perform a Flush Entire Branch Target Cache operation


[Expand]
procedure ARMv8ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle);  assembler; nostackframe;
Description: Perform a context switch from one thread to another as a result of a thread yielding, sleeping or waiting


[Expand]
procedure ARMv8ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle);  assembler; nostackframe;
Description: Perform a context switch from one thread to another as a result of an interrupt request (IRQ)


[Expand]
procedure ARMv8ContextSwitchFIQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
Description: Perform a context switch from one thread to another as a result of a fast interrupt request (FIQ)


[Expand]
procedure ARMv8ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
Description: Perform a context switch from one thread to another as a result of a software interrupt (SWI)


[Expand]
function ARMv8InterlockedOr(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic OR operation using LDREX/STREX


[Expand]
function ARMv8InterlockedXor(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic XOR operation using LDREX/STREX


[Expand]
function ARMv8InterlockedAnd(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic AND operation using LDREX/STREX


[Expand]
function ARMv8InterlockedDecrement(var Target:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic decrement operation using LDREX/STREX


[Expand]
function ARMv8InterlockedIncrement(var Target:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic increment operation using LDREX/STREX


[Expand]
function ARMv8InterlockedExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic exchange operation using LDREX/STREX


[Expand]
function ARMv8InterlockedAddExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic add and exchange operation using LDREX/STREX


[Expand]
function ARMv8InterlockedCompareExchange(var Target:LongInt; Source,Compare:LongInt):LongInt; assembler; nostackframe;
Description: Perform an atomic compare and exchange operation using LDREX/STREX


[Expand]
function ARMv8PageTableGetEntry(Address:PtrUInt):TPageTableEntry;
Description: Get and Decode the entry in the Page Table that corresponds to the supplied virtual address


[Expand]
function ARMv8PageTableSetEntry(const Entry:TPageTableEntry):LongWord;
Description: Encode and Set an entry in the Page Table that corresponds to the supplied virtual address


[Expand]
function ARMv8VectorTableGetEntry(Number:LongWord):PtrUInt;
Description: Return the address of the specified vector table entry number


[Expand]
function ARMv8VectorTableSetEntry(Number:LongWord; Address:PtrUInt):LongWord;
Description: Set the supplied address as the value of the specified vector table entry number


[Expand]
function ARMv8FirstBitSet(Value:LongWord):LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8CountLeadingZeros(Value:LongWord):LongWord; assembler; nostackframe;
Description: Equivalent of the GCC Builtin function __builtin_clz


ARMv8 thread functions

[Expand]
procedure ARMv8PrimaryInit; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8SpinLock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Lock an existing Spin entry


[Expand]
function ARMv8SpinUnlock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Unlock an existing Spin entry


[Expand]
function ARMv8SpinLockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Lock an existing Spin entry, disable IRQ and save the previous IRQ state


[Expand]
function ARMv8SpinUnlockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Unlock an existing Spin entry and restore the previous IRQ state


[Expand]
function ARMv8SpinLockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Lock an existing Spin entry, disable FIQ and save the previous FIQ state


[Expand]
function ARMv8SpinUnlockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Unlock an existing Spin entry and restore the previous FIQ state


[Expand]
function ARMv8SpinLockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Lock an existing Spin entry, disable IRQ and FIQ and save the previous IRQ/FIQ state


[Expand]
function ARMv8SpinUnlockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Description: Unlock an existing Spin entry and restore the previous IRQ/FIQ state


[Expand]
function ARMv8SpinCheckIRQ(Spin:PSpinEntry):Boolean;
Description: To be documented


[Expand]
function ARMv8SpinCheckFIQ(Spin:PSpinEntry):Boolean;
Description: To be documented


[Expand]
function ARMv8SpinExchangeIRQ(Spin1,Spin2:PSpinEntry):LongWord;
Description: To be documented


[Expand]
function ARMv8SpinExchangeFIQ(Spin1,Spin2:PSpinEntry):LongWord;
Description: To be documented


[Expand]
function ARMv8MutexLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Description: Lock an existing Mutex entry


[Expand]
function ARMv8MutexUnlock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Description: Unlock an existing Mutex entry


[Expand]
function ARMv8MutexTryLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Description: Try to lock an existing Mutex entry


[Expand]
function ARMv8ThreadGetCurrent:TThreadHandle; assembler; nostackframe;
Description: Get the current thread id from the c13 (Thread and process ID) register of system control coprocessor CP15


[Expand]
function ARMv8ThreadSetCurrent(Thread:TThreadHandle):LongWord; assembler; nostackframe;
Description: Set the current thread id in the c13 (Thread and process ID) register of system control coprocessor CP15


[Expand]
function ARMv8ThreadSetupStack(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;
Description: Set up the context record and arguments on the stack for a new thread


ARMv8 IRQ functions

[Expand]
function ARMv8DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Description: To be documented


ARMv8 FIQ functions

[Expand]
function ARMv8DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Description: To be documented


ARMv8 SWI functions

[Expand]
function ARMv8DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle; inline;
Description: To be documented


ARMv8 interrupt functions

[Expand]
procedure ARMv8ResetHandler; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8UndefinedInstructionHandler; assembler; nostackframe;
Description: Handle an undefined instruction exception


[Expand]
procedure ARMv8SoftwareInterruptHandler; assembler; nostackframe;
Description: Handle a software interrupt (SWI) from a system call (SVC)


[Expand]
procedure ARMv8PrefetchAbortHandler; assembler; nostackframe;
Description: Handle a prefetch abort exception


[Expand]
procedure ARMv8DataAbortHandler; assembler; nostackframe;
Description: Handle a data abort exception


[Expand]
procedure ARMv8ReservedHandler; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8IRQHandler; assembler; nostackframe;
Description: Handle an interrupt request IRQ from an interrupt source


[Expand]
procedure ARMv8FIQHandler; assembler; nostackframe;
Description: Handle a fast interrupt request FIQ from an interrupt source


Return to Unit Reference