Difference between revisions of "Unit PlatformARMv6"
(6 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '''Ultibo Platform | + | '''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,214: | Line 1,214: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 | + | <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 |
| 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 | + | <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 |
| 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 | + | <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 |
| 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 | + | <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 |
+ | | 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 | | 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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) | ||
Line 1,784: | Line 1,832: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
| 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 |
| 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) | ||
Line 1,857: | Line 1,905: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
| 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 |
| 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) | ||
Line 1,930: | Line 1,978: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
| 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 |
| 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) | ||
Line 2,003: | Line 2,051: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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;"> | + | <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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Spin entry to lock (Passed in R0) | | Pointer to the Spin entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
− | | 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 |
− | | 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 |
| 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 |
| 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 |
| Pointer to the Mutex entry to lock (Passed in R0) | | Pointer to the Mutex entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| Pointer to the Mutex entry to lock (Passed in R0) | | Pointer to the Mutex entry to lock (Passed in R0) | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
− | | 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,399: | Line 2,447: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 |
| 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 |
| 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 |
| The procedure the thread will start executing when resumed | | The procedure the thread will start executing when resumed | ||
|- | |- | ||
− | ! | + | ! ReturnProc |
| The procedure the thread will return to on exit | | The procedure the thread will return to on exit | ||
|- | |- | ||
− | ! | + | ! Return |
− | | Pointer to the starting address of the stack, which will be the Stack Pointer on the first context switch | + | | Pointer to the starting address of the stack, which will be the Stack Pointer on the first context switch. |
|- | |- | ||
− | ! | + | ! Note |
| At the point of a context switch the thread stack will look like this: | | 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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
Contents
[hide]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
ARMV6_PAGE_TABLES_*
ARMV6_CP15_C0_MAINID_*
ARMV6_CP15_C0_CTR_*
ARMV6_CP15_C1_*
ARMV6_CP15_C1_AUX_*
ARMV6_CP15_C1_CP*
ARMV6_CP15_C2_TTBR_*
ARMV6_CP15_C3_DOMAIN*
ARMV6_FPEXC_*
ARMV6_L1D_TYPE_*
ARMV6_L1D_FLAG_*
ARMV6_L1D_*_MASK
ARMV6_L1D_TEX*
ARMV6_L1D_AP*
ARMV6_L1D_ACCESS_*
ARMV6_L1D_CACHE_*
ARMV6_L2D_TYPE_*
ARMV6_L2D_FLAG_*
ARMV6_L2D_*_MASK
ARMV6_L2D_LARGE_TEX*
ARMV6_L2D_SMALL_TEX*
ARMV6_L2D_AP*
ARMV6_L2D_ACCESS_*
ARMV6_L2D_LARGE_CACHE_*
ARMV6_L2D_SMALL_CACHE_*
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
ARMv6 platform functions
procedure ARMv6PageTableInit;
procedure ARMv6SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); assembler; nostackframe;
function ARMv6CPUGetMainID:LongWord; assembler; nostackframe;
function ARMv6L1CacheGetType:LongWord; assembler; nostackframe;
function ARMv6L1DataCacheGetSize:LongWord; assembler; nostackframe;
function ARMv6L1DataCacheGetLineSize:LongWord; assembler; nostackframe;
function ARMv6L1InstructionCacheGetSize:LongWord; assembler; nostackframe;
function ARMv6L1InstructionCacheGetLineSize:LongWord; assembler; nostackframe;
procedure ARMv6Halt; assembler; nostackframe; public name '_haltproc';
procedure ARMv6Pause; assembler; nostackframe;
procedure ARMv6WaitForEvent; assembler; nostackframe;
procedure ARMv6WaitForInterrupt; assembler; nostackframe;
procedure ARMv6DataMemoryBarrier; assembler; nostackframe;
procedure ARMv6DataSynchronizationBarrier; assembler; nostackframe;
procedure ARMv6InstructionMemoryBarrier; assembler; nostackframe;
procedure ARMv6InvalidateTLB; assembler; nostackframe;
procedure ARMv6InvalidateDataTLB; assembler; nostackframe;
procedure ARMv6InvalidateInstructionTLB; assembler; nostackframe;
procedure ARMv6InvalidateCache; assembler; nostackframe;
procedure ARMv6CleanDataCache; assembler; nostackframe;
procedure ARMv6InvalidateDataCache; assembler; nostackframe;
procedure ARMv6CleanAndInvalidateDataCache; assembler; nostackframe;
procedure ARMv6InvalidateInstructionCache; assembler; nostackframe;
procedure ARMv6CleanDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
procedure ARMv6CleanDataCacheRange(Address:PtrUInt; Size:LongWord);
procedure ARMv6InvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
procedure ARMv6InvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);
procedure ARMv6CleanAndInvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
procedure ARMv6CleanAndInvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);
procedure ARMv6InvalidateInstructionCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
procedure ARMv6InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord);
procedure ARMv6FlushPrefetchBuffer; assembler; nostackframe;
procedure ARMv6FlushBranchTargetCache; assembler; nostackframe;
procedure ARMv6ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
procedure ARMv6ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
procedure ARMv6ContextSwitchFIQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
procedure ARMv6ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle);
function ARMv6InterlockedOr(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedXor(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedAnd(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedDecrement(var Target:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedIncrement(var Target:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedAddExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
function ARMv6InterlockedCompareExchange(var Target:LongInt; Source,Compare:LongInt):LongInt; assembler; nostackframe;
procedure ARMv6PageTableGetEntry(Address:PtrUInt; var Entry:TPageTableEntry);
function ARMv6PageTableSetEntry(const Entry:TPageTableEntry):LongWord;
function ARMv6VectorTableGetEntry(Number:LongWord):PtrUInt;
function ARMv6VectorTableSetEntry(Number:LongWord; Address:PtrUInt):LongWord;
function ARMv6FirstBitSet(Value:LongWord):LongWord; assembler; nostackframe;
function ARMv6CountLeadingZeros(Value:LongWord):LongWord; assembler; nostackframe;
ARMv6 thread functions
function ARMv6SpinLock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinUnlock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinLockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinUnlockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinLockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinUnlockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinLockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinUnlockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
function ARMv6SpinExchangeIRQ(Spin1,Spin2:PSpinEntry):LongWord;
function ARMv6SpinExchangeFIQ(Spin1,Spin2:PSpinEntry):LongWord;
function ARMv6MutexLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
function ARMv6MutexUnlock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
function ARMv6MutexTryLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
function ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;
function ARMv6ThreadSetCurrent(Thread:TThreadHandle):LongWord; assembler; nostackframe;
function ARMv6ThreadSetupStack(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;
ARMv6 IRQ functions
function ARMv6DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
ARMv6 FIQ functions
function ARMv6DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
ARMv6 SWI functions
function ARMv6DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle; inline;
ARMv6 interrupt functions
procedure ARMv6UndefinedInstructionHandler; assembler; nostackframe;
procedure ARMv6SoftwareInterruptHandler; assembler; nostackframe;
procedure ARMv6PrefetchAbortHandler; assembler; nostackframe;
procedure ARMv6DataAbortHandler; assembler; nostackframe;
procedure ARMv6IRQHandler; assembler; nostackframe;
procedure ARMv6FIQHandler; assembler; nostackframe;
ARMv6 helper functions
function ARMv6GetPageTableCoarse(Address:PtrUInt):LongWord;
function ARMv6SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;
function ARMv6GetPageTableLarge(Address:PtrUInt):LongWord;
function ARMv6SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
function ARMv6GetPageTableSmall(Address:PtrUInt):LongWord;
function ARMv6SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
function ARMv6GetPageTableSection(Address:PtrUInt):LongWord;
function ARMv6SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
function ARMv6SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Return to Unit Reference