Difference between revisions of "Unit PlatformARMv8"

From Ultibo.org
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
'''Ultibo Platform interface unit for ARMv8'''
+
'''Ultibo Platform Interface unit for ARMv8'''
  
 
The ARMv8 does not support the SWP/SWPB instructions for syncronisation (Lock/Mutex/Semaphore etc) unless enabled.
 
The ARMv8 does not support the SWP/SWPB instructions for syncronisation (Lock/Mutex/Semaphore etc) unless enabled.
Line 2,171: 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,186: Line 2,186:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,198: Line 2,198:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,210: Line 2,210:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,222: 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,234: Line 2,234:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,246: Line 2,246:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,258: Line 2,258:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,270: Line 2,270:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,282: Line 2,282:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,294: Line 2,294:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,306: Line 2,306:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,318: Line 2,318:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,330: Line 2,330:
 
{| 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,342:
 
{| 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,354:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,366: Line 2,366:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,378: 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,390: 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,402: Line 2,402:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,414: Line 2,414:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,426: Line 2,426:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,438: Line 2,438:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,450: Line 2,450:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,462: Line 2,462:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 2,469: Line 2,469:
 
<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 ARMv8Halt; assembler; nostackframe; public name'_haltproc';</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv8Halt; 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 A8-810 of the ARMv7 Architecture Reference Manual
 
| See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,486: Line 2,486:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual
 
| See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,498: Line 2,498:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Page A8-316 of the ARMv7 Architecture Reference Manual
 
| See Page A8-316 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,510: Line 2,510:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Page A8-808 of the ARMv7 Architecture Reference Manual
 
| See Page A8-808 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,522: Line 2,522:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual
 
| See Standby mode on page A8-810 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,534: Line 2,534:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page A8-90 of the ARMv7 Architecture Reference Manual
 
| See page A8-90 of the ARMv7 Architecture Reference Manual
 
Note that this is also available in the FPC RTL as ReadBarrier/WriteBarrier See: \source\rtl\arm\arm.inc
 
Note that this is also available in the FPC RTL as ReadBarrier/WriteBarrier See: \source\rtl\arm\arm.inc
Line 2,548: Line 2,548:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page A8-92 of the ARMv7 Architecture Reference Manual
 
| See page A8-92 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,560: Line 2,560:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page A8-102 of the ARMv7 Architecture Reference Manual
 
| See page A8-102 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,572: Line 2,572:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-138 of the ARMv7 Architecture Reference Manual
 
| See page B3-138 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,584: Line 2,584:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-138 of the ARMv7 Architecture Reference Manual
 
| See page B3-138 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,596: Line 2,596:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-138 of the ARMv7 Architecture Reference Manual
 
| See page B3-138 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,608: Line 2,608:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,620: Line 2,620:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,632: Line 2,632:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,644: Line 2,644:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,656: Line 2,656:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,668: Line 2,668:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,675: Line 2,675:
 
<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 ARMv8CleanDataCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv8InvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);</pre>
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean data cache by MVA to PoC operation</div>
+
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
+
{| class="wikitable" style="font-size: 14px; background: white;"
+
|-
+
! '''Note'''
+
| See page B3-127 of the ARMv7 Architecture 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 ARMv8InvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate data cache by MVA to PoC operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate data cache by MVA to PoC 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 B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,699: Line 2,687:
 
<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 ARMv8CleanAndInvalidateDataCacheRange(Address,Size:LongWord); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv8CleanAndInvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean and invalidate data cache by MVA to PoC operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a clean and invalidate data cache by MVA to PoC 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 B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,711: Line 2,699:
 
<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 ARMv8InvalidateInstructionCacheRange(Address,Size:LongWord); assembler; nostackframe; </pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv8InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord);</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate instruction caches by MVA to PoU operation</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate instruction caches by MVA to PoU 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 B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,728: Line 2,716:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''SetWay'''
+
! SetWay
 
| Set/Way/Level will be passed in r0
 
| Set/Way/Level will be passed in r0
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,743: Line 2,731:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''SetWay'''
+
! SetWay
 
| Set/Way/Level will be passed in r0
 
| Set/Way/Level will be passed in r0
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,758: Line 2,746:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''SetWay'''
+
! SetWay
 
| Set/Way/Level will be passed in r0
 
| Set/Way/Level will be passed in r0
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,773: Line 2,761:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page A8-102 of the ARMv7 Architecture Reference Manual
 
| See page A8-102 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,785: Line 2,773:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
| See page B3-127 of the ARMv7 Architecture Reference Manual
 
|-
 
|-
Line 2,792: Line 2,780:
 
<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 ARMv8ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv8ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a context switch from one thread to another as a result of a thread yielding, sleeping or waiting</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a context switch from one thread to another as a result of a thread yielding, sleeping or waiting</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;"
 
|-
 
|-
! '''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: ARMv8ThreadSetupStack for additional information)
 
<br />(See: ARMv8ThreadSetupStack for additional information)
Line 2,876: Line 2,864:
 
<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 ARMv8ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;</pre>
+
<pre style="border: 0; padding-bottom:0px;">procedure ARMv8ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;</pre>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a context switch from one thread to another as a result of an interrupt request (IRQ)</div>
 
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform a context switch from one thread to another as a result of an interrupt request (IRQ)</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;"
 
|-
 
|-
! '''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: ARMv8ThreadSetupStack for additional information)
 
<br />(See: ARMv8ThreadSetupStack for additional information)
Line 2,954: Line 2,942:
 
{| 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: ARMv8ThreadSetupStack for additional information)
 
<br />(See: ARMv8ThreadSetupStack for additional information)
Line 3,027: Line 3,015:
 
{| 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: ARMv8ThreadSetupStack for additional information)
 
<br />(See: ARMv8ThreadSetupStack for additional information)
Line 3,101: Line 3,089:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,113: Line 3,101:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,125: Line 3,113:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,137: Line 3,125:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,149: Line 3,137:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,161: Line 3,149:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,173: Line 3,161:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,185: Line 3,173:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,197: Line 3,185:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,209: Line 3,197:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,221: Line 3,209:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,233: Line 3,221:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,245: Line 3,233:
 
{| 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 3,257: Line 3,245:
 
{| 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 3,272: Line 3,260:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,284: Line 3,272:
 
{| 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 3,299: Line 3,287:
 
{| 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 3,314: Line 3,302:
 
{| 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 3,329: Line 3,317:
 
{| 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 3,344: Line 3,332:
 
{| 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 3,359: Line 3,347:
 
{| 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 3,374: Line 3,362:
 
{| 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 3,389: Line 3,377:
 
{| 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 3,404: Line 3,392:
 
{| 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 3,416: Line 3,404:
 
{| 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 3,428: Line 3,416:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,440: Line 3,428:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,452: Line 3,440:
 
{| 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 3,467: Line 3,455:
 
{| 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 3,482: Line 3,470:
 
{| 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 3,497: Line 3,485:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,509: Line 3,497:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,521: Line 3,509:
 
{| 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 3,613: Line 3,601:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,628: Line 3,616:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,643: Line 3,631:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,658: Line 3,646:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,670: Line 3,658:
 
{| 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 3,682: Line 3,670:
 
{| 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 3,710: Line 3,698:
 
{| 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 3,722: Line 3,710:
 
{| 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 3,734: Line 3,722:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,746: Line 3,734:
 
{| 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 3,769: Line 3,757:
 
{| 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 3,797: Line 3,785:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,809: Line 3,797:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,821: Line 3,809:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,833: Line 3,821:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,845: Line 3,833:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,857: Line 3,845:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,869: Line 3,857:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,881: Line 3,869:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,893: Line 3,881:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,905: Line 3,893:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,917: Line 3,905:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| None documented
 
| None documented
 
|-
 
|-
Line 3,929: Line 3,917:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,941: Line 3,929:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
Line 3,954: Line 3,942:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,966: Line 3,954:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''PageTable'''
+
! PageTable
 
| 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
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
Line 3,982: Line 3,970:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 3,994: Line 3,982:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
Line 4,007: Line 3,995:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
|-
 
|-
Line 4,019: Line 4,007:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
Line 4,032: Line 4,020:
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
|-
 
|-
! '''PageTable'''
+
! PageTable
 
| 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
 
|-
 
|-
! '''Note'''
+
! Note
 
| See page ???
 
| See page ???
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled
 
Caller must call ARMv8InvalidateTLB after changes if MMU is enabled

Latest revision as of 01:31, 22 April 2022

Return to Unit Reference


Description


Ultibo Platform Interface unit for ARMv8

The ARMv8 does not support the SWP/SWPB instructions for syncronisation (Lock/Mutex/Semaphore etc) unless enabled.

On ARMv8 Unaligned memory access is always enabled.

On ARMv8 the Extended Page Table format is always enabled.

For usage of barriers (DMB/DSB/ISB) after cache maintenance operations see: ARM.Reference_Manual_1.pdf - Appendix G Barrier Litmus Tests

Note: This unit currently only supports ARMv8 in Aarch32 mode, support for Aarch64 mode will be added in future.

Constants



[Expand]
ARMv8 page tables shift ARMV8_PAGE_TABLES_*


[Expand]
ARMv8 CP15 C0 main Id ARMV8_CP15_C0_MAINID_*


[Expand]
ARMv8 CP15 C0 multiprocessor affinity ARMV8_CP15_C0_MPID_*


[Expand]
ARMv8 CP15 C0 cache size Id ARMV8_CP15_C0_CCSID_*


[Expand]
ARMv8 CP15 C0 cache level Id ARMV8_CP15_C0_CLID_*


[Expand]
ARMv8 CP15 C0 cache size selection ARMV8_CP15_C0_CSSEL_*


[Expand]
ARMv8 CP15 C1 control ARMV8_CP15_C1_*


[Expand]
ARMv8 CP15 C1 auxiliary control ARMV8_CP15_C1_AUX_*


[Expand]
ARMv8 CP15 C1 coprocessor access control ARMV8_CP15_C1_CP*


[Expand]
ARMv8 CP15 C1 secure configuration ARMV8_CP15_C1_SCR_*


[Expand]
ARMv8 CP15 C2 translation table base ARMV8_CP15_C2_TTBR_*


[Expand]
ARMv8 CP15 C3 domain access control ARMV8_CP15_C3_DOMAIN*


[Expand]
ARMv8 CP15 C10 primary region remap ARMV8_CP15_C10_PRRR_*


[Expand]
ARMv8 CP15 C10 normal memory remap ARMV8_CP15_C10_NMRR_*


[Expand]
ARMv8 CP15 C14 generic timer control ARMV8_CP15_C14_CNT_CTL_*


[Expand]
ARMv8 CP15 C14 generic timer ARMV8_CP15_C14_*


[Expand]
ARMv8 floating-point exception ARMV8_FPEXC_*


[Expand]
ARMv8 level one descriptor type ARMV8_L1D_TYPE_*


[Expand]
ARMv8 level one descriptor flag ARMV8_L1D_FLAG_*


[Expand]
ARMv8 level one descriptor mask ARMV8_L1D_*_MASK


[Expand]
ARMv8 level one descriptor TEX value ARMV8_L1D_TEX*


[Expand]
ARMv8 level one descriptor AP value ARMV8_L1D_AP*


[Expand]
ARMv8 level one descriptor permission value ARMV8_L1D_ACCESS_*


[Expand]
ARMv8 level one descriptor cache value ARMV8_L1D_CACHE_*


[Expand]
ARMv8 level one descriptor cacheable memory value ARMV8_L1D_CACHE_CACHEABLE_*


[Expand]
ARMv8 level one descriptor cache TEX remap value ARMV8_L1D_CACHE_REMAP_*


[Expand]
ARMv8 level two descriptor type ARMV8_L2D_TYPE_*


[Expand]
ARMv8 level two descriptor flag ARMV8_L2D_FLAG_*


[Expand]
ARMv8 level two descriptor mask ARMV8_L2D_*_MASK


[Expand]
ARMv8 level two descriptor large TEX value ARMV8_L2D_LARGE_TEX*


[Expand]
ARMv8 level two descriptor small TEX value ARMV8_L2D_SMALL_TEX*


[Expand]
ARMv8 level two descriptor AP value ARMV8_L2D_AP*


[Expand]
ARMv8 level two descriptor permission value ARMV8_L2D_ACCESS_*


[Expand]
ARMv8 level two descriptor large cache value ARMV8_L2D_LARGE_CACHE_*


[Expand]
ARMv8 level two descriptor large cacheable memory value ARMV8_L2D_LARGE_CACHE_CACHEABLE_*


[Expand]
ARMv8 level two descriptor large cache TEX remap value ARMV8_L2D_LARGE_CACHE_REMAP_*


[Expand]
ARMv8 level two descriptor small cache value ARMV8_L2D_SMALL_CACHE_*


[Expand]
ARMv8 level two descriptor small cacheable memory value ARMV8_L2D_SMALL_CACHE_CACHEABLE_*


[Expand]
ARMv8 level two descriptor small cache TEX remap value ARMV8_L2D_SMALL_CACHE_REMAP_*


[Expand]
ARMv8 specific constants ARMV8_*


Type definitions



ARMv8 page table initialization

TARMv8PageTableInit = procedure;

ARMv8 dispatch IRQ

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

ARMv8 dispatch FIQ

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

ARMv8 dispatch SWI

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


Public variables



ARMv8 specific variables

ARMv8Initialized:Boolean;

Page table handlers

ARMv8PageTableInitHandler:TARMv8PageTableInit;

IRQ handlers

ARMv8DispatchIRQHandler:TARMv8DispatchIRQ;

FIQ handlers

ARMv8DispatchFIQHandler:TARMv8DispatchFIQ;

SWI handlers

ARMv8DispatchSWIHandler:TARMv8DispatchSWI;


Function declarations



Initialization functions

[Expand]
procedure ARMv8Init;
Description: To be documented


ARMv8 platform functions

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


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


[Expand]
procedure ARMv8MMUInit;
Description: To be documented


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


ARMv8 thread functions

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


ARMv8 IRQ functions

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


ARMv8 FIQ functions

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


ARMv8 SWI functions

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


ARMv8 interrupt functions

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


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


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


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


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


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


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


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


ARMv8 helper functions

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


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


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


[Expand]
function ARMv8GetTimerState(Timer:LongWord):LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMv8SetTimerState(Timer,State:LongWord); assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8GetTimerCount(Timer:LongWord):Int64; assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8GetTimerValue(Timer:LongWord):LongWord; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMV8SetTimerValue(Timer,Value:LongWord); assembler; nostackframe;
Description: To be documented


[Expand]
function ARMv8GetTimerCompare(Timer:LongWord):Int64; assembler; nostackframe;
Description: To be documented


[Expand]
procedure ARMV8SetTimerCompare(Timer,High,Low:LongWord); assembler; nostackframe;
Description: To be documented


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


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


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


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


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


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


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


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


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


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


Return to Unit Reference