Difference between revisions of "Unit PlatformARMv6"
Line 1,507: | Line 1,507: | ||
<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 /> | ||
+ | |||
+ | '''ARMv6 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 ARMv6GetFPEXC: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 ARMv6GetFPSCR: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 ARMv6StartMMU; 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 ARMv6GetPageTableCoarse(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 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </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 ARMv6SetPageTableCoarse(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 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | Caller must call ARMv6InvalidateTLB 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 ARMv6GetPageTableLarge(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 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </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 ARMv6SetPageTableLarge(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;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords | ||
+ | See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | <br />Caller must call ARMv6InvalidateTLB 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 ARMv6GetPageTableSmall(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 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </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 ARMv6SetPageTableSmall(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 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | Caller must call ARMv6InvalidateTLB 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 ARMv6GetPageTableSection(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 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </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 ARMv6SetPageTableSection(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 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | Caller must call ARMv6InvalidateTLB 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 ARMv6SetPageTableSupersection(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;" | ||
+ | |- | ||
+ | ! '''Note''' | ||
+ | | Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords | ||
+ | See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | <br />Caller must call ARMv6InvalidateTLB after changes if MMU is enabled | ||
|- | |- | ||
|} | |} |
Revision as of 04:39, 21 October 2016
Return to Unit Reference
Description
The ARMv6 (ARM11) does not support WFI, WFE, DMB, DSB or ISB instructions, these must be done using MCR operations on the system control processor registers.
The ARMv6 supports the LDREX/STREX instructions for syncronisation (Lock/Mutex/Semaphore etc) but only if the MMU is enabled.
Constants
To be documented
Type definitions
To be documented
Public variables
To be documented
Function declarations
Initialization functions
procedure ARMv6Init;
Note | None documented |
---|
ARMv6 platform functions
procedure ARMv6CPUInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6FPUInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6MMUInit;
Note | None documented |
---|
procedure ARMv6CacheInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6PageTableInit;
Note | See page 6-36 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetMode:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetState:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetMainID:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetModel:LongWord;
Note | None documented |
---|
function ARMv6CPUGetRevision:LongWord;
Note | None documented |
---|
function ARMv6CPUGetDescription:String;
Note | None documented |
---|
function ARMv6FPUGetState:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1CacheGetType:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1DataCacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1DataCacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1InstructionCacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1InstructionCacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6Halt; assembler; nostackframe; public name'_haltproc';
Note | See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual |
---|
procedure ARMv6Pause; assembler; nostackframe;
Note | See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual |
---|
procedure ARMv6WaitForEvent; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6WaitForInterrupt; assembler; nostackframe;
Note | See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual |
---|
procedure ARMv6DataMemoryBarrier; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual
Note that this is also available in the FPC RTL as ReadBarrier/WriteBarrier See: \source\rtl\arm\arm.inc
|
---|
procedure ARMv6DataSynchronizationBarrier; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InstructionMemoryBarrier; assembler; nostackframe;
Note | The ARM1176JZF-S Technical Reference Manual states on page 5-10 (section 5.5) that a Flush Prefetch Buffer operation also acts as an IMB
See page 3-79 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateTLB; assembler; nostackframe;
Note | See page 3-86 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataTLB; assembler; nostackframe;
Note | See page 3-86 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionTLB; assembler; nostackframe;
Note | See page 3-86 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanDataCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanAndInvalidateDataCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanAndInvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionCacheRange(Address,Size:LongWord); assembler; nostackframe;
Note | See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6FlushPrefetchBuffer; assembler; nostackframe;
Note | See page 3-79 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6FlushBranchTargetCache; assembler; nostackframe;
Note | See page 3-79 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewThread | 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 ARMv6ContextSwitchIRQ(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 ARMv6ContextSwitchFIQ(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 ARMv6ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle);
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 ARMv6InterlockedOr(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedXor(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedAnd(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedDecrement(var Target:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedIncrement(var Target:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedAddExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedCompareExchange(var Target:LongInt; Source,Compare:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6PageTableGetEntry(Address:PtrUInt):TPageTableEntry;
Note | None documented |
---|
function ARMv6PageTableSetEntry(const Entry:TPageTableEntry):LongWord;
Note | None documented |
---|
function ARMv6VectorTableGetEntry(Number:LongWord):PtrUInt;
Note | None documented |
---|
function ARMv6VectorTableSetEntry(Number:LongWord; Address:PtrUInt):LongWord;
Note | None documented |
---|
function ARMv6FirstBitSet(Value:LongWord):LongWord; assembler; nostackframe;
Note | ARM arm states that CLZ is supported for ARMv5 and above |
---|
function ARMv6CountLeadingZeros(Value:LongWord):LongWord; assembler; nostackframe;
Note | ARM arm states that CLZ is supported for ARMv5 and above |
---|
ARMv6 thread functions
procedure ARMv6PrimaryInit; assembler; nostackframe;
Note | None documented |
---|
function ARMv6SpinLock(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 ARMv6SpinUnlock(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 ARMv6SpinLockIRQ(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 ARMv6SpinUnlockIRQ(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 ARMv6SpinLockFIQ(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 ARMv6SpinUnlockFIQ(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 ARMv6SpinLockIRQFIQ(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 ARMv6SpinUnlockIRQFIQ(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 ARMv6SpinCheckIRQ(Spin:PSpinEntry):Boolean;
Return | True if the mask would enable IRQ on restore, False if it would not |
---|
function ARMv6SpinCheckFIQ(Spin:PSpinEntry):Boolean;
Return | True if the mask would enable FIQ on restore, False if it would not |
---|
function ARMv6SpinExchangeIRQ(Spin1,Spin2:PSpinEntry):LongWord;
Note | None documented |
---|
function ARMv6SpinExchangeFIQ(Spin1,Spin2:PSpinEntry):LongWord;
Note | None documented |
---|
function ARMv6MutexLock(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 ARMv6MutexUnlock(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 ARMv6MutexTryLock(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 ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;
Note | See page 3-129 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6ThreadSetCurrent(Thread:TThreadHandle):LongWord; assembler; nostackframe;
Note | Set the current thread id in the c13 (Thread and process ID) register of system control coprocessor CP15
See page 3-129 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6ThreadSetupStack(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:
|
ARMv6 IRQ functions
function ARMv6DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Note | None documented |
---|
ARMv6 FIQ functions
function ARMv6DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Note | None documented |
---|
ARMv6 SWI functions
function ARMv6DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle; inline;
Note | None documented |
---|
ARMv6 interrupt functions
procedure ARMv6ResetHandler; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6UndefinedInstructionHandler; assembler; nostackframe;
Note | This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup |
---|
procedure ARMv6SoftwareInterruptHandler; 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 ARMv6PrefetchAbortHandler; assembler; nostackframe;
Note | This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup |
---|
procedure ARMv6DataAbortHandler; assembler; nostackframe;
Note | This routine is registered as the vector for data abort exception in the vector table loaded during startup |
---|
procedure ARMv6ReservedHandler; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6IRQHandler; assembler; nostackframe;
Note | This routine is registered as the vector for IRQ requests in the vector table loaded during startup.
|
---|
procedure ARMv6FIQHandler; assembler; nostackframe;
Note | This routine is registered as the vector for FIQ requests in the vector table loaded during startup.
|
---|
ARMv6 helper functions
function ARMv6GetFPEXC:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6GetFPSCR:LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6StartMMU; assembler; nostackframe;
Note | None documented |
---|
function ARMv6GetPageTableCoarse(Address:PtrUInt):LongWord;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled |
---|
function ARMv6GetPageTableLarge(Address:PtrUInt):LongWord;
Note | See page 6-40 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Note | Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords
See page 6-40 of the ARM1176JZF-S Technical Reference Manual
|
---|
function ARMv6GetPageTableSmall(Address:PtrUInt):LongWord;
Note | See page 6-40 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Note | See page 6-40 of the ARM1176JZF-S Technical Reference Manual
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled |
---|
function ARMv6GetPageTableSection(Address:PtrUInt):LongWord;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled |
---|
function ARMv6SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Note | Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords
See page 6-39 of the ARM1176JZF-S Technical Reference Manual
|
---|
Return to Unit Reference