Difference between revisions of "Unit PlatformARMv6"

From Ultibo.org
Jump to: navigation, search
 
(8 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
'''Ultibo Platform interface unit for ARMv6'''
+
'''Ultibo Platform Interface unit for ARMv6'''
  
 
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 (ARM11) does not support WFI, WFE, DMB, DSB or ISB instructions, these must be done using MCR operations on the system control processor registers.
Line 1,155: Line 1,155:
 
|-
 
|-
 
| <code>ARMv6Initialized:Boolean;</code>
 
| <code>ARMv6Initialized:Boolean;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}
Line 1,161: Line 1,161:
 
|-
 
|-
 
| <code>ARMv6DummySTREX:LongWord;</code>
 
| <code>ARMv6DummySTREX:LongWord;</code>
| style="width: 65%;"|Variable to allow a dummy STREX operation to be performed after each context switch as required by ARM documentation
+
| style="width: 40%;"|Variable to allow a dummy STREX operation to be performed after each context switch as required by ARM documentation
 
|-
 
|-
 
|}
 
|}
Line 1,170: Line 1,170:
 
|-
 
|-
 
| <code>ARMv6PageTableInitHandler:TARMv6PageTableInit;</code>
 
| <code>ARMv6PageTableInitHandler:TARMv6PageTableInit;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}
Line 1,179: Line 1,179:
 
|-
 
|-
 
| <code>ARMv6DispatchIRQHandler:TARMv6DispatchIRQ;</code>
 
| <code>ARMv6DispatchIRQHandler:TARMv6DispatchIRQ;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}
Line 1,188: Line 1,188:
 
|-
 
|-
 
| <code>ARMv6DispatchFIQHandler:TARMv6DispatchFIQ;</code>
 
| <code>ARMv6DispatchFIQHandler:TARMv6DispatchFIQ;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}
Line 1,197: Line 1,197:
 
|-
 
|-
 
| <code>ARMv6DispatchSWIHandler:TARMv6DispatchSWI;</code>
 
| <code>ARMv6DispatchSWIHandler:TARMv6DispatchSWI;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}
Line 1,214: Line 1,214:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,229: Line 1,229:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,241: Line 1,241:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,253: Line 1,253:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,265: Line 1,265:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,277: Line 1,277:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-36 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-36 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,289: Line 1,289:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,301: Line 1,301:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,313: Line 1,313:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,325: Line 1,325:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,337: Line 1,337:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,349: Line 1,349:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,361: Line 1,361:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,373: Line 1,373:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,385: Line 1,385:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,397: Line 1,397:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,409: Line 1,409:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,421: Line 1,421:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,433: Line 1,433:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,440: Line 1,440:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6Halt; assembler; nostackframe; public name'_haltproc';</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv6Halt; assembler; nostackframe; public name '_haltproc';</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' The purpose of the Wait For Interrupt operation is to put the processor in to a low power state</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' The purpose of the Wait For Interrupt operation is to put the processor in to a low power state</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual
 
| See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual
 
|-
 
|-
Line 1,457: Line 1,457:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual
 
| See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual
 
|-
 
|-
Line 1,469: Line 1,469:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 1,481: Line 1,481:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual
 
| See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual
 
|-
 
|-
Line 1,493: Line 1,493:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| 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
 
Note that this is also available in the FPC RTL as ReadBarrier/WriteBarrier See: \source\rtl\arm\arm.inc
<br />Implementation is exactly the same for either.
+
<br />Implementation is exactly the same for either
 
|-
 
|-
 
|}
 
|}
Line 1,507: Line 1,507:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,519: Line 1,519:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! 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
 
| 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
 
See page 3-79 of the ARM1176JZF-S Technical Reference Manual
Line 1,532: Line 1,532:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-86 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-86 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,544: Line 1,544:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-86 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-86 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,556: Line 1,556:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-86 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-86 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,568: Line 1,568:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,580: Line 1,580:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,592: Line 1,592:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,604: Line 1,604:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,616: Line 1,616:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-74 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,623: Line 1,623:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6CleanDataCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv6CleanDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean data cache range operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean data cache range operation</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual
+
| See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
 
|}
 
|}
Line 1,635: Line 1,635:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6InvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv6CleanDataCacheRange(Address:PtrUInt; Size:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean data cache range, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| See page 3-71/3-76 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;">procedure ARMv6InvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate data cache range operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate data cache range operation</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual
+
| See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
 
|}
 
|}
Line 1,647: Line 1,659:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6CleanAndInvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv6InvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate data cache range, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| See page 3-71/3-76 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;">procedure ARMv6CleanAndInvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean and invalidate data cache range operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean and invalidate data cache range operation</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual
+
| See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
 
|}
 
|}
Line 1,659: Line 1,683:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6InvalidateInstructionCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv6CleanAndInvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean and invalidate data cache range, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| See page 3-71/3-76 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;">procedure ARMv6InvalidateInstructionCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate instruction cache range operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate instruction cache range operation</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| See page 3-71 / 3-76 of the ARM1176JZF-S Technical Reference Manual
+
| See page 3-71/3-76 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;">procedure ARMv6InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord);</pre>
 +
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate instruction cache range operation, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges</div>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
! Note
 +
| See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
 
|}
 
|}
Line 1,676: Line 1,724:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-79 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-79 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,688: Line 1,736:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-79 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-79 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 1,700: Line 1,748:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''OldStack'''
+
! OldStack
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
|-
 
|-
! '''NewThread'''
+
! NewThread
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
|-
 
|-
! '''NewThread'''
+
! NewThread
 
| The handle of the new thread to switch to (Passed in r2)
 
| The handle of the new thread to switch to (Passed in r2)
 
|-
 
|-
! '''Note'''
+
! Note
| At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
+
| At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />
 
<br />
Line 1,784: Line 1,832:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''OldStack'''
+
! OldStack
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
|-
 
|-
! '''NewStack'''
+
! NewStack
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
|-
 
|-
! '''NewThread'''
+
! NewThread
 
| The handle of the new thread to switch to (Passed in r2)
 
| The handle of the new thread to switch to (Passed in r2)
 
|-
 
|-
! '''Note'''
+
! Note
| At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
+
| At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />
 
<br />
Line 1,857: Line 1,905:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''OldStack'''
+
! OldStack
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
|-
 
|-
! '''NewStack'''
+
! NewStack
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
|-
 
|-
! '''NewThread'''
+
! NewThread
 
| The handle of the new thread to switch to (Passed in r2)
 
| The handle of the new thread to switch to (Passed in r2)
 
|-
 
|-
! '''Note'''
+
! Note
| At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
+
| At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />
 
<br />
Line 1,930: Line 1,978:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''OldStack'''
+
! OldStack
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
| The address to save the stack pointer to for the current thread (Passed in r0)
 
|-
 
|-
! '''NewStack'''
+
! NewStack
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
| The address to restore the stack pointer from for the new thread (Passed in r1)
 
|-
 
|-
! '''NewThread'''
+
! NewThread
 
| The handle of the new thread to switch to (Passed in r2)
 
| The handle of the new thread to switch to (Passed in r2)
 
|-
 
|-
! '''Note'''
+
! Note
| At the point of the actual context switch (str sp / ldr sp) the thread stacks will look like this:
+
| At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />(See: ARMv6ThreadSetupStack for additional information)
 
<br />
 
<br />
Line 2,003: Line 2,051:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ??? of the ARM1176JZF-S Technical Reference Manual
 
| See page ??? of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,015: Line 2,063:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ??? of the ARM1176JZF-S Technical Reference Manual
 
| See page ??? of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,027: Line 2,075:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ??? of the ARM1176JZF-S Technical Reference Manual
 
| See page ??? of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,039: Line 2,087:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,051: Line 2,099:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,063: Line 2,111:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,075: Line 2,123:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,087: Line 2,135:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
| See page 8-6 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,094: Line 2,142:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6PageTableGetEntry(Address:PtrUInt):TPageTableEntry;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv6PageTableGetEntry(Address:PtrUInt; var Entry:TPageTableEntry);</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get and Decode the entry in the Page Table that corresponds to the supplied virtual address</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get and Decode the entry in the Page Table that corresponds to the supplied virtual address</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,111: Line 2,159:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,123: Line 2,171:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,135: Line 2,183:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,147: Line 2,195:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| ARM arm states that CLZ is supported for ARMv5 and above
 
| ARM arm states that CLZ is supported for ARMv5 and above
 
|-
 
|-
Line 2,159: Line 2,207:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| ARM arm states that CLZ is supported for ARMv5 and above
 
| ARM arm states that CLZ is supported for ARMv5 and above
 
|-
 
|-
Line 2,174: Line 2,222:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,186: Line 2,234:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,201: Line 2,249:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,216: Line 2,264:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,231: Line 2,279:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,246: Line 2,294:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,261: Line 2,309:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,276: Line 2,324:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,291: Line 2,339:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Spin'''
+
! Spin
 
| Pointer to the Spin entry to lock (Passed in R0)
 
| Pointer to the Spin entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,306: Line 2,354:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
| True if the mask would enable IRQ on restore, False if it would not
+
| True if the mask would enable IRQ on restore, False if it would not.
 
|-
 
|-
 
|}
 
|}
Line 2,318: Line 2,366:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Return'''
+
! Return
| True if the mask would enable FIQ on restore, False if it would not
+
| True if the mask would enable FIQ on restore, False if it would not.
 
|-
 
|-
 
|}
 
|}
Line 2,330: Line 2,378:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,342: Line 2,390:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,354: Line 2,402:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Mutex'''
+
! Mutex
 
| Pointer to the Mutex entry to lock (Passed in R0)
 
| Pointer to the Mutex entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,369: Line 2,417:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Mutex'''
+
! Mutex
 
| Pointer to the Mutex entry to lock (Passed in R0)
 
| Pointer to the Mutex entry to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
| ERROR_SUCCESS if completed or another error code on failure (Returned in R0)
 
|-
 
|-
Line 2,384: Line 2,432:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Mutex'''
+
! Mutex
 
| Pointer to the Mutex entry to try to lock (Passed in R0)
 
| Pointer to the Mutex entry to try to lock (Passed in R0)
 
|-
 
|-
! '''Return'''
+
! Return
| ERROR_SUCCESS if completed, ERROR_LOCKED if already locked or another error code on failure (Returned in R0)
+
| ERROR_SUCCESS if completed, ERROR_LOCKED if already locked or another error code on failure (Returned in R0).
 
|-
 
|-
 
|}
 
|}
Line 2,395: Line 2,443:
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;">
 
<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 ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;</pre>
 
<pre style="border: 0; padding-bottom:0px;">function ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current thread id from the c13 (Thread and process ID) register of system control coprocessor CP15</div>
+
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current thread Id from the c13 (Thread and process ID) register of system control coprocessor CP15</div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 3-129 of the ARM1176JZF-S Technical Reference Manual
 
| See page 3-129 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,411: Line 2,459:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
| Set the current thread id in the c13 (Thread and process ID) register of system control coprocessor CP15
+
| 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
 
See page 3-129 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,424: Line 2,472:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''StackBase'''
+
! StackBase
 
| Pointer to the base (highest address) of the allocated stack (as returned by ThreadAllocateStack
 
| Pointer to the base (highest address) of the allocated stack (as returned by ThreadAllocateStack
 
|-
 
|-
! '''StartProc'''
+
! StartProc
 
| The procedure the thread will start executing when resumed
 
| The procedure the thread will start executing when resumed
 
|-
 
|-
! '''ReturnProc'''
+
! ReturnProc
 
| The procedure the thread will return to on exit
 
| The procedure the thread will return to on exit
 
|-
 
|-
! '''Return'''
+
! Return
| Pointer to the starting address of the stack, which will be the Stack Pointer on the first context switch
+
| Pointer to the starting address of the stack, which will be the Stack Pointer on the first context switch.
 
|-
 
|-
! '''Note'''
+
! Note
 
| At the point of a context switch the thread stack will look like this:
 
| At the point of a context switch the thread stack will look like this:
 
<br />(Base "Highest Address" of Stack)
 
<br />(Base "Highest Address" of Stack)
Line 2,516: Line 2,564:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,531: Line 2,579:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,546: Line 2,594:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,561: Line 2,609:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,573: Line 2,621:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup
 
| This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup
 
|-
 
|-
Line 2,585: Line 2,633:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! 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).
 
| 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 />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.
Line 2,611: Line 2,659:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup
 
| This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup
 
|-
 
|-
Line 2,623: Line 2,671:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| This routine is registered as the vector for data abort exception in the vector table loaded during startup
 
| This routine is registered as the vector for data abort exception in the vector table loaded during startup
 
|-
 
|-
Line 2,635: Line 2,683:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,647: Line 2,695:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| This routine is registered as the vector for IRQ requests in the vector table loaded during startup.
 
| 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 />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.
Line 2,670: Line 2,718:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| This routine is registered as the vector for FIQ requests in the vector table loaded during startup.
 
| 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 />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.
Line 2,698: Line 2,746:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,710: Line 2,758:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,722: Line 2,770:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,734: Line 2,782:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,746: Line 2,794:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled
Line 2,759: Line 2,807:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-40 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-40 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,771: Line 2,819:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords
 
| 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
 
See page 6-40 of the ARM1176JZF-S Technical Reference Manual
Line 2,785: Line 2,833:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-40 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-40 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,797: Line 2,845:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-40 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-40 of the ARM1176JZF-S Technical Reference Manual
 
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled
Line 2,810: Line 2,858:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
|-
 
|-
Line 2,822: Line 2,870:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
| See page 6-39 of the ARM1176JZF-S Technical Reference Manual
 
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled
Line 2,835: Line 2,883:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords
 
| 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
 
See page 6-39 of the ARM1176JZF-S Technical Reference Manual

Latest revision as of 01:35, 22 April 2022

Return to Unit Reference


Description


Ultibo Platform Interface unit for ARMv6

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



[Expand]
ARMv6 page tables shift ARMV6_PAGE_TABLES_*


[Expand]
ARMv6 CP15 C0 main Id ARMV6_CP15_C0_MAINID_*


[Expand]
ARMv6 CP15 C0 cache type ARMV6_CP15_C0_CTR_*


[Expand]
ARMv6 CP15 C1 control ARMV6_CP15_C1_*


[Expand]
ARMv6 CP15 C1 auxiliary control ARMV6_CP15_C1_AUX_*


[Expand]
ARMv6 CP15 C1 coprocessor access control ARMV6_CP15_C1_CP*


[Expand]
ARMv6 CP15 C2 translation table base ARMV6_CP15_C2_TTBR_*


[Expand]
ARMv6 CP15 C3 domain access control ARMV6_CP15_C3_DOMAIN*


[Expand]
ARMv6 floating-point exception ARMV6_FPEXC_*


[Expand]
ARMv6 level one descriptor type ARMV6_L1D_TYPE_*


[Expand]
ARMv6 level one descriptor flag ARMV6_L1D_FLAG_*


[Expand]
ARMv6 level one descriptor mask ARMV6_L1D_*_MASK


[Expand]
ARMv6 level one descriptor TEX value ARMV6_L1D_TEX*


[Expand]
ARMv6 level one descriptor AP value ARMV6_L1D_AP*


[Expand]
ARMv6 level one descriptor permission value ARMV6_L1D_ACCESS_*


[Expand]
ARMv6 level one descriptor cache value ARMV6_L1D_CACHE_*


[Expand]
ARMv6 level two descriptor type ARMV6_L2D_TYPE_*


[Expand]
ARMv6 level two descriptor flag ARMV6_L2D_FLAG_*


[Expand]
ARMv6 level two descriptor mask ARMV6_L2D_*_MASK


[Expand]
ARMv6 level two descriptor large TEX value ARMV6_L2D_LARGE_TEX*


[Expand]
ARMv6 level two descriptor small TEX value ARMV6_L2D_SMALL_TEX*


[Expand]
ARMv6 level two descriptor AP value ARMV6_L2D_AP*


[Expand]
ARMv6 level two descriptor permission value ARMV6_L2D_ACCESS_*


[Expand]
ARMv6 level two descriptor large cache value ARMV6_L2D_LARGE_CACHE_*


[Expand]
ARMv6 level two descriptor small cache value ARMV6_L2D_SMALL_CACHE_*


[Expand]
ARMv6 specific constants ARMV6_*


Type definitions



ARMv6 page table initialization

TARMv6PageTableInit = procedure;

ARMv6 dispatch IRQ

TARMv6DispatchIRQ = function(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;

ARMv6 dispatch FIQ

TARMv6DispatchFIQ = function(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;

ARMv6 dispatch SWI

TARMv6DispatchSWI = function(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle;


Public variables



ARMv6 specific variables

ARMv6Initialized:Boolean;
ARMv6DummySTREX:LongWord; Variable to allow a dummy STREX operation to be performed after each context switch as required by ARM documentation

Page table handlers

ARMv6PageTableInitHandler:TARMv6PageTableInit;

IRQ handlers

ARMv6DispatchIRQHandler:TARMv6DispatchIRQ;

FIQ handlers

ARMv6DispatchFIQHandler:TARMv6DispatchFIQ;

SWI handlers

ARMv6DispatchSWIHandler:TARMv6DispatchSWI;


Function declarations



Initialization functions

[Expand]
procedure ARMv6Init;
Description: To be documented


ARMv6 platform functions

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


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


[Expand]
procedure ARMv6MMUInit;
Description: To be documented


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


[Expand]
procedure ARMv6Halt; 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 ARMv6Pause; assembler; nostackframe;
Description: The purpose of the Wait For Interrupt operation is to put the processor in to a low power state


[Expand]
procedure ARMv6WaitForEvent; assembler; nostackframe;
Description: Wait For Event not available in ARMv6, do a Wait For Interrupt instead


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


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


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


[Expand]
procedure ARMv6InstructionMemoryBarrier; assembler; nostackframe;
Description: Perform a Flush Prefetch Buffer operation


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


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


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


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


[Expand]
procedure ARMv6CleanDataCache; assembler; nostackframe;
Description: Perform a clean entire data cache operation using the c7 (Cache Operations) register of system control coprocessor CP15


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


[Expand]
procedure ARMv6CleanAndInvalidateDataCache; assembler; nostackframe;
Description: Perform a clean and invalidate entire data cache operation using the c7 (Cache Operations) register of system control coprocessor CP15


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


[Expand]
procedure ARMv6CleanDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Description: Perform a clean data cache range operation


[Expand]
procedure ARMv6CleanDataCacheRange(Address:PtrUInt; Size:LongWord);
Description: Perform a clean data cache range, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges


[Expand]
procedure ARMv6InvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Description: Perform an invalidate data cache range operation


[Expand]
procedure ARMv6InvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);
Description: Perform an invalidate data cache range, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges


[Expand]
procedure ARMv6CleanAndInvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Description: Perform a clean and invalidate data cache range operation


[Expand]
procedure ARMv6CleanAndInvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);
Description: Perform a clean and invalidate data cache range, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges


[Expand]
procedure ARMv6InvalidateInstructionCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Description: Perform an invalidate instruction cache range operation


[Expand]
procedure ARMv6InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord);
Description: Perform an invalidate instruction cache range operation, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges


[Expand]
procedure ARMv6FlushPrefetchBuffer; assembler; nostackframe;
Description: Perform a Flush Prefetch Buffer operation


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


[Expand]
procedure ARMv6ContextSwitch(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 ARMv6ContextSwitchIRQ(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 ARMv6ContextSwitchFIQ(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 ARMv6ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle);
Description: Perform a context switch from one thread to another as a result of a software interrupt (SWI)


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


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


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


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


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


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


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


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


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


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


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


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


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


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


ARMv6 thread functions

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


[Expand]
function ARMv6ThreadSetCurrent(Thread:TThreadHandle):LongWord; assembler; nostackframe;
Description: To be documented


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


ARMv6 IRQ functions

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


ARMv6 FIQ functions

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


ARMv6 SWI functions

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


ARMv6 interrupt functions

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


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


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


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


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


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


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


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


ARMv6 helper functions

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


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


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


[Expand]
function ARMv6GetPageTableCoarse(Address:PtrUInt):LongWord;
Description: Get the descriptor for a Coarse Page Table entry (1MB)


[Expand]
function ARMv6SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;
Description: Set the descriptor for a Coarse Page Table entry (1MB)


[Expand]
function ARMv6GetPageTableLarge(Address:PtrUInt):LongWord;
Description: Get the descriptor for a Large Page Table entry (64KB)


[Expand]
function ARMv6SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Description: Set the descriptor for a Large Page Table entry (64KB)


[Expand]
function ARMv6GetPageTableSmall(Address:PtrUInt):LongWord;
Description: Get the descriptor for a Small Page Table entry (4KB)


[Expand]
function ARMv6SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Description: Set the descriptor for a Small Page Table entry (4KB)


[Expand]
function ARMv6GetPageTableSection(Address:PtrUInt):LongWord;
Description: Get the descriptor for a Page Table Section (1MB) or Supersection (16MB)


[Expand]
function ARMv6SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Description: Set the descriptor for a Page Table Section (1MB)


[Expand]
function ARMv6SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Description: Set the descriptor for a Page Table Supersection (16MB)


Return to Unit Reference