Difference between revisions of "Unit PlatformARMv6"
(24 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === 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 (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 12: | Line 14: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 page tables shift''' <code> ARMV6_PAGE_TABLES_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_PAGE_TABLES_SHIFT = 10;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C0 main Id''' <code> ARMV6_CP15_C0_MAINID_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_IMPLEMENTOR_MASK = ($FF shl 24);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_VARIANT_MASK = ($F shl 20);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_ARCHITECTURE_MASK = ($F shl 16);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_PARTNUMBER_MASK = ($FFF shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_REVISION_MASK = ($F shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_IMPLEMENTOR_ARM = ($41 shl 24);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_ARCHITECTURE_CPUID = ($F shl 16);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_MAINID_PARTNUMBER_1176JZSF = ($B76 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C0 cache type''' <code> ARMV6_CP15_C0_CTR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_CTYPE_MASK = ($F shl 25);</code> | ||
+ | | The Cache type bits provide information about the cache architecture (b1110 in the ARM1176JZF-S processor) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_S = (1 shl 24);</code> | ||
+ | | S = 1, indicates that the processor has separate instruction and data caches and not a unified cache | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DP = (1 shl 23);</code> | ||
+ | | The P, Page, bit indicates restrictions on page allocation for bits [13:12] of the VA For ARM1176JZF-S processors, the P bit is set if the cache size is greater than 16KB. | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_MASK = ($F shl 18);</code> | ||
+ | | The Size field indicates the cache size in conjunction with the M bit | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_128K = (8 shl 18);</code> | ||
+ | | 128KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_64K = (7 shl 18);</code> | ||
+ | | 64KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_32K = (6 shl 18);</code> | ||
+ | | 32KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_16K = (5 shl 18);</code> | ||
+ | | 16KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_8K = (4 shl 18);</code> | ||
+ | | 8KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_4K = (3 shl 18);</code> | ||
+ | | 4KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_2K = (2 shl 18);</code> | ||
+ | | 2KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_1K = (1 shl 18);</code> | ||
+ | | 1KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DSIZE_05K = (0 shl 18);</code> | ||
+ | | 0.5KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DASSOC_MASK = (7 shl 15);</code> | ||
+ | | b010, indicates that the ARM1176JZF-S processor has 4-way associativity | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DM = (1 shl 14);</code> | ||
+ | | Indicates the cache size and cache associativity values in conjunction with the Size and Assoc fields (In the ARM1176JZF-S processor the M bit is set to 0). | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DLEN_MASK = (3 shl 12);</code> | ||
+ | | b10, indicates that ARM1176JZF-S processor has a cache line length of 8 words, that is 32 byte. | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_DLEN_32 = (2 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_IP = (1 shl 11);</code> | ||
+ | | The P, Page, bit indicates restrictions on page allocation for bits [13:12] of the VA For ARM1176JZF-S processors, the P bit is set if the cache size is greater than 16KB. | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_MASK = ($F shl 6);</code> | ||
+ | | The Size field indicates the cache size in conjunction with the M bit | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_128K = (8 shl 6);</code> | ||
+ | | 128KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_64K = (7 shl 6);</code> | ||
+ | | 64KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_32K = (6 shl 6);</code> | ||
+ | | 32KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_16K = (5 shl 6);</code> | ||
+ | | 16KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_8K = (4 shl 6);</code> | ||
+ | | 8KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_4K = (3 shl 6);</code> | ||
+ | | 4KB cache | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_2K = (2 shl 6);</code> | ||
+ | | 2KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_1K = (1 shl 6);</code> | ||
+ | | 1KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ISIZE_05K = (0 shl 6);</code> | ||
+ | | 0.5KB cache, not supported | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_IASSOC_MASK = (7 shl 3);</code> | ||
+ | | b010, indicates that the ARM1176JZF-S processor has 4-way associativity | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_IM = (1 shl 2);</code> | ||
+ | | Indicates the cache size and cache associativity values in conjunction with the Size and Assoc fields (In the ARM1176JZF-S processor the M bit is set to 0). | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ILEN_MASK = (3 shl 0);</code> | ||
+ | | b10, indicates that ARM1176JZF-S processor has a cache line length of 8 words, that is 32 bytes. | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C0_CTR_ILEN_32 = (2 shl 0);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C1 control''' <code> ARMV6_CP15_C1_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_FA_BIT = (1 shl 29);</code> | ||
+ | | Force AP functionality in the MMU is enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_TR_BIT = (1 shl 28);</code> | ||
+ | | TEX remap enabled when set to 1 (TEX[2:1] become page table bits for OS) (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_EE_BIT = (1 shl 25);</code> | ||
+ | | CPSR E bit is set to 1 on an exception when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_VE_BIT = (1 shl 24);</code> | ||
+ | | Interrupt vectors are defined by the VIC interface when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_XP_BIT = (1 shl 23);</code> | ||
+ | | Subpage AP bits disabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_U_BIT = (1 shl 22);</code> | ||
+ | | Unaligned data access support enabled when set to 1 (Default 0). The processor permits unaligned loads and stores and support for mixed endian data is enabled. | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_FI_BIT = (1 shl 21);</code> | ||
+ | | Low interrupt latency configuration enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_L4_BIT = (1 shl 15);</code> | ||
+ | | Loads to PC do not set the T bit when set to 1 (ARMv4 behavior) (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_RR_BIT = (1 shl 14);</code> | ||
+ | | Predictable cache replacement strategy by round-robin replacement when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_V_BIT = (1 shl 13);</code> | ||
+ | | High exception vectors selected when set to 1, address range = 0xFFFF0000-0xFFFF001C (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_I_BIT = (1 shl 12);</code> | ||
+ | | L1 Instruction Cache enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_Z_BIT = (1 shl 11);</code> | ||
+ | | Branch prediction enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_B_BIT = (1 shl 7);</code> | ||
+ | | Big-endian word-invariant memory system when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_C_BIT = (1 shl 2);</code> | ||
+ | | L1 Data cache enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_A_BIT = (1 shl 1);</code> | ||
+ | | Strict alignment fault checking enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_M_BIT = (1 shl 0);</code> | ||
+ | | MMU enabled when set to 1 (Default 0) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C1 auxiliary control''' <code> ARMV6_CP15_C1_AUX_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_AUX_CZ = (1 shl 6);</code> | ||
+ | | Controls the restriction of cache size to 16KB | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C1 coprocessor access control''' <code> ARMV6_CP15_C1_CP* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP0_NONE = (0 shl 0);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP0_SYS = (1 shl 0);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP0_USER = (3 shl 0);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP1_NONE = (0 shl 2);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP1_SYS = (1 shl 2);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP1_USER = (3 shl 2);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP2_NONE = (0 shl 4);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP2_SYS = (1 shl 4);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP2_USER = (3 shl 4);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP3_NONE = (0 shl 6);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP3_SYS = (1 shl 6);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP3_USER = (3 shl 6);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP4_NONE = (0 shl 8);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP4_SYS = (1 shl 8);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP4_USER = (3 shl 8);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP5_NONE = (0 shl 10);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP5_SYS = (1 shl 10);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP5_USER = (3 shl 10);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP6_NONE = (0 shl 12);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP6_SYS = (1 shl 12);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP6_USER = (3 shl 12);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP7_NONE = (0 shl 14);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP7_SYS = (1 shl 14);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP7_USER = (3 shl 14);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP8_NONE = (0 shl 16);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP8_SYS = (1 shl 16);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP8_USER = (3 shl 16);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP9_NONE = (0 shl 18);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP9_SYS = (1 shl 18);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP9_USER = (3 shl 18);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP10_NONE = (0 shl 20);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP10_SYS = (1 shl 20);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP10_USER = (3 shl 20);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP11_NONE = (0 shl 22);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP11_SYS = (1 shl 22);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP11_USER = (3 shl 22);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP12_NONE = (0 shl 24);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP12_SYS = (1 shl 24);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP12_USER = (3 shl 24);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP13_NONE = (0 shl 26);</code> | ||
+ | | Access denied (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP13_SYS = (1 shl 26);</code> | ||
+ | | Privileged mode access only | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C1_CP13_USER = (3 shl 26);</code> | ||
+ | | Privileged and User mode access | ||
+ | |- | ||
+ | |colspan="2"|''Coprocessors CP14 (Debug Control) and CP15 (System Control) are not affected by the Coprocessor Access Control Register'' | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C2 translation table base''' <code> ARMV6_CP15_C2_TTBR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_BASE_MASK = $FFFFC000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_RGN_OUTER_NONCACHED = (0 shl 3);</code> | ||
+ | | Outer Noncacheable (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_RGN_OUTER_WRITE_ALLOCATE = (1 shl 3);</code> | ||
+ | | Outer Write-back, Write Allocate | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_RGN_OUTER_WRITE_THROUGH = (2 shl 3);</code> | ||
+ | | Outer Write-through, No Allocate on Write | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_RGN_OUTER_WRITE_BACK = (3 shl 3);</code> | ||
+ | | Outer Write-back, No Allocate on Write | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_P = (1 shl 2);</code> | ||
+ | | If the processor supports ECC, it indicates to the memory controller it is enabled or disabled. For ARM1176JZF-S processors this is 0. | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_S = (1 shl 1);</code> | ||
+ | | Indicates the page table walk is to Shared memory if set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C2_TTBR_C_INNER_CACHED = (1 shl 0);</code> | ||
+ | | Indicates the page table walk is Inner Cacheable if set to 1 (Default 0) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 CP15 C3 domain access control''' <code> ARMV6_CP15_C3_DOMAIN* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN0_NONE = (0 shl 0);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN0_CLIENT = (1 shl 0);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN0_MANAGER = (3 shl 0);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN1_NONE = (0 shl 2);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN1_CLIENT = (1 shl 2);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN1_MANAGER = (3 shl 2);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN2_NONE = (0 shl 4);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN2_CLIENT = (1 shl 4);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN2_MANAGER = (3 shl 4);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN3_NONE = (0 shl 6);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN3_CLIENT = (1 shl 6);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN3_MANAGER = (3 shl 6);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN4_NONE = (0 shl 8);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN4_CLIENT = (1 shl 8);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN4_MANAGER = (3 shl 8);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN5_NONE = (0 shl 10);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN5_CLIENT = (1 shl 10);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN5_MANAGER = (3 shl 10);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN6_NONE = (0 shl 12);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN6_CLIENT = (1 shl 12);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN6_MANAGER = (3 shl 12);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN7_NONE = (0 shl 14);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN7_CLIENT = (1 shl 14);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN7_MANAGER = (3 shl 14);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN8_NONE = (0 shl 16);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN8_CLIENT = (1 shl 16);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN8_MANAGER = (3 shl 16);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN9_NONE = (0 shl 18);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN9_CLIENT = (1 shl 18);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN9_MANAGER = (3 shl 18);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN10_NONE = (0 shl 20);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN10_CLIENT = (1 shl 20);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN10_MANAGER = (3 shl 20);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN11_NONE = (0 shl 22);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN11_CLIENT = (1 shl 22);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN11_MANAGER = (3 shl 22);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN12_NONE = (0 shl 24);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN12_CLIENT = (1 shl 24);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN12_MANAGER = (3 shl 24);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN13_NONE = (0 shl 26);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN13_CLIENT = (1 shl 26);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN13_MANAGER = (3 shl 26);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN14_NONE = (0 shl 28);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN14_CLIENT = (1 shl 28);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN14_MANAGER = (3 shl 28);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN15_NONE = (0 shl 30);</code> | ||
+ | | No access, Any access generates a domain fault (Default) | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN15_CLIENT = (1 shl 30);</code> | ||
+ | | Client, Accesses are checked against the access permission bits in the TLB entry | ||
+ | |- | ||
+ | | <code>ARMV6_CP15_C3_DOMAIN15_MANAGER = (3 shl 30);</code> | ||
+ | | Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 floating-point exception''' <code> ARMV6_FPEXC_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_FPEXC_EN = (1 shl 30);</code> | ||
+ | | Floating-point system is enabled and operates normally if set to 1 (Default 0) | ||
+ | |- | ||
+ | | <code>ARMV6_FPEXC_EX = (1 shl 31);</code> | ||
+ | | If EX is set to 0 then only FPSCR and FPEXC need to be preseved on a context switch (Default 0) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor type''' <code> ARMV6_L1D_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-36 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"|These formats assume that the XP bit in the C1 control register is set to one to enable the ARMv6 format Page Tables | ||
+ | |- | ||
+ | |colspan="2"|See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"|Level One Page Table contains 4096 32bit (4 byte) entries for a total size of 16KB | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TYPE_COARSE = 1;</code> | ||
+ | | The entry points to a 1MB second-level page table. See page 6-40. | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TYPE_SECTION = 2;</code> | ||
+ | | The entry points to a either a 1MB Section of memory or a 16MB Supersection of memory | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TYPE_SUPERSECTION = 2;</code> | ||
+ | | Bit[18] of the descriptor selects between a Section and a Supersection | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor flag''' <code> ARMV6_L1D_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_COARSE_NS = (1 shl 3);</code> | ||
+ | | NS (Non Secure) Attribute bit to enable the support of TrustZone | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_SECTION_NS = (1 shl 19);</code> | ||
+ | | NS (Non Secure) Attribute bit to enable the support of TrustZone | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_SUPERSECTION = (1 shl 18);</code> | ||
+ | | The descriptor is a 16MB Supersection instead of a 1MB Section (Section Only) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_NOT_GLOBAL = (1 shl 17);</code> | ||
+ | | The Not-Global (nG) bit, determines if the translation is marked as global (0), or process-specific (1) (Section Only) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_SHARED = (1 shl 16);</code> | ||
+ | | The Shared (S) bit, determines if the translation is for Non-Shared (0), or Shared (1) memory. This only applies to Normal memory regions. | ||
+ | Device memory can be Shared or Non-Shared as determined by the TEX bits and the C and B bits (Section Only). | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_APX = (1 shl 15);</code> | ||
+ | | The access permissions extension (APX) bit, provides an extra access permission bit (Section Only) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_P = (1 shl 9);</code> | ||
+ | | If the P bit is supported and set for the memory region, it indicates to the system memory controller that this memory region has ECC enabled. ARM1176JZF-S processors do not support the P bit. | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_XN = (1 shl 4);</code> | ||
+ | | The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable(1) (Section Only) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_C = (1 shl 3);</code> | ||
+ | | Cacheable (C) bit (Section Only) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_FLAG_B = (1 shl 2);</code> | ||
+ | | Bufferable (B) bit (Section Only) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor mask''' <code> ARMV6_L1D_*_MASK </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_COARSE_BASE_MASK = $FFFFFC00;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_SECTION_BASE_MASK = $FFF00000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_SUPERSECTION_BASE_MASK = $FF000000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_DOMAIN_MASK = ($F shl 5);</code> | ||
+ | | Security Domain of the Descriptor | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX_MASK = (7 shl 12);</code> | ||
+ | | Type extension field bits (Section Only) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_AP_MASK = (3 shl 10);</code> | ||
+ | | Access permission bits (Section Only) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor TEX value''' <code> ARMV6_L1D_TEX* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-15 of the ARM1176JZF-S Technical Reference Manual (Section Only) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX0 = (0 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX1 = (1 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX2 = (2 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX4 = (4 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX5 = (5 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX6 = (6 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_TEX7 = (7 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor AP value''' <code> ARMV6_L1D_AP* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-12 of the ARM1176JZF-S Technical Reference Manual (Section Only) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_AP0 = (0 shl 10);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_AP1 = (1 shl 10); </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_AP2 = (2 shl 10); </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_AP3 = (3 shl 10);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor permission value''' <code> ARMV6_L1D_ACCESS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-12 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"|This is not the full set of permissions as Ultibo always runs in priviledged mode | ||
+ | |- | ||
+ | |colspan="2"|The XN bit can also be applied to control whether memory regions are executable or not | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_ACCESS_NONE = ARMV6_L1D_AP0;</code> | ||
+ | | No Access for both Privileged and Unprivileged code | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_ACCESS_READONLY = ARMV6_L1D_FLAG_APX or ARMV6_L1D_AP3;</code> | ||
+ | | Read-Only for both Privileged and Unprivileged code | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_ACCESS_READWRITE = ARMV6_L1D_AP3;</code> | ||
+ | | Read-Write for both Privileged and Unprivileged code | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level one descriptor cache value''' <code> ARMV6_L1D_CACHE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-15 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_CACHE_STRONGLY_ORDERED = ARMV6_L1D_TEX0;</code> | ||
+ | | Strongly Ordered. (Always Shared) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_CACHE_SHARED_DEVICE = ARMV6_L1D_TEX0 or ARMV6_L1D_FLAG_B;</code> | ||
+ | | Device. (Always Shared) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_CACHE_NORMAL_WRITE_THROUGH = ARMV6_L1D_TEX0 or ARMV6_L1D_FLAG_C;</code> | ||
+ | | Normal. Write Through (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_CACHE_NORMAL_WRITE_BACK = ARMV6_L1D_TEX0 or ARMV6_L1D_FLAG_C or ARMV6_L1D_FLAG_B;</code> | ||
+ | | Normal. Write Back (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_CACHE_NORMAL_NONCACHED = ARMV6_L1D_TEX1;</code> | ||
+ | | Normal. Noncacheable (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L1D_CACHE_NONSHARED_DEVICE = ARMV6_L1D_TEX2;</code> | ||
+ | | Device. (Not Shared) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor type''' <code> ARMV6_L2D_TYPE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"|Level Two Page Table contains 256 32bit (4 byte) entries for a total size of 1KB | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_TYPE_LARGE = 1;</code> | ||
+ | | The entry points to a 64KB Large page in memory | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_TYPE_SMALL = 2;</code> | ||
+ | | The entry points to a 4KB Extended small page in memory. Bit[0] of the entry is the XN (Execute Never) bit for the entry. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor flag''' <code> ARMV6_L2D_FLAG_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_LARGE_XN = (1 shl 15);</code> | ||
+ | | The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable(1) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_SMALL_XN = (1 shl 0);</code> | ||
+ | | The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable(1) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_NOT_GLOBAL = (1 shl 11);</code> | ||
+ | | The Not-Global (nG) bit, determines if the translation is marked as global (0), or process-specific (1) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_SHARED = (1 shl 10);</code> | ||
+ | | The Shared (S) bit, determines if the translation is for Non-Shared (0), or Shared (1) memory. This only applies to Normal memory regions. | ||
+ | Device memory can be Shared or Non-Shared as determined by the TEX bits and the C and B bits | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_APX = (1 shl 9);</code> | ||
+ | | The access permissions extension (APX) bit, provides an extra access permission bit. | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_C = (1 shl 3);</code> | ||
+ | | Cacheable (C) bit | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_FLAG_B = (1 shl 2);</code> | ||
+ | | Bufferable (B) bit | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor mask''' <code> ARMV6_L2D_*_MASK </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_BASE_MASK = $FFFF0000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_BASE_MASK = $FFFFF000;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX_MASK = (7 shl 12);</code> | ||
+ | | Type extension field bits | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX_MASK = (7 shl 6);</code> | ||
+ | | Type extension field bits | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_AP_MASK = (3 shl 4);</code> | ||
+ | | Access permission bits | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor large TEX value''' <code> ARMV6_L2D_LARGE_TEX* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-15 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX0 = (0 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX1 = (1 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX2 = (2 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX4 = (4 shl 12);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX5 = (5 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX6 = (6 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_TEX7 = (7 shl 12);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor small TEX value''' <code> ARMV6_L2D_SMALL_TEX* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-15 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX0 = (0 shl 6);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX1 = (1 shl 6); </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX2 = (2 shl 6);</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX4 = (4 shl 6); </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX5 = (5 shl 6);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX6 = (6 shl 6);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_TEX7 = (7 shl 6);</code> | ||
+ | | Only used for Cacheable memory values | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor AP value''' <code> ARMV6_L2D_AP* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-12 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_AP0 = (0 shl 4);</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_AP1 = (1 shl 4); </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_AP2 = (2 shl 4); </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_AP3 = (3 shl 4);</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor permission value''' <code> ARMV6_L2D_ACCESS_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-12 of the ARM1176JZF-S Technical Reference Manual) | ||
+ | |- | ||
+ | |colspan="2"|This is not the full set of permissions as Ultibo always runs in priviledged mode | ||
+ | |- | ||
+ | |colspan="2"|The XN bit can also be applied to control whether memory regions are executable or not | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_ACCESS_NONE = ARMV6_L2D_AP0;</code> | ||
+ | | No Access for both Privileged and Unprivileged code | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_ACCESS_READONLY = ARMV6_L2D_FLAG_APX or ARMV6_L2D_AP3;</code> | ||
+ | | Read-Only for both Privileged and Unprivileged code | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_ACCESS_READWRITE = ARMV6_L2D_AP3;</code> | ||
+ | | Read-Write for both Privileged and Unprivileged code | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor large cache value''' <code> ARMV6_L2D_LARGE_CACHE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-15 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_CACHE_STRONGLY_ORDERED = ARMV6_L2D_LARGE_TEX0;</code> | ||
+ | | Strongly Ordered. (Always Shared) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_CACHE_SHARED_DEVICE = ARMV6_L2D_LARGE_TEX0 or ARMV6_L2D_FLAG_B;</code> | ||
+ | | Device. (Always Shared) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_CACHE_NORMAL_WRITE_THROUGH = ARMV6_L2D_LARGE_TEX0 or ARMV6_L2D_FLAG_C;</code> | ||
+ | | Normal. Write Through (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_CACHE_NORMAL_WRITE_BACK = ARMV6_L2D_LARGE_TEX0 or ARMV6_L2D_FLAG_C or ARMV6_L2D_FLAG_B;</code> | ||
+ | | Normal. Write Back (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_CACHE_NORMAL_NONCACHED = ARMV6_L2D_LARGE_TEX1;</code> | ||
+ | | Normal. Noncacheable (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_LARGE_CACHE_NONSHARED_DEVICE = ARMV6_L2D_LARGE_TEX2;</code> | ||
+ | | Device. (Not Shared) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 level two descriptor small cache value''' <code> ARMV6_L2D_SMALL_CACHE_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|See page 6-15 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_CACHE_STRONGLY_ORDERED = ARMV6_L2D_SMALL_TEX0;</code> | ||
+ | | Strongly Ordered. (Always Shared) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_CACHE_SHARED_DEVICE = ARMV6_L2D_SMALL_TEX0 or ARMV6_L2D_FLAG_B;</code> | ||
+ | | Device. (Always Shared) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_CACHE_NORMAL_WRITE_THROUGH = ARMV6_L2D_SMALL_TEX0 or ARMV6_L2D_FLAG_C;</code> | ||
+ | | Normal. Write Through (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_CACHE_NORMAL_WRITE_BACK = ARMV6_L2D_SMALL_TEX0 or ARMV6_L2D_FLAG_C or ARMV6_L2D_FLAG_B;</code> | ||
+ | | Normal. Write Back (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_CACHE_NORMAL_NONCACHED = ARMV6_L2D_SMALL_TEX1;</code> | ||
+ | | Normal. Noncacheable (Shared if S bit set) | ||
+ | |- | ||
+ | | <code>ARMV6_L2D_SMALL_CACHE_NONSHARED_DEVICE = ARMV6_L2D_SMALL_TEX2;</code> | ||
+ | | Device. (Not Shared) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''ARMv6 specific constants''' <code> ARMV6_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>ARMV6_CONTEXT_LENGTH = 50;</code> | ||
+ | | Length of ARM context switch record in 32 bit words (includes fpexc, fpscr, d0-d15, r0-r12, lr, pc, cpsr) | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''ARMv6 page table initialization''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TARMv6PageTableInit = procedure;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''ARMv6 dispatch IRQ''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TARMv6DispatchIRQ = function(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''ARMv6 dispatch FIQ''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TARMv6DispatchFIQ = function(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''ARMv6 dispatch SWI''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>TARMv6DispatchSWI = function(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | |
+ | '''ARMv6 specific variables''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>ARMv6Initialized:Boolean;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>ARMv6DummySTREX:LongWord;</code> | ||
+ | | style="width: 40%;"|Variable to allow a dummy STREX operation to be performed after each context switch as required by ARM documentation | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''Page table handlers''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>ARMv6PageTableInitHandler:TARMv6PageTableInit;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''IRQ handlers''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>ARMv6DispatchIRQHandler:TARMv6DispatchIRQ;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''FIQ handlers''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>ARMv6DispatchFIQHandler:TARMv6DispatchFIQ;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | '''SWI handlers''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>ARMv6DispatchSWIHandler:TARMv6DispatchSWI;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | <br /> | ||
=== Function declarations === | === Function declarations === | ||
Line 36: | 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 51: | 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 63: | 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 75: | 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 87: | 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 99: | 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 111: | 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 123: | 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 135: | 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 147: | 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 159: | 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 171: | 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 183: | 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 195: | 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 207: | 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 219: | 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 231: | 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 243: | 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 255: | 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 262: | 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 279: | 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 291: | 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 303: | 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 315: | 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 329: | 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 341: | 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 354: | 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 366: | 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 378: | 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 390: | 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 402: | 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 414: | 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 426: | 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 438: | 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 445: | 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 457: | 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 469: | 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 481: | 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 | + | | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Perform an invalidate instruction cache range operation, limiting the size for each operation to 4MB because some processors fail to correctly operate with larger ranges</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual | ||
|- | |- | ||
|} | |} | ||
Line 498: | 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 510: | 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 522: | 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) | ||
<br /> | <br /> | ||
Line 606: | 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) | ||
<br /> | <br /> | ||
Line 679: | 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) | ||
<br /> | <br /> | ||
Line 752: | 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) | ||
<br /> | <br /> | ||
Line 825: | 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 837: | 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 849: | 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 861: | 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 873: | 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 885: | 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 897: | 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 909: | 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 916: | 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 933: | 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 945: | 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 957: | 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 969: | 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 981: | 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 996: | 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 1,008: | 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 1,023: | 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 1,038: | 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 1,053: | 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 1,068: | 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 1,083: | 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 1,098: | 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 1,113: | 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 1,128: | 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 1,140: | 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 1,152: | 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 1,164: | 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 1,176: | 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 1,191: | 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 1,206: | 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 1,217: | Line 2,443: | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
<pre style="border: 0; padding-bottom:0px;">function ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;</pre> | <pre style="border: 0; padding-bottom:0px;">function ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;</pre> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current thread | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the current thread Id from the c13 (Thread and process ID) register of system control coprocessor CP15</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| See page 3-129 of the ARM1176JZF-S Technical Reference Manual | | See page 3-129 of the ARM1176JZF-S Technical Reference Manual | ||
|- | |- | ||
Line 1,233: | Line 2,459: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Set the current thread | + | | 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 1,246: | 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 1,273: | Line 2,499: | ||
<br />(On Yield: The location to return to in SchedulerReschedule) | <br />(On Yield: The location to return to in SchedulerReschedule) | ||
<br />(On Create: The location of StartProc for the new thread) | <br />(On Create: The location of StartProc for the new thread) | ||
− | <br /> | + | <br /> |
<br />lr <- The lr value prior to the context switch | <br />lr <- The lr value prior to the context switch | ||
<br /> (On Interrupt: The value of lr before the thread was interrupted) | <br /> (On Interrupt: The value of lr before the thread was interrupted) | ||
Line 1,325: | Line 2,551: | ||
<br /> | <br /> | ||
<br />An IRQ or FIQ context switch uses the SRS (Store Return State) and RFE (Return From Exception) instructions to save and restore the cpsr value from the spsr value of either IRQ or FIQ mode. | <br />An IRQ or FIQ context switch uses the SRS (Store Return State) and RFE (Return From Exception) instructions to save and restore the cpsr value from the spsr value of either IRQ or FIQ mode. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ARMv6 IRQ functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ARMv6 FIQ functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ARMv6 SWI functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle; inline;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ARMv6 interrupt functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6ResetHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6UndefinedInstructionHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle an undefined instruction exception</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6SoftwareInterruptHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a software interrupt (SWI) from a system call (SVC)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This routine is registered as the vector for SWI requests in the vector table loaded during startup. When the processor executes an SVC it switches to SWI mode, stores the address of the next instruction in the SWI mode link register (lr_svc) and saves the current program status register into the SWI mode saved program status register (spsr_svc). | ||
+ | <br />The SWI handler first saves the SWI mode lr and spsr (which represent the location and state to return to) onto the SYS mode stack using the srsdb (Store Return State Decrement Before) instruction. | ||
+ | <br /> | ||
+ | <br />The SWI handler then switches to SYS mode and saves all the neccessary registers for the return to the interrupted thread before switching back to SWI mode in order to process the software interrupt. Because we arrive here from an interrupt the thread that was executing has no opportunity to save registers and will be unaware on return that it was interrupted. For this reason we must save all of the general purpose registers (r0 to r12) as well as the SYS mode link register (lr). We do not save the stack pointer (r13) because we use it to store the other registers and will return it to the correct value before we return from the SWI handler. The program counter (r15) does not need to be saved as it now points to this code. | ||
+ | <br /> | ||
+ | <br />The SystemCall function should pass the parameters of the call as follows: | ||
+ | <br />R0 - System Call Number (eg SYSTEM_CALL_CONTEXT_SWITCH) | ||
+ | <br />R1 - Parameter 1 | ||
+ | <br />R2 - Parameter 2 | ||
+ | <br />R3 - Parameter 3 | ||
+ | <br /> | ||
+ | <br />To process the software interrupt | ||
+ | <br />?????? | ||
+ | <br />To return from the software interrupt | ||
+ | <br />?????? | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6PrefetchAbortHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a prefetch abort exception</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6DataAbortHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a data abort exception</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This routine is registered as the vector for data abort exception in the vector table loaded during startup | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6ReservedHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6IRQHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle an interrupt request IRQ from an interrupt source</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This routine is registered as the vector for IRQ requests in the vector table loaded during startup. | ||
+ | <br />At the end of each instruction the processor checks the IRQ line and if triggered it will lookup the vector in the vector table and jump to the routine listed. | ||
+ | <br /> | ||
+ | <br />When the processor receives an IRQ it switches to IRQ mode, stores the address of the next instruction in the IRQ mode link register (lr_irq) and saves the current program status register into the IRQ mode saved program status register (spsr_irq). | ||
+ | <br /> | ||
+ | <br />The IRQ handler first saves the IRQ mode lr and spsr (which represent the location and state to return to) onto the SYS mode stack using the srsdb (Store Return State Decrement Before) instruction. | ||
+ | <br /> | ||
+ | <br />The IRQ handler then switches to SYS mode and saves all the neccessary registers for the return to the interrupted thread before switching back to IRQ mode in order to process the interrupt request. Because we arrive here from an interrupt the thread that was executing has no opportunity to save registers and will be unaware on return that it was interrupted. For this reason we must save all of the general purpose registers (r0 to r12) as well as the SYS mode link register (lr). We do not save the stack pointer (r13) because we use it to store the other registers and will return it to the correct value before we return from the IRQ handler. The program counter (r15) does not need to be saved as it now points to this code. | ||
+ | <br /> | ||
+ | <br />To process the interrupt request the handler calls the DispatchIRQ function which will dispatch the interrupt to a registered handler for processing. The handler must clear the interrupt source before it returns or the interrupt will simply occur again immediately once reenabled. | ||
+ | <br /> | ||
+ | <br />To return from the interrupt request the handler uses the rfeia (Return From Exception Increment After) instruction which will load the pc and cpsr from the SYS mode stack. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6FIQHandler; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Handle a fast interrupt request FIQ from an interrupt source</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | This routine is registered as the vector for FIQ requests in the vector table loaded during startup. | ||
+ | <br />At the end of each instruction the processor checks the FIQ line and if triggered it will lookup the vector in the vector table and jump to the routine listed. | ||
+ | <br /> | ||
+ | <br />When the processor receives an FIQ it switches to FIQ mode, stores the address of the next instruction in the FIQ mode link register (lr_fiq) and saves the current program status register into the FIQ mode saved program status register (spsr_fiq). | ||
+ | <br /> | ||
+ | <br />The FIQ handler first checks the spsr to determine if the task being interrupted is a normal thread or an exception or interrupt handler. | ||
+ | <br /> | ||
+ | <br />The FIQ handler then saves the FIQ mode lr and spsr (which represent the location and state to return to) onto eihter the SYS mode or SVC mode stack using the srsdb (Store Return State Decrement Before) instruction depending on the value of spsr. | ||
+ | <br /> | ||
+ | <br />The FIQ handler switches to SYS or SVC mode and saves all the neccessary registers for the return to the interrupted task before switching back to FIQ mode in order to process the interrupt request. Because we arrive here from an interrupt the task that was executing has no opportunity to save registers and will be unaware on return that it was interrupted. For this reason we must save all of the general purpose registers (r0 to r12) as well as the SYS mode link register (lr). We do not save the stack pointer (r13) because we use it to store the other registers and will return it to the correct value before we return from the FIQ handler. The program counter (r15) does not need to be saved as it now points to this code. | ||
+ | <br /> | ||
+ | <br />To process the fast interrupt request the handler calls the DispatchFIQ function which will dispatch the interrupt to a registered handler for processing. The handler must clear the interrupt source before it returns or the fast interrupt will simply occur again immediately once reenabled. | ||
+ | <br /> | ||
+ | <br />To return from the fast interrupt request the handler uses the rfeia (Return From Exception Increment After) instruction which will load the pc and cpsr from the stack of the current mode (SYS or SVC). | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''ARMv6 helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6GetFPEXC:LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6GetFPSCR:LongWord; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure ARMv6StartMMU; assembler; nostackframe;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6GetPageTableCoarse(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Coarse Page Table entry (1MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Coarse Page Table entry (1MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | Caller must call ARMv6InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6GetPageTableLarge(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Large Page Table entry (64KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Large Page Table entry (64KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords | ||
+ | See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | <br />Caller must call ARMv6InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6GetPageTableSmall(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Small Page Table entry (4KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Small Page Table entry (4KB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-40 of the ARM1176JZF-S Technical Reference Manual | ||
+ | Caller must call ARMv6InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6GetPageTableSection(Address:PtrUInt):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the descriptor for a Page Table Section (1MB) or Supersection (16MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Page Table Section (1MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | Caller must call ARMv6InvalidateTLB after changes if MMU is enabled | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function ARMv6SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the descriptor for a Page Table Supersection (16MB)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords | ||
+ | See page 6-39 of the ARM1176JZF-S Technical Reference Manual | ||
+ | <br />Caller must call ARMv6InvalidateTLB after changes if MMU is enabled | ||
|- | |- | ||
|} | |} |
Latest revision as of 01:35, 22 April 2022
Return to Unit Reference
Description
Ultibo Platform Interface unit for ARMv6
The ARMv6 (ARM11) does not support WFI, WFE, DMB, DSB or ISB instructions, these must be done using MCR operations on the system control processor registers.
The ARMv6 supports the LDREX/STREX instructions for syncronisation (Lock/Mutex/Semaphore etc) but only if the MMU is enabled.
Constants
ARMV6_PAGE_TABLES_*
ARMV6_PAGE_TABLES_SHIFT = 10;
|
ARMV6_CP15_C0_MAINID_*
ARMV6_CP15_C0_MAINID_IMPLEMENTOR_MASK = ($FF shl 24);
|
|
ARMV6_CP15_C0_MAINID_VARIANT_MASK = ($F shl 20);
|
|
ARMV6_CP15_C0_MAINID_ARCHITECTURE_MASK = ($F shl 16);
|
|
ARMV6_CP15_C0_MAINID_PARTNUMBER_MASK = ($FFF shl 4);
|
|
ARMV6_CP15_C0_MAINID_REVISION_MASK = ($F shl 0);
|
|
ARMV6_CP15_C0_MAINID_IMPLEMENTOR_ARM = ($41 shl 24);
|
|
ARMV6_CP15_C0_MAINID_ARCHITECTURE_CPUID = ($F shl 16);
|
|
ARMV6_CP15_C0_MAINID_PARTNUMBER_1176JZSF = ($B76 shl 4);
|
ARMV6_CP15_C0_CTR_*
ARMV6_CP15_C0_CTR_CTYPE_MASK = ($F shl 25);
|
The Cache type bits provide information about the cache architecture (b1110 in the ARM1176JZF-S processor) |
ARMV6_CP15_C0_CTR_S = (1 shl 24);
|
S = 1, indicates that the processor has separate instruction and data caches and not a unified cache |
ARMV6_CP15_C0_CTR_DP = (1 shl 23);
|
The P, Page, bit indicates restrictions on page allocation for bits [13:12] of the VA For ARM1176JZF-S processors, the P bit is set if the cache size is greater than 16KB. |
ARMV6_CP15_C0_CTR_DSIZE_MASK = ($F shl 18);
|
The Size field indicates the cache size in conjunction with the M bit |
ARMV6_CP15_C0_CTR_DSIZE_128K = (8 shl 18);
|
128KB cache, not supported |
ARMV6_CP15_C0_CTR_DSIZE_64K = (7 shl 18);
|
64KB cache |
ARMV6_CP15_C0_CTR_DSIZE_32K = (6 shl 18);
|
32KB cache |
ARMV6_CP15_C0_CTR_DSIZE_16K = (5 shl 18);
|
16KB cache |
ARMV6_CP15_C0_CTR_DSIZE_8K = (4 shl 18);
|
8KB cache |
ARMV6_CP15_C0_CTR_DSIZE_4K = (3 shl 18);
|
4KB cache |
ARMV6_CP15_C0_CTR_DSIZE_2K = (2 shl 18);
|
2KB cache, not supported |
ARMV6_CP15_C0_CTR_DSIZE_1K = (1 shl 18);
|
1KB cache, not supported |
ARMV6_CP15_C0_CTR_DSIZE_05K = (0 shl 18);
|
0.5KB cache, not supported |
ARMV6_CP15_C0_CTR_DASSOC_MASK = (7 shl 15);
|
b010, indicates that the ARM1176JZF-S processor has 4-way associativity |
ARMV6_CP15_C0_CTR_DM = (1 shl 14);
|
Indicates the cache size and cache associativity values in conjunction with the Size and Assoc fields (In the ARM1176JZF-S processor the M bit is set to 0). |
ARMV6_CP15_C0_CTR_DLEN_MASK = (3 shl 12);
|
b10, indicates that ARM1176JZF-S processor has a cache line length of 8 words, that is 32 byte. |
ARMV6_CP15_C0_CTR_DLEN_32 = (2 shl 12);
|
|
ARMV6_CP15_C0_CTR_IP = (1 shl 11);
|
The P, Page, bit indicates restrictions on page allocation for bits [13:12] of the VA For ARM1176JZF-S processors, the P bit is set if the cache size is greater than 16KB. |
ARMV6_CP15_C0_CTR_ISIZE_MASK = ($F shl 6);
|
The Size field indicates the cache size in conjunction with the M bit |
ARMV6_CP15_C0_CTR_ISIZE_128K = (8 shl 6);
|
128KB cache, not supported |
ARMV6_CP15_C0_CTR_ISIZE_64K = (7 shl 6);
|
64KB cache |
ARMV6_CP15_C0_CTR_ISIZE_32K = (6 shl 6);
|
32KB cache |
ARMV6_CP15_C0_CTR_ISIZE_16K = (5 shl 6);
|
16KB cache |
ARMV6_CP15_C0_CTR_ISIZE_8K = (4 shl 6);
|
8KB cache |
ARMV6_CP15_C0_CTR_ISIZE_4K = (3 shl 6);
|
4KB cache |
ARMV6_CP15_C0_CTR_ISIZE_2K = (2 shl 6);
|
2KB cache, not supported |
ARMV6_CP15_C0_CTR_ISIZE_1K = (1 shl 6);
|
1KB cache, not supported |
ARMV6_CP15_C0_CTR_ISIZE_05K = (0 shl 6);
|
0.5KB cache, not supported |
ARMV6_CP15_C0_CTR_IASSOC_MASK = (7 shl 3);
|
b010, indicates that the ARM1176JZF-S processor has 4-way associativity |
ARMV6_CP15_C0_CTR_IM = (1 shl 2);
|
Indicates the cache size and cache associativity values in conjunction with the Size and Assoc fields (In the ARM1176JZF-S processor the M bit is set to 0). |
ARMV6_CP15_C0_CTR_ILEN_MASK = (3 shl 0);
|
b10, indicates that ARM1176JZF-S processor has a cache line length of 8 words, that is 32 bytes. |
ARMV6_CP15_C0_CTR_ILEN_32 = (2 shl 0);
|
ARMV6_CP15_C1_*
ARMV6_CP15_C1_FA_BIT = (1 shl 29);
|
Force AP functionality in the MMU is enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_TR_BIT = (1 shl 28);
|
TEX remap enabled when set to 1 (TEX[2:1] become page table bits for OS) (Default 0) |
ARMV6_CP15_C1_EE_BIT = (1 shl 25);
|
CPSR E bit is set to 1 on an exception when set to 1 (Default 0) |
ARMV6_CP15_C1_VE_BIT = (1 shl 24);
|
Interrupt vectors are defined by the VIC interface when set to 1 (Default 0) |
ARMV6_CP15_C1_XP_BIT = (1 shl 23);
|
Subpage AP bits disabled when set to 1 (Default 0) |
ARMV6_CP15_C1_U_BIT = (1 shl 22);
|
Unaligned data access support enabled when set to 1 (Default 0). The processor permits unaligned loads and stores and support for mixed endian data is enabled. |
ARMV6_CP15_C1_FI_BIT = (1 shl 21);
|
Low interrupt latency configuration enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_L4_BIT = (1 shl 15);
|
Loads to PC do not set the T bit when set to 1 (ARMv4 behavior) (Default 0) |
ARMV6_CP15_C1_RR_BIT = (1 shl 14);
|
Predictable cache replacement strategy by round-robin replacement when set to 1 (Default 0) |
ARMV6_CP15_C1_V_BIT = (1 shl 13);
|
High exception vectors selected when set to 1, address range = 0xFFFF0000-0xFFFF001C (Default 0) |
ARMV6_CP15_C1_I_BIT = (1 shl 12);
|
L1 Instruction Cache enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_Z_BIT = (1 shl 11);
|
Branch prediction enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_B_BIT = (1 shl 7);
|
Big-endian word-invariant memory system when set to 1 (Default 0) |
ARMV6_CP15_C1_C_BIT = (1 shl 2);
|
L1 Data cache enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_A_BIT = (1 shl 1);
|
Strict alignment fault checking enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_M_BIT = (1 shl 0);
|
MMU enabled when set to 1 (Default 0) |
ARMV6_CP15_C1_AUX_*
ARMV6_CP15_C1_AUX_CZ = (1 shl 6);
|
Controls the restriction of cache size to 16KB |
ARMV6_CP15_C1_CP*
ARMV6_CP15_C1_CP0_NONE = (0 shl 0);
|
Access denied (Default) |
ARMV6_CP15_C1_CP0_SYS = (1 shl 0);
|
Privileged mode access only |
ARMV6_CP15_C1_CP0_USER = (3 shl 0);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP1_NONE = (0 shl 2);
|
Access denied (Default) |
ARMV6_CP15_C1_CP1_SYS = (1 shl 2);
|
Privileged mode access only |
ARMV6_CP15_C1_CP1_USER = (3 shl 2);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP2_NONE = (0 shl 4);
|
Access denied (Default) |
ARMV6_CP15_C1_CP2_SYS = (1 shl 4);
|
Privileged mode access only |
ARMV6_CP15_C1_CP2_USER = (3 shl 4);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP3_NONE = (0 shl 6);
|
Access denied (Default) |
ARMV6_CP15_C1_CP3_SYS = (1 shl 6);
|
Privileged mode access only |
ARMV6_CP15_C1_CP3_USER = (3 shl 6);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP4_NONE = (0 shl 8);
|
Access denied (Default) |
ARMV6_CP15_C1_CP4_SYS = (1 shl 8);
|
Privileged mode access only |
ARMV6_CP15_C1_CP4_USER = (3 shl 8);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP5_NONE = (0 shl 10);
|
Access denied (Default) |
ARMV6_CP15_C1_CP5_SYS = (1 shl 10);
|
Privileged mode access only |
ARMV6_CP15_C1_CP5_USER = (3 shl 10);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP6_NONE = (0 shl 12);
|
Access denied (Default) |
ARMV6_CP15_C1_CP6_SYS = (1 shl 12);
|
Privileged mode access only |
ARMV6_CP15_C1_CP6_USER = (3 shl 12);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP7_NONE = (0 shl 14);
|
Access denied (Default) |
ARMV6_CP15_C1_CP7_SYS = (1 shl 14);
|
Privileged mode access only |
ARMV6_CP15_C1_CP7_USER = (3 shl 14);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP8_NONE = (0 shl 16);
|
Access denied (Default) |
ARMV6_CP15_C1_CP8_SYS = (1 shl 16);
|
Privileged mode access only |
ARMV6_CP15_C1_CP8_USER = (3 shl 16);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP9_NONE = (0 shl 18);
|
Access denied (Default) |
ARMV6_CP15_C1_CP9_SYS = (1 shl 18);
|
Privileged mode access only |
ARMV6_CP15_C1_CP9_USER = (3 shl 18);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP10_NONE = (0 shl 20);
|
Access denied (Default) |
ARMV6_CP15_C1_CP10_SYS = (1 shl 20);
|
Privileged mode access only |
ARMV6_CP15_C1_CP10_USER = (3 shl 20);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP11_NONE = (0 shl 22);
|
Access denied (Default) |
ARMV6_CP15_C1_CP11_SYS = (1 shl 22);
|
Privileged mode access only |
ARMV6_CP15_C1_CP11_USER = (3 shl 22);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP12_NONE = (0 shl 24);
|
Access denied (Default) |
ARMV6_CP15_C1_CP12_SYS = (1 shl 24);
|
Privileged mode access only |
ARMV6_CP15_C1_CP12_USER = (3 shl 24);
|
Privileged and User mode access |
ARMV6_CP15_C1_CP13_NONE = (0 shl 26);
|
Access denied (Default) |
ARMV6_CP15_C1_CP13_SYS = (1 shl 26);
|
Privileged mode access only |
ARMV6_CP15_C1_CP13_USER = (3 shl 26);
|
Privileged and User mode access |
Coprocessors CP14 (Debug Control) and CP15 (System Control) are not affected by the Coprocessor Access Control Register |
ARMV6_CP15_C2_TTBR_*
ARMV6_CP15_C2_TTBR_BASE_MASK = $FFFFC000;
|
|
ARMV6_CP15_C2_TTBR_RGN_OUTER_NONCACHED = (0 shl 3);
|
Outer Noncacheable (Default) |
ARMV6_CP15_C2_TTBR_RGN_OUTER_WRITE_ALLOCATE = (1 shl 3);
|
Outer Write-back, Write Allocate |
ARMV6_CP15_C2_TTBR_RGN_OUTER_WRITE_THROUGH = (2 shl 3);
|
Outer Write-through, No Allocate on Write |
ARMV6_CP15_C2_TTBR_RGN_OUTER_WRITE_BACK = (3 shl 3);
|
Outer Write-back, No Allocate on Write |
ARMV6_CP15_C2_TTBR_P = (1 shl 2);
|
If the processor supports ECC, it indicates to the memory controller it is enabled or disabled. For ARM1176JZF-S processors this is 0. |
ARMV6_CP15_C2_TTBR_S = (1 shl 1);
|
Indicates the page table walk is to Shared memory if set to 1 (Default 0) |
ARMV6_CP15_C2_TTBR_C_INNER_CACHED = (1 shl 0);
|
Indicates the page table walk is Inner Cacheable if set to 1 (Default 0) |
ARMV6_CP15_C3_DOMAIN*
ARMV6_CP15_C3_DOMAIN0_NONE = (0 shl 0);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN0_CLIENT = (1 shl 0);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN0_MANAGER = (3 shl 0);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN1_NONE = (0 shl 2);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN1_CLIENT = (1 shl 2);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN1_MANAGER = (3 shl 2);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN2_NONE = (0 shl 4);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN2_CLIENT = (1 shl 4);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN2_MANAGER = (3 shl 4);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN3_NONE = (0 shl 6);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN3_CLIENT = (1 shl 6);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN3_MANAGER = (3 shl 6);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN4_NONE = (0 shl 8);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN4_CLIENT = (1 shl 8);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN4_MANAGER = (3 shl 8);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN5_NONE = (0 shl 10);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN5_CLIENT = (1 shl 10);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN5_MANAGER = (3 shl 10);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN6_NONE = (0 shl 12);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN6_CLIENT = (1 shl 12);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN6_MANAGER = (3 shl 12);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN7_NONE = (0 shl 14);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN7_CLIENT = (1 shl 14);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN7_MANAGER = (3 shl 14);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN8_NONE = (0 shl 16);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN8_CLIENT = (1 shl 16);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN8_MANAGER = (3 shl 16);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN9_NONE = (0 shl 18);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN9_CLIENT = (1 shl 18);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN9_MANAGER = (3 shl 18);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN10_NONE = (0 shl 20);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN10_CLIENT = (1 shl 20);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN10_MANAGER = (3 shl 20);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN11_NONE = (0 shl 22);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN11_CLIENT = (1 shl 22);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN11_MANAGER = (3 shl 22);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN12_NONE = (0 shl 24);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN12_CLIENT = (1 shl 24);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN12_MANAGER = (3 shl 24);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN13_NONE = (0 shl 26);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN13_CLIENT = (1 shl 26);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN13_MANAGER = (3 shl 26);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN14_NONE = (0 shl 28);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN14_CLIENT = (1 shl 28);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN14_MANAGER = (3 shl 28);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_CP15_C3_DOMAIN15_NONE = (0 shl 30);
|
No access, Any access generates a domain fault (Default) |
ARMV6_CP15_C3_DOMAIN15_CLIENT = (1 shl 30);
|
Client, Accesses are checked against the access permission bits in the TLB entry |
ARMV6_CP15_C3_DOMAIN15_MANAGER = (3 shl 30);
|
Manager, Accesses are not checked against the access permission bits in the TLB entry, so a permission fault cannot be generated |
ARMV6_FPEXC_*
ARMV6_FPEXC_EN = (1 shl 30);
|
Floating-point system is enabled and operates normally if set to 1 (Default 0) |
ARMV6_FPEXC_EX = (1 shl 31);
|
If EX is set to 0 then only FPSCR and FPEXC need to be preseved on a context switch (Default 0) |
ARMV6_L1D_TYPE_*
See page 6-36 of the ARM1176JZF-S Technical Reference Manual | |
These formats assume that the XP bit in the C1 control register is set to one to enable the ARMv6 format Page Tables | |
See page 6-39 of the ARM1176JZF-S Technical Reference Manual | |
Level One Page Table contains 4096 32bit (4 byte) entries for a total size of 16KB | |
ARMV6_L1D_TYPE_COARSE = 1;
|
The entry points to a 1MB second-level page table. See page 6-40. |
ARMV6_L1D_TYPE_SECTION = 2;
|
The entry points to a either a 1MB Section of memory or a 16MB Supersection of memory |
ARMV6_L1D_TYPE_SUPERSECTION = 2;
|
Bit[18] of the descriptor selects between a Section and a Supersection |
ARMV6_L1D_FLAG_*
See page 6-39 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L1D_FLAG_COARSE_NS = (1 shl 3);
|
NS (Non Secure) Attribute bit to enable the support of TrustZone |
ARMV6_L1D_FLAG_SECTION_NS = (1 shl 19);
|
NS (Non Secure) Attribute bit to enable the support of TrustZone |
ARMV6_L1D_FLAG_SUPERSECTION = (1 shl 18);
|
The descriptor is a 16MB Supersection instead of a 1MB Section (Section Only) |
ARMV6_L1D_FLAG_NOT_GLOBAL = (1 shl 17);
|
The Not-Global (nG) bit, determines if the translation is marked as global (0), or process-specific (1) (Section Only) |
ARMV6_L1D_FLAG_SHARED = (1 shl 16);
|
The Shared (S) bit, determines if the translation is for Non-Shared (0), or Shared (1) memory. This only applies to Normal memory regions.
Device memory can be Shared or Non-Shared as determined by the TEX bits and the C and B bits (Section Only). |
ARMV6_L1D_FLAG_APX = (1 shl 15);
|
The access permissions extension (APX) bit, provides an extra access permission bit (Section Only) |
ARMV6_L1D_FLAG_P = (1 shl 9);
|
If the P bit is supported and set for the memory region, it indicates to the system memory controller that this memory region has ECC enabled. ARM1176JZF-S processors do not support the P bit. |
ARMV6_L1D_FLAG_XN = (1 shl 4);
|
The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable(1) (Section Only) |
ARMV6_L1D_FLAG_C = (1 shl 3);
|
Cacheable (C) bit (Section Only) |
ARMV6_L1D_FLAG_B = (1 shl 2);
|
Bufferable (B) bit (Section Only) |
ARMV6_L1D_*_MASK
See page 6-39 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L1D_COARSE_BASE_MASK = $FFFFFC00;
|
|
ARMV6_L1D_SECTION_BASE_MASK = $FFF00000;
|
|
ARMV6_L1D_SUPERSECTION_BASE_MASK = $FF000000;
|
|
ARMV6_L1D_DOMAIN_MASK = ($F shl 5);
|
Security Domain of the Descriptor |
ARMV6_L1D_TEX_MASK = (7 shl 12);
|
Type extension field bits (Section Only) |
ARMV6_L1D_AP_MASK = (3 shl 10);
|
Access permission bits (Section Only) |
ARMV6_L1D_TEX*
See page 6-15 of the ARM1176JZF-S Technical Reference Manual (Section Only) | |
ARMV6_L1D_TEX0 = (0 shl 12);
|
|
ARMV6_L1D_TEX1 = (1 shl 12);
|
|
ARMV6_L1D_TEX2 = (2 shl 12);
|
|
ARMV6_L1D_TEX4 = (4 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L1D_TEX5 = (5 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L1D_TEX6 = (6 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L1D_TEX7 = (7 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L1D_AP*
See page 6-12 of the ARM1176JZF-S Technical Reference Manual (Section Only) | |
ARMV6_L1D_AP0 = (0 shl 10);
|
|
ARMV6_L1D_AP1 = (1 shl 10);
|
|
ARMV6_L1D_AP2 = (2 shl 10);
|
|
ARMV6_L1D_AP3 = (3 shl 10);
|
ARMV6_L1D_ACCESS_*
See page 6-12 of the ARM1176JZF-S Technical Reference Manual | |
This is not the full set of permissions as Ultibo always runs in priviledged mode | |
The XN bit can also be applied to control whether memory regions are executable or not | |
ARMV6_L1D_ACCESS_NONE = ARMV6_L1D_AP0;
|
No Access for both Privileged and Unprivileged code |
ARMV6_L1D_ACCESS_READONLY = ARMV6_L1D_FLAG_APX or ARMV6_L1D_AP3;
|
Read-Only for both Privileged and Unprivileged code |
ARMV6_L1D_ACCESS_READWRITE = ARMV6_L1D_AP3;
|
Read-Write for both Privileged and Unprivileged code |
ARMV6_L1D_CACHE_*
See page 6-15 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L1D_CACHE_STRONGLY_ORDERED = ARMV6_L1D_TEX0;
|
Strongly Ordered. (Always Shared) |
ARMV6_L1D_CACHE_SHARED_DEVICE = ARMV6_L1D_TEX0 or ARMV6_L1D_FLAG_B;
|
Device. (Always Shared) |
ARMV6_L1D_CACHE_NORMAL_WRITE_THROUGH = ARMV6_L1D_TEX0 or ARMV6_L1D_FLAG_C;
|
Normal. Write Through (Shared if S bit set) |
ARMV6_L1D_CACHE_NORMAL_WRITE_BACK = ARMV6_L1D_TEX0 or ARMV6_L1D_FLAG_C or ARMV6_L1D_FLAG_B;
|
Normal. Write Back (Shared if S bit set) |
ARMV6_L1D_CACHE_NORMAL_NONCACHED = ARMV6_L1D_TEX1;
|
Normal. Noncacheable (Shared if S bit set) |
ARMV6_L1D_CACHE_NONSHARED_DEVICE = ARMV6_L1D_TEX2;
|
Device. (Not Shared) |
ARMV6_L2D_TYPE_*
See page 6-40 of the ARM1176JZF-S Technical Reference Manual | |
Level Two Page Table contains 256 32bit (4 byte) entries for a total size of 1KB | |
ARMV6_L2D_TYPE_LARGE = 1;
|
The entry points to a 64KB Large page in memory |
ARMV6_L2D_TYPE_SMALL = 2;
|
The entry points to a 4KB Extended small page in memory. Bit[0] of the entry is the XN (Execute Never) bit for the entry. |
ARMV6_L2D_FLAG_*
See page 6-40 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_FLAG_LARGE_XN = (1 shl 15);
|
The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable(1) |
ARMV6_L2D_FLAG_SMALL_XN = (1 shl 0);
|
The Execute-Never (XN) bit, determines if the region is Executable (0) or Not-executable(1) |
ARMV6_L2D_FLAG_NOT_GLOBAL = (1 shl 11);
|
The Not-Global (nG) bit, determines if the translation is marked as global (0), or process-specific (1) |
ARMV6_L2D_FLAG_SHARED = (1 shl 10);
|
The Shared (S) bit, determines if the translation is for Non-Shared (0), or Shared (1) memory. This only applies to Normal memory regions.
Device memory can be Shared or Non-Shared as determined by the TEX bits and the C and B bits |
ARMV6_L2D_FLAG_APX = (1 shl 9);
|
The access permissions extension (APX) bit, provides an extra access permission bit. |
ARMV6_L2D_FLAG_C = (1 shl 3);
|
Cacheable (C) bit |
ARMV6_L2D_FLAG_B = (1 shl 2);
|
Bufferable (B) bit |
ARMV6_L2D_*_MASK
See page 6-40 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_LARGE_BASE_MASK = $FFFF0000;
|
|
ARMV6_L2D_SMALL_BASE_MASK = $FFFFF000;
|
|
ARMV6_L2D_LARGE_TEX_MASK = (7 shl 12);
|
Type extension field bits |
ARMV6_L2D_SMALL_TEX_MASK = (7 shl 6);
|
Type extension field bits |
ARMV6_L2D_AP_MASK = (3 shl 4);
|
Access permission bits |
ARMV6_L2D_LARGE_TEX*
See page 6-15 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_LARGE_TEX0 = (0 shl 12);
|
|
ARMV6_L2D_LARGE_TEX1 = (1 shl 12);
|
|
ARMV6_L2D_LARGE_TEX2 = (2 shl 12);
|
|
ARMV6_L2D_LARGE_TEX4 = (4 shl 12);
|
|
ARMV6_L2D_LARGE_TEX5 = (5 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L2D_LARGE_TEX6 = (6 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L2D_LARGE_TEX7 = (7 shl 12);
|
Only used for Cacheable memory values |
ARMV6_L2D_SMALL_TEX*
See page 6-15 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_SMALL_TEX0 = (0 shl 6);
|
|
ARMV6_L2D_SMALL_TEX1 = (1 shl 6);
|
|
ARMV6_L2D_SMALL_TEX2 = (2 shl 6);
|
|
ARMV6_L2D_SMALL_TEX4 = (4 shl 6);
|
|
ARMV6_L2D_SMALL_TEX5 = (5 shl 6);
|
Only used for Cacheable memory values |
ARMV6_L2D_SMALL_TEX6 = (6 shl 6);
|
Only used for Cacheable memory values |
ARMV6_L2D_SMALL_TEX7 = (7 shl 6);
|
Only used for Cacheable memory values |
ARMV6_L2D_AP*
See page 6-12 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_AP0 = (0 shl 4);
|
|
ARMV6_L2D_AP1 = (1 shl 4);
|
|
ARMV6_L2D_AP2 = (2 shl 4);
|
|
ARMV6_L2D_AP3 = (3 shl 4);
|
ARMV6_L2D_ACCESS_*
See page 6-12 of the ARM1176JZF-S Technical Reference Manual) | |
This is not the full set of permissions as Ultibo always runs in priviledged mode | |
The XN bit can also be applied to control whether memory regions are executable or not | |
ARMV6_L2D_ACCESS_NONE = ARMV6_L2D_AP0;
|
No Access for both Privileged and Unprivileged code |
ARMV6_L2D_ACCESS_READONLY = ARMV6_L2D_FLAG_APX or ARMV6_L2D_AP3;
|
Read-Only for both Privileged and Unprivileged code |
ARMV6_L2D_ACCESS_READWRITE = ARMV6_L2D_AP3;
|
Read-Write for both Privileged and Unprivileged code |
ARMV6_L2D_LARGE_CACHE_*
See page 6-15 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_LARGE_CACHE_STRONGLY_ORDERED = ARMV6_L2D_LARGE_TEX0;
|
Strongly Ordered. (Always Shared) |
ARMV6_L2D_LARGE_CACHE_SHARED_DEVICE = ARMV6_L2D_LARGE_TEX0 or ARMV6_L2D_FLAG_B;
|
Device. (Always Shared) |
ARMV6_L2D_LARGE_CACHE_NORMAL_WRITE_THROUGH = ARMV6_L2D_LARGE_TEX0 or ARMV6_L2D_FLAG_C;
|
Normal. Write Through (Shared if S bit set) |
ARMV6_L2D_LARGE_CACHE_NORMAL_WRITE_BACK = ARMV6_L2D_LARGE_TEX0 or ARMV6_L2D_FLAG_C or ARMV6_L2D_FLAG_B;
|
Normal. Write Back (Shared if S bit set) |
ARMV6_L2D_LARGE_CACHE_NORMAL_NONCACHED = ARMV6_L2D_LARGE_TEX1;
|
Normal. Noncacheable (Shared if S bit set) |
ARMV6_L2D_LARGE_CACHE_NONSHARED_DEVICE = ARMV6_L2D_LARGE_TEX2;
|
Device. (Not Shared) |
ARMV6_L2D_SMALL_CACHE_*
See page 6-15 of the ARM1176JZF-S Technical Reference Manual | |
ARMV6_L2D_SMALL_CACHE_STRONGLY_ORDERED = ARMV6_L2D_SMALL_TEX0;
|
Strongly Ordered. (Always Shared) |
ARMV6_L2D_SMALL_CACHE_SHARED_DEVICE = ARMV6_L2D_SMALL_TEX0 or ARMV6_L2D_FLAG_B;
|
Device. (Always Shared) |
ARMV6_L2D_SMALL_CACHE_NORMAL_WRITE_THROUGH = ARMV6_L2D_SMALL_TEX0 or ARMV6_L2D_FLAG_C;
|
Normal. Write Through (Shared if S bit set) |
ARMV6_L2D_SMALL_CACHE_NORMAL_WRITE_BACK = ARMV6_L2D_SMALL_TEX0 or ARMV6_L2D_FLAG_C or ARMV6_L2D_FLAG_B;
|
Normal. Write Back (Shared if S bit set) |
ARMV6_L2D_SMALL_CACHE_NORMAL_NONCACHED = ARMV6_L2D_SMALL_TEX1;
|
Normal. Noncacheable (Shared if S bit set) |
ARMV6_L2D_SMALL_CACHE_NONSHARED_DEVICE = ARMV6_L2D_SMALL_TEX2;
|
Device. (Not Shared) |
ARMV6_*
ARMV6_CONTEXT_LENGTH = 50;
|
Length of ARM context switch record in 32 bit words (includes fpexc, fpscr, d0-d15, r0-r12, lr, pc, cpsr) |
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
procedure ARMv6Init;
Note | None documented |
---|
ARMv6 platform functions
procedure ARMv6CPUInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6FPUInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6MMUInit;
Note | None documented |
---|
procedure ARMv6CacheInit; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6PageTableInit;
Note | See page 6-36 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6SystemCall(Number:LongWord; Param1,Param2,Param3:PtrUInt); assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetMode:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetState:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetMainID:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6CPUGetModel:LongWord;
Note | None documented |
---|
function ARMv6CPUGetRevision:LongWord;
Note | None documented |
---|
function ARMv6CPUGetDescription:String;
Note | None documented |
---|
function ARMv6FPUGetState:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1CacheGetType:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1DataCacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1DataCacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1InstructionCacheGetSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6L1InstructionCacheGetLineSize:LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6Halt; assembler; nostackframe; public name '_haltproc';
Note | See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual |
---|
procedure ARMv6Pause; assembler; nostackframe;
Note | See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual |
---|
procedure ARMv6WaitForEvent; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6WaitForInterrupt; assembler; nostackframe;
Note | See Standby mode on page 10-3 of the ARM1176JZF-S Revision: r0p7 Technical Reference Manual |
---|
procedure ARMv6DataMemoryBarrier; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual
Note that this is also available in the FPC RTL as ReadBarrier/WriteBarrier See: \source\rtl\arm\arm.inc
|
---|
procedure ARMv6DataSynchronizationBarrier; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InstructionMemoryBarrier; assembler; nostackframe;
Note | The ARM1176JZF-S Technical Reference Manual states on page 5-10 (section 5.5) that a Flush Prefetch Buffer operation also acts as an IMB
See page 3-79 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateTLB; assembler; nostackframe;
Note | See page 3-86 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataTLB; assembler; nostackframe;
Note | See page 3-86 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionTLB; assembler; nostackframe;
Note | See page 3-86 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanDataCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanAndInvalidateDataCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionCache; assembler; nostackframe;
Note | See page 3-74 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanDataCacheRange(Address:PtrUInt; Size:LongWord);
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanAndInvalidateDataCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6CleanAndInvalidateDataCacheRange(Address:PtrUInt; Size:LongWord);
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionCacheRangeInternal(Address:PtrUInt; Size:LongWord); assembler; nostackframe;
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6InvalidateInstructionCacheRange(Address:PtrUInt; Size:LongWord);
Note | See page 3-71/3-76 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6FlushPrefetchBuffer; assembler; nostackframe;
Note | See page 3-79 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6FlushBranchTargetCache; assembler; nostackframe;
Note | See page 3-79 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6ContextSwitch(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewThread | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
|
procedure ARMv6ContextSwitchIRQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
|
procedure ARMv6ContextSwitchFIQ(OldStack,NewStack:Pointer; NewThread:TThreadHandle); assembler; nostackframe;
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
|
procedure ARMv6ContextSwitchSWI(OldStack,NewStack:Pointer; NewThread:TThreadHandle);
OldStack | The address to save the stack pointer to for the current thread (Passed in r0) |
---|---|
NewStack | The address to restore the stack pointer from for the new thread (Passed in r1) |
NewThread | The handle of the new thread to switch to (Passed in r2) |
Note | At the point of the actual context switch (str sp/ldr sp) the thread stacks will look like this:
|
function ARMv6InterlockedOr(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedXor(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedAnd(var Target:LongInt; Value:LongInt):LongInt; assembler; nostackframe;
Note | See page ??? of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedDecrement(var Target:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedIncrement(var Target:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedAddExchange(var Target:LongInt; Source:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6InterlockedCompareExchange(var Target:LongInt; Source,Compare:LongInt):LongInt; assembler; nostackframe;
Note | See page 8-6 of the ARM1176JZF-S Technical Reference Manual |
---|
procedure ARMv6PageTableGetEntry(Address:PtrUInt; var Entry:TPageTableEntry);
Note | None documented |
---|
function ARMv6PageTableSetEntry(const Entry:TPageTableEntry):LongWord;
Note | None documented |
---|
function ARMv6VectorTableGetEntry(Number:LongWord):PtrUInt;
Note | None documented |
---|
function ARMv6VectorTableSetEntry(Number:LongWord; Address:PtrUInt):LongWord;
Note | None documented |
---|
function ARMv6FirstBitSet(Value:LongWord):LongWord; assembler; nostackframe;
Note | ARM arm states that CLZ is supported for ARMv5 and above |
---|
function ARMv6CountLeadingZeros(Value:LongWord):LongWord; assembler; nostackframe;
Note | ARM arm states that CLZ is supported for ARMv5 and above |
---|
ARMv6 thread functions
procedure ARMv6PrimaryInit; assembler; nostackframe;
Note | None documented |
---|
function ARMv6SpinLock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinUnlock(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinLockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinUnlockIRQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinLockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinUnlockFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinLockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinUnlockIRQFIQ(Spin:PSpinEntry):LongWord; assembler; nostackframe;
Spin | Pointer to the Spin entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6SpinCheckIRQ(Spin:PSpinEntry):Boolean;
Return | True if the mask would enable IRQ on restore, False if it would not. |
---|
function ARMv6SpinCheckFIQ(Spin:PSpinEntry):Boolean;
Return | True if the mask would enable FIQ on restore, False if it would not. |
---|
function ARMv6SpinExchangeIRQ(Spin1,Spin2:PSpinEntry):LongWord;
Note | None documented |
---|
function ARMv6SpinExchangeFIQ(Spin1,Spin2:PSpinEntry):LongWord;
Note | None documented |
---|
function ARMv6MutexLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Mutex | Pointer to the Mutex entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6MutexUnlock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Mutex | Pointer to the Mutex entry to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure (Returned in R0) |
function ARMv6MutexTryLock(Mutex:PMutexEntry):LongWord; assembler; nostackframe;
Mutex | Pointer to the Mutex entry to try to lock (Passed in R0) |
---|---|
Return | ERROR_SUCCESS if completed, ERROR_LOCKED if already locked or another error code on failure (Returned in R0). |
function ARMv6ThreadGetCurrent:TThreadHandle; assembler; nostackframe;
Note | See page 3-129 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6ThreadSetCurrent(Thread:TThreadHandle):LongWord; assembler; nostackframe;
Note | Set the current thread Id in the c13 (Thread and process ID) register of system control coprocessor CP15
See page 3-129 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6ThreadSetupStack(StackBase:Pointer; StartProc:TThreadStart; ReturnProc:TThreadEnd; Parameter:Pointer):Pointer;
StackBase | Pointer to the base (highest address) of the allocated stack (as returned by ThreadAllocateStack |
---|---|
StartProc | The procedure the thread will start executing when resumed |
ReturnProc | The procedure the thread will return to on exit |
Return | Pointer to the starting address of the stack, which will be the Stack Pointer on the first context switch. |
Note | At the point of a context switch the thread stack will look like this:
|
ARMv6 IRQ functions
function ARMv6DispatchIRQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Note | None documented |
---|
ARMv6 FIQ functions
function ARMv6DispatchFIQ(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle; inline;
Note | None documented |
---|
ARMv6 SWI functions
function ARMv6DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle; inline;
Note | None documented |
---|
ARMv6 interrupt functions
procedure ARMv6ResetHandler; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6UndefinedInstructionHandler; assembler; nostackframe;
Note | This routine is registered as the vector for undefined instruction exception in the vector table loaded during startup |
---|
procedure ARMv6SoftwareInterruptHandler; assembler; nostackframe;
Note | This routine is registered as the vector for SWI requests in the vector table loaded during startup. When the processor executes an SVC it switches to SWI mode, stores the address of the next instruction in the SWI mode link register (lr_svc) and saves the current program status register into the SWI mode saved program status register (spsr_svc).
|
---|
procedure ARMv6PrefetchAbortHandler; assembler; nostackframe;
Note | This routine is registered as the vector for prefetch abort exception in the vector table loaded during startup |
---|
procedure ARMv6DataAbortHandler; assembler; nostackframe;
Note | This routine is registered as the vector for data abort exception in the vector table loaded during startup |
---|
procedure ARMv6ReservedHandler; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6IRQHandler; assembler; nostackframe;
Note | This routine is registered as the vector for IRQ requests in the vector table loaded during startup.
|
---|
procedure ARMv6FIQHandler; assembler; nostackframe;
Note | This routine is registered as the vector for FIQ requests in the vector table loaded during startup.
|
---|
ARMv6 helper functions
function ARMv6GetFPEXC:LongWord; assembler; nostackframe;
Note | None documented |
---|
function ARMv6GetFPSCR:LongWord; assembler; nostackframe;
Note | None documented |
---|
procedure ARMv6StartMMU; assembler; nostackframe;
Note | None documented |
---|
function ARMv6GetPageTableCoarse(Address:PtrUInt):LongWord;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableCoarse(Address,CoarseAddress:PtrUInt; Flags:Word):Boolean;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled |
---|
function ARMv6GetPageTableLarge(Address:PtrUInt):LongWord;
Note | See page 6-40 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableLarge(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Note | Large Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords
See page 6-40 of the ARM1176JZF-S Technical Reference Manual
|
---|
function ARMv6GetPageTableSmall(Address:PtrUInt):LongWord;
Note | See page 6-40 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableSmall(Address,PhysicalAddress:PtrUInt; Flags:Word):Boolean;
Note | See page 6-40 of the ARM1176JZF-S Technical Reference Manual
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled |
---|
function ARMv6GetPageTableSection(Address:PtrUInt):LongWord;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual |
---|
function ARMv6SetPageTableSection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Note | See page 6-39 of the ARM1176JZF-S Technical Reference Manual
Caller must call ARMv6InvalidateTLB after changes if MMU is enabled |
---|
function ARMv6SetPageTableSupersection(Address,PhysicalAddress:PtrUInt; Flags:LongWord):Boolean;
Note | Supersection Page Table descriptors must begin on a 16 longword (64 byte) boundary and be repeated for 16 consecutive longwords
See page 6-39 of the ARM1176JZF-S Technical Reference Manual
|
---|
Return to Unit Reference