Difference between revisions of "Unit PlatformRPi3"
Line 43: | Line 43: | ||
|- | |- | ||
| <code>RPI3_SECURE_BOOT = $00000001;</code> | | <code>RPI3_SECURE_BOOT = $00000001;</code> | ||
− | | If 1 then startup will attempt to switch back to secure world during boot process | + | | If 1 then startup will attempt to switch back to secure world during boot process (Moved to ARMSecureBoot) |
+ | |- | ||
+ | | <code>RPI3_SECURE_BOOT_OFFSET = $000000D4;</code> | ||
+ | | The address of the Secure Boot marker in the ARM boot stub | ||
+ | |- | ||
+ | | <code>RPI3_SECURE_BOOT_MARKER = $58495052;</code> | ||
+ | | The Secure Boot marker (ASCII "RPIX") | ||
|- | |- | ||
|} | |} | ||
Line 54: | Line 60: | ||
|- | |- | ||
| <code>RPI3_STARTUP_ADDRESS = $00008000;</code> | | <code>RPI3_STARTUP_ADDRESS = $00008000;</code> | ||
− | | | + | | Address of StartupHandler on Reset (Obtain from linker) |
|- | |- | ||
|} | |} | ||
Line 284: | Line 290: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code>InterruptEntries:array[0..(BCM2837_GPU_IRQ_COUNT + BCM2837_ARM_IRQ_COUNT - 1)] of | + | | <code>InterruptEntries:array[0..(BCM2837_GPU_IRQ_COUNT + BCM2837_ARM_IRQ_COUNT - 1)] of PInterruptEntry;</code> |
| style="width: 40%;"| | | style="width: 40%;"| | ||
|- | |- | ||
Line 290: | Line 296: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code>LocalInterruptEntries:array[RPI3_IRQ_LOCAL_START..(BCM2837_IRQ_COUNT - 1),0..(RPI3_CPU_COUNT - 1)] of | + | | <code>LocalInterruptEntries:array[RPI3_IRQ_LOCAL_START..(BCM2837_IRQ_COUNT - 1),0..(RPI3_CPU_COUNT - 1)] of PInterruptEntry;</code> |
| style="width: 40%;"| | | style="width: 40%;"| | ||
|- | |- | ||
Line 320: | Line 326: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code> | + | | <code>LocalIRQEnabled:array[0..(RPI3_CPU_COUNT - 1)] of LongWord;</code> |
| style="width: 40%;"|1 group of local IRQs to Enable/Disable per CPU (See: TBCM2837ARMLocalRegisters) | | style="width: 40%;"|1 group of local IRQs to Enable/Disable per CPU (See: TBCM2837ARMLocalRegisters) | ||
|- | |- | ||
Line 326: | Line 332: | ||
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
− | | <code> | + | | <code>LocalFIQEnabled:array[0..(RPI3_CPU_COUNT - 1)] of LongWord;</code> |
| style="width: 40%;"|1 group of local FIQs to Enable/Disable per CPU (See: TBCM2837ARMLocalRegisters) | | style="width: 40%;"|1 group of local FIQs to Enable/Disable per CPU (See: TBCM2837ARMLocalRegisters) | ||
|- | |- | ||
Line 689: | Line 695: | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | Non documented |
|- | |- | ||
|} | |} | ||
Line 713: | Line 707: | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | Non documented |
|- | |- | ||
|} | |} | ||
Line 737: | Line 719: | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | Non documented |
|- | |- | ||
|} | |} | ||
Line 762: | Line 732: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | | + | | Non 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 RPi3RegisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request registration of the supplied handler to the specified interrupt number (Where Applicable)</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 RPi3DeregisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Request deregistration of the supplied handler from the specified interrupt number (Where Applicable)</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 785: | Line 767: | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | Non documented |
|- | |- | ||
|} | |} | ||
Line 809: | Line 779: | ||
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 829: | Line 787: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function RPi3GetInterruptEntry(Number:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function RPi3GetInterruptEntry(Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the interrupt entry for the specified interrupt number</div> | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the interrupt entry for the specified interrupt number and instance</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;" | ||
Line 841: | Line 799: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function RPi3GetLocalInterruptEntry(CPUID,Number:LongWord | + | <pre style="border: 0; padding-bottom:0px;">function RPi3GetLocalInterruptEntry(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the local interrupt entry for the specified interrupt number</div> | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the local interrupt entry for the specified interrupt number and instance</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;" | ||
Line 901: | Line 859: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function RPi3CPUGetMemory(var Address:PtrUInt; var Length: | + | <pre style="border: 0; padding-bottom:0px;">function RPi3CPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the CPU Memory from the Mailbox property tags channel</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the CPU Memory from the Mailbox property tags channel</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;"> | ||
Line 925: | Line 883: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function RPi3GPUGetMemory(var Address:PtrUInt; var Length: | + | <pre style="border: 0; padding-bottom:0px;">function RPi3GPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the GPU Memory from the Mailbox property tags channel</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the GPU Memory from the Mailbox property tags channel</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;"> | ||
Line 1,705: | Line 1,663: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferGetNumDisplays(var NumDisplays:LongWord):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the number of displays from the Mailbox property tags channel</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | None documented |
|- | |- | ||
|} | |} | ||
Line 1,717: | Line 1,675: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferGetDisplayId(DisplayNum:LongWord):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the display id for the specified display number from the Mailbox property tags channel</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;" | ||
Line 1,729: | Line 1,687: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferSetDisplayNum(DisplayNum:LongWord):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the display number that all framebuffer requests will refer to using the Mailbox property tags channel</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;" | ||
Line 1,741: | Line 1,699: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferGetDisplaySettings(DisplayNum:LongWord; var DisplaySettings:TDisplaySettings):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the display settings for the specified display number from the Mailbox property tags channel</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;" | ||
Line 1,753: | Line 1,711: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferDisplayIdToName(DisplayId:LongWord):String;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the name for the specified display id</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;" | ||
Line 1,765: | Line 1,723: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3TouchGetBuffer(var Address:PtrUInt):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the Touchscreen buffer from the Mailbox property tags channel</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | On current firmware versions calling TouchGetBuffer will allocate a buffer from GPU memory and render subsequent calls to TouchSetBuffer ineffective. After an initial call to TouchSetBuffer calls to TouchGetBuffer will always return the CPU allocated buffer. |
|- | |- | ||
|} | |} | ||
Line 1,777: | Line 1,735: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3TouchSetBuffer(Address:PtrUInt):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the Touchscreen buffer in the Mailbox property tags channel</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 |
|- | |- | ||
|} | |} | ||
Line 1,789: | Line 1,747: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3VirtualGPIOGetBuffer(var Address:PtrUInt):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the Virtual GPIO buffer from the Mailbox property tags channel</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;" | ||
Line 1,801: | Line 1,759: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3VirtualGPIOSetBuffer(Address:PtrUInt):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set the Virtual GPIO buffer in the Mailbox property tags channel</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;" | ||
Line 1,813: | Line 1,771: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3CursorSetDefault:LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set Cursor Default (Pixels) from the Mailbox property tags channel</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;" | ||
Line 1,825: | Line 1,783: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3CursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set Cursor Info (Pixels) from the Mailbox property tags channel</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;" | ||
Line 1,837: | Line 1,795: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3CursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Set Cursor State (Enable, X, Y) from the Mailbox property tags channel</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;" | ||
|- | |- | ||
− | ! | + | ! Relative |
− | | | + | | X, Y is relative to Display (Virtual) not Framebuffer (Physical). |
|- | |- | ||
|} | |} | ||
</div></div> | </div></div> | ||
<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;">function RPi3DMAGetChannels:LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Get the available DMA Channels from the Mailbox property tags channel</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;" | ||
Line 1,864: | Line 1,819: | ||
<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;">function RPi3VirtualGPIOAllocate:Boolean;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Allocate the Virtual GPIO buffer either from memory or from the firmware</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;" | ||
Line 1,876: | Line 1,831: | ||
<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;">function RPi3VirtualGPIOInputGet(Pin:LongWord):LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 1,887: | Line 1,842: | ||
</div></div> | </div></div> | ||
<br /> | <br /> | ||
− | |||
− | |||
− | |||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3VirtualGPIOOutputSet(Pin,Level:LongWord):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | None documented |
− | + | ||
|- | |- | ||
|} | |} | ||
Line 1,904: | Line 1,855: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function | + | <pre style="border: 0; padding-bottom:0px;">function RPi3VirtualGPIOFunctionSelect(Pin,Mode:LongWord):LongWord;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <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;"> | <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;" | ||
Line 1,916: | Line 1,867: | ||
<br /> | <br /> | ||
− | '''RPi3 | + | '''RPi3 thread functions''' |
<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 RPi3SchedulerInit;</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the scheduler interrupt on the boot CPU</div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
! Note | ! Note | ||
− | | | + | | None documented |
− | + | ||
|- | |- | ||
|} | |} | ||
Line 1,932: | Line 1,882: | ||
<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 RPi3SchedulerStart(CPUID:LongWord);</pre> |
− | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' | + | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the scheduler interrupt on the specified secondary CPU</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 RPi3SecondaryBoot(CPUID:LongWord);</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;"> | <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;" | ||
Line 2,083: | Line 2,045: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
− | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferDeviceCommit(Framebuffer:PFramebufferDevice; Address | + | <pre style="border: 0; padding-bottom:0px;">function RPi3FramebufferDeviceCommit(Framebuffer:PFramebufferDevice; Address:PtrUInt; Size,Flags:LongWord):LongWord;</pre> |
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | <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;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
Line 2,184: | Line 2,146: | ||
<pre style="border: 0; padding-bottom:0px;">procedure RPi3BootBlink; assembler; nostackframe;</pre> | <pre style="border: 0; padding-bottom:0px;">procedure RPi3BootBlink; assembler; nostackframe;</pre> | ||
<div style="font-size: 14px; padding-left: 12px;">'''Description:''' Blink the Activity LED without dependency on any other RTL setup</div> | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Blink the Activity LED without dependency on any other RTL setup</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 RPi3BootConsoleStart;</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 RPi3BootConsoleWrite(const Value:String);</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 RPi3BootConsoleWriteEx(const Value:String; X,Y:LongWord);</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 RPi3BootConsoleGetX:LongWord;</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 RPi3BootConsoleGetY:LongWord;</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;"> | <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;" |
Revision as of 06:18, 14 June 2021
Return to Unit Reference
Description
Ultibo Platform interface unit for Raspberry Pi 3
The RPi3 B has the Activity LED connected to the GPU, access is via a Virtual GPIO (Power LED is only accessible via the GPIO expander driver).
The RPi3 B+ has the Activity LED connected to GPIO Pin 29 (Power LED is only accessible via the GPIO expander driver).
Constants
RPI3_VCIO_*
RPI3_VCIO_ALIAS = BCM2837_VCIO_ALIAS;
|
The VCIO Alias (For ARM Physcial to VC IO translation) |
RPI3_VCBUS_*
RPI3_VCBUS_ALIAS = BCM2837_VCBUS_C_ALIAS;
|
The currently selected VCBUS Alias (For ARM Physcial to VC Bus translation) |
RPI3_SECURE_*
RPI3_SECURE_BOOT = $00000001;
|
If 1 then startup will attempt to switch back to secure world during boot process (Moved to ARMSecureBoot) |
RPI3_SECURE_BOOT_OFFSET = $000000D4;
|
The address of the Secure Boot marker in the ARM boot stub |
RPI3_SECURE_BOOT_MARKER = $58495052;
|
The Secure Boot marker (ASCII "RPIX") |
RPI3_STARTUP_*
RPI3_STARTUP_ADDRESS = $00008000;
|
Address of StartupHandler on Reset (Obtain from linker) |
RPI3_PAGE_TABLE_*
RPI3_PAGE_TABLE_BASE = $00004000;
|
Place the first level Page Table after the interrupt vectors at 0x00001000 and before the code start at 0x00008000 |
RPI3_PAGE_TABLE_SIZE = SIZE_16K;
|
ARM Cortex A7 first level Page Table is exactly 16KB in size (4096 32 bit (4 byte) entries) |
RPI3_VECTOR_TABLE_*
RPI3_VECTOR_TABLE_BASE = $00001000;
|
Place the Interrupt Vector Table at 0x00001000 before the code start at 0x00008000 |
RPI3_VECTOR_TABLE_SIZE = SIZE_64;
|
The Interrupt Vector Table is exactly 64 bytes (16 32 bit (4 byte) entries) |
RPI3_VECTOR_TABLE_COUNT = 8;
|
The Interrupt Vector Table contains 8 entries on an ARMv7 device |
RPI3_CPU_*
RPI3_CPU_COUNT = BCM2837_CPU_COUNT;
|
|
RPI3_CPU_BOOT = CPU_ID_0;
|
|
RPI3_CPU_MASK = CPU_AFFINITY_0 or CPU_AFFINITY_1 or CPU_AFFINITY_2 or CPU_AFFINITY_3;
|
RPI3_IRQ_*, RPI3_FIQ_*
RPI3_IRQ_START = 0;
|
System wide IRQs start at zero |
RPI3_IRQ_ROUTING = CPU_ID_0;
|
Route system wide IRQs to CPU0 |
RPI3_FIQ_ROUTING = CPU_ID_0;
|
Route system wide FIQs to CPU0 |
RPI3_IRQ_LOCAL_START = BCM2837_GPU_IRQ_COUNT + BCM2837_ARM_IRQ_COUNT;
|
Local IRQs start after GPU and ARM IRQs |
RPI3_SWI_*
RPI3_SWI_COUNT = 256;
|
Number of available SWI entries |
RPI3_*_TIMER_*
RPI3_CORE_TIMER_PRESCALER = $06AAAAAB;
|
Divide the Crystal Clock by 19.2 to give a 1MHz Core Timer |
RPI3_CORE_TIMER_FREQUENCY = 1000000;
|
The Core Timer frequency from the prescaler setting above |
RPI3_GENERIC_TIMER_FREQUENCY = 1000000;
|
The ARM Generic Timer frequency from the prescaler setting above |
RPI3_KERNEL_*
RPI3_KERNEL_NAME = 'kernel7.img';
|
|
RPI3_KERNEL_NAME = 'kernel8.img';
|
|
RPI3_KERNEL_CONFIG = 'config.txt';
|
|
RPI3_KERNEL_COMMAND = 'cmdline.txt';
|
RPI3_MAILBOX_*
RPI3_MAILBOX_TIMEOUT = 100;
|
Default timeout to wait for mailbox calls to complete (Milliseconds) |
RPI3_MAILBOX_TIMEOUT_EX = 1000;
|
Extended timeout to wait for mailbox calls to complete (Milliseconds) |
RPI3_LOCAL_MAILBOX_*
RPI3_LOCAL_MAILBOX_TIMEOUT = 100;
|
Default timeout to wait for local mailbox calls to complete (Milliseconds) |
RPI3_FRAMEBUFFER_*
RPI3_FRAMEBUFFER_DESCRIPTION = 'BCM2837 Framebuffer';
|
Type definitions
None defined
Public variables
RPi3 specific Ultibo variables
RPi3Initialized:Boolean;
|
RPi3CNTVOFFLow:LongWord = 0;
|
The low 32 bits of the Virtual Counter Offset register at boot time (CPU0 only) (Set by Startup). Must be initialized to remain in .data or else rewritten to zero with .bss |
RPi3CNTVOFFHigh:LongWord = 0;
|
The high 32 bits of the Virtual Counter Offset register at boot time (CPU0 only) (Set by Startup). Must be initialized to remain in .data or else rewritten to zero with .bss |
Timer variables
TimerRegisters:PBCM2837SystemTimerRegisters;
|
Mailbox variables
Mailbox0Registers:PBCM2837Mailbox0Registers;
|
Mailbox1Registers:PBCM2837Mailbox1Registers;
|
Interrupt variables
InterruptRegisters:PBCM2837InterruptRegisters;
|
InterruptEntries:array[0..(BCM2837_GPU_IRQ_COUNT + BCM2837_ARM_IRQ_COUNT - 1)] of PInterruptEntry;
|
LocalInterruptEntries:array[RPI3_IRQ_LOCAL_START..(BCM2837_IRQ_COUNT - 1),0..(RPI3_CPU_COUNT - 1)] of PInterruptEntry;
|
System call
SystemCallEntries:array[0..RPI3_SWI_COUNT - 1] of TSystemCallEntry;
|
IRQ/FIQ
IRQEnabled:array[0..2] of LongWord;
|
3 groups of IRQs to Enable/Disable (See: TBCM2837InterruptRegisters) |
FIQEnabled:LongWord;
|
The single IRQ number to Enable as FIQ instead (See: TBCM2837InterruptRegisters) |
LocalIRQEnabled:array[0..(RPI3_CPU_COUNT - 1)] of LongWord;
|
1 group of local IRQs to Enable/Disable per CPU (See: TBCM2837ARMLocalRegisters) |
LocalFIQEnabled:array[0..(RPI3_CPU_COUNT - 1)] of LongWord;
|
1 group of local FIQs to Enable/Disable per CPU (See: TBCM2837ARMLocalRegisters) |
Watchdog variables
WatchdogRegisters:PBCM2837PMWatchdogRegisters;
|
ARM local
ARMLocalRegisters:PBCM2837ARMLocalRegisters;
|
Virtual GPIO
VirtualGPIOBuffer:TBCM2837VirtualGPIOBuffer;
|
Function declarations
Initialization functions
procedure RPi3Init;
Note | None documented |
---|
procedure RPi3SecondarySwitch; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3SecondarySecure; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3SecondaryHandler; assembler; nostackframe;
Note | None documented |
---|
RPi3 platform functions
procedure RPi3SMPInit;
Note | None documented |
---|
procedure RPi3BoardInit;
Note | None documented |
---|
procedure RPi3MemoryInit;
Note | None documented |
---|
procedure RPi3ClockInit;
Note | None documented |
---|
procedure RPi3PowerInit;
Note | None documented |
---|
procedure RPi3MailboxInit;
Note | None documented |
---|
procedure RPi3InterruptInit;
Note | None documented |
---|
procedure RPi3PeripheralInit;
Note | None documented |
---|
procedure RPi3FramebufferInit;
Note | None documented |
---|
procedure RPi3PageTableInit;
Note | None documented |
---|
procedure RPi3PowerLEDEnable;
Note | None documented |
---|
procedure RPi3PowerLEDOn;
Note | None documented |
---|
procedure RPi3PowerLEDOff;
Note | None documented |
---|
procedure RPi3ActivityLEDEnable;
Note | None documented |
---|
procedure RPi3ActivityLEDOn;
Note | None documented |
---|
procedure RPi3ActivityLEDOff;
Note | None documented |
---|
function RPi3MailboxReceive(Mailbox,Channel:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits |
---|
procedure RPi3MailboxSend(Mailbox,Channel,Data:LongWord);
Note | Data = first 28 bits, Channel = last 4 bits |
---|
function RPi3MailboxCall(Mailbox,Channel,Data:LongWord; var Response:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3MailboxCallEx(Mailbox,Channel,Data:LongWord; var Response:LongWord; Timeout:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3MailboxPropertyCall(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3MailboxPropertyCallEx(Mailbox,Channel:LongWord; Data:Pointer; var Response:LongWord; Timeout:LongWord):LongWord;
Note | Data = first 28 bits, Channel = last 4 bits
Data pointer must be 16 byte aligned to allow for the 4 bit channel number |
---|
function RPi3RequestExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Note | Non documented |
---|
function RPi3ReleaseExIRQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Note | Non documented |
---|
function RPi3RequestExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Note | Non documented |
---|
function RPi3ReleaseExFIQ(CPUID,Number:LongWord; Handler:TInterruptHandler; HandlerEx:TInterruptExHandler; Parameter:Pointer):LongWord;
Note | Non documented |
---|
function RPi3RegisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;
Note | None documented |
---|
function RPi3DeregisterInterrupt(Number,Mask,Priority,Flags:LongWord; Handler:TSharedInterruptHandler; Parameter:Pointer):LongWord;
Note | None documented |
---|
function RPi3RegisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
Note | Non documented |
---|
function RPi3DeregisterSystemCallEx(CPUID,Number:LongWord; Handler:TSystemCallHandler; HandlerEx:TSystemCallExHandler):LongWord;
Note | None documented |
---|
function RPi3GetInterruptEntry(Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;
Note | None documented |
---|
function RPi3GetLocalInterruptEntry(CPUID,Number,Instance:LongWord; var Interrupt:TInterruptEntry):LongWord;
Note | None documented |
---|
function RPi3GetSystemCallEntry(Number:LongWord):TSystemCallEntry;
Note | None documented |
---|
function RPi3SystemRestart(Delay:LongWord):LongWord;
Note | None documented |
---|
function RPi3SystemShutdown(Delay:LongWord):LongWord;
Note | None documented |
---|
function RPi3SystemGetCommandLine:String;
Note | None documented |
---|
function RPi3CPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord;
Note | None documented |
---|
function RPi3GPUGetState:LongWord;
Note | None documented |
---|
function RPi3GPUGetMemory(var Address:PtrUInt; var Length:UInt64):LongWord;
Note | None documented |
---|
function RPi3BoardGetModel:LongWord;
Note | None documented |
---|
function RPi3BoardGetSerial:Int64;
Note | None documented |
---|
function RPi3BoardGetRevision:LongWord;
Note | None documented |
---|
function RPi3BoardGetMACAddress:String;
Note | None documented |
---|
function RPi3FirmwareGetRevision:LongWord;
Note | None documented |
---|
function RPi3FirmwareGetThrottled:LongWord;
Note | None documented |
---|
function RPi3PowerGetWait(PowerId:LongWord):LongWord;
Note | None documented |
---|
function RPi3PowerGetState(PowerId:LongWord):LongWord;
Note | None documented |
---|
function RPi3PowerSetState(PowerId,State:LongWord; Wait:Boolean):LongWord;
Note | Power Lock not required due to Mailbox Property Call serialization |
---|
function RPi3ClockGetCount:LongWord;
Note | On the Raspberry Pi this comes from the System Timer free running counter which runs at 1MHz and therefore overflows every 4295 seconds |
---|
function RPi3ClockGetTotal:Int64;
Note | On the Raspberry Pi this comes from the System Timer free running counter which runs at 1MHz, the clock interrupt also uses this timer to increment the clock every second and therefore keep time. |
---|
function RPi3ClockGetRate(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockSetRate(ClockId,Rate:LongWord; Turbo:Boolean):LongWord;
Note | None documented |
---|
function RPi3ClockGetState(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockSetState(ClockId,State:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockGetMinRate(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ClockGetMaxRate(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TurboGetState(TurboId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TurboSetState(TurboId,State:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageGetValue(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageSetValue(VoltageId,Value:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageGetMinValue(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3VoltageGetMaxValue(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TemperatureGetCurrent(TemperatureId:LongWord):LongWord;
Note | None documented |
---|
function RPi3TemperatureGetMaximum(TemperatureId:LongWord):LongWord;
Note | None documented |
---|
function RPi3GPUMemoryAllocate(Length,Alignment,Flags:LongWord):THandle;
Note | None documented |
---|
function RPi3GPUMemoryRelease(Handle:THandle):LongWord;
Note | None documented |
---|
function RPi3GPUMemoryLock(Handle:THandle):LongWord;
Note | None documented |
---|
function RPi3GPUMemoryUnlock(Handle:THandle):LongWord;
Note | None documented |
---|
function RPi3GPUExecuteCode(Address:Pointer; R0,R1,R2,R3,R4,R5:LongWord):LongWord;
Note | None documented |
---|
function RPi3DispmanxHandleGet(Resource:THandle):THandle;
Note | None documented |
---|
function RPi3EDIDBlockGet(Block:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferAllocate(Alignment:LongWord; var Address,Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferRelease:LongWord;
Note | None documented |
---|
function RPi3FramebufferSetState(State:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetDimensions(var Width,Height,Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPhysical(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetPhysical(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestPhysical(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetVirtual(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetVirtual(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestVirtual(var Width,Height:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetDepth(var Depth:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetDepth(var Depth:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestDepth(var Depth:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPixelOrder(var Order:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetPixelOrder(var Order:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestPixelOrder(var Order:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetAlphaMode(var Mode:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetAlphaMode(var Mode:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestAlphaMode(var Mode:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPitch:LongWord;
Note | None documented |
---|
function RPi3FramebufferGetOffset(var X,Y:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetOffset(var X,Y:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestOffset(var X,Y:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestOverscan(var Top,Bottom,Left,Right:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetPalette(Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestPalette(Start,Count:LongWord; Buffer:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferTestVsync:LongWord;
Note | None documented |
---|
function RPi3FramebufferSetVsync:LongWord;
Note | None documented |
---|
function RPi3FramebufferSetBacklight(Brightness:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetNumDisplays(var NumDisplays:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetDisplayId(DisplayNum:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferSetDisplayNum(DisplayNum:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferGetDisplaySettings(DisplayNum:LongWord; var DisplaySettings:TDisplaySettings):LongWord;
Note | None documented |
---|
function RPi3FramebufferDisplayIdToName(DisplayId:LongWord):String;
Note | None documented |
---|
function RPi3TouchGetBuffer(var Address:PtrUInt):LongWord;
Note | On current firmware versions calling TouchGetBuffer will allocate a buffer from GPU memory and render subsequent calls to TouchSetBuffer ineffective. After an initial call to TouchSetBuffer calls to TouchGetBuffer will always return the CPU allocated buffer. |
---|
function RPi3TouchSetBuffer(Address:PtrUInt):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOGetBuffer(var Address:PtrUInt):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOSetBuffer(Address:PtrUInt):LongWord;
Note | None documented |
---|
function RPi3CursorSetDefault:LongWord;
Note | None documented |
---|
function RPi3CursorSetInfo(Width,Height,HotspotX,HotspotY:LongWord; Pixels:Pointer; Length:LongWord):LongWord;
Note | None documented |
---|
function RPi3CursorSetState(Enabled:Boolean; X,Y:LongWord; Relative:Boolean):LongWord;
Relative | X, Y is relative to Display (Virtual) not Framebuffer (Physical). |
---|
function RPi3DMAGetChannels:LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOAllocate:Boolean;
Note | None documented |
---|
function RPi3VirtualGPIOInputGet(Pin:LongWord):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOOutputSet(Pin,Level:LongWord):LongWord;
Note | None documented |
---|
function RPi3VirtualGPIOFunctionSelect(Pin,Mode:LongWord):LongWord;
Note | None documented |
---|
RPi3 thread functions
procedure RPi3SchedulerInit;
Note | None documented |
---|
procedure RPi3SchedulerStart(CPUID:LongWord);
Note | None documented |
---|
procedure RPi3SecondaryBoot(CPUID:LongWord);
Note | None documented |
---|
RPi3 SWI functions
function RPi3DispatchSWI(CPUID:LongWord; Thread:TThreadHandle; Request:PSystemCallRequest):TThreadHandle;
Note | Called by ARMv8SoftwareInterruptHandler in PlatformARMv8
A DataMemoryBarrier is executed before and after calling this function |
---|
RPi3 clock functions
procedure RPi3ClockInterrupt(Parameter:Pointer);
Note | This schedules another clock interrupt to occur CLOCK_CYCLES_PER_TICK in the future, then updates ClockTicks and ClockSeconds and checks for timers to trigger. |
---|
procedure RPi3ClockUpdate(Cycles:LongWord; var Last:LongWord);
Cycles | Number of cycles after which the timer interrupt is to be triggered |
---|---|
Note | This refers to native clock cycles as specified by CLOCK_FREQUENCY |
RPi3 scheduler functions
function RPi3SchedulerInterrupt(CPUID:LongWord; Thread:TThreadHandle; Parameter:Pointer):TThreadHandle;
Note | This schedules another scheduler interrupt to occur SCHEDULER_CLOCKS_PER_INTERRUPT in the future, then checks for threads to wakeup or timeout and the next thread to schedule. |
---|
procedure RPi3SchedulerUpdate(Cycles:LongWord; var Last:LongWord);
Cycles | Number of cycles after which the scheduler interrupt is to be triggered |
---|---|
Note | This refers to native clock cycles as specified by RPI3_GENERIC_TIMER_FREQUENCY |
procedure RPi3SchedulerSystemCall(Request:PSystemCallRequest);
Note | This is registered to receive requests for the SYSTEM_CALL_CONTEXT_SWITCH and will perform a context switch from within an SWI |
---|
RPi3 framebuffer functions
function RPi3FramebufferDeviceAllocate(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Note | None documented |
---|
function RPi3FramebufferDeviceAllocateAlt(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Note | None documented |
---|
function RPi3FramebufferDeviceRelease(Framebuffer:PFramebufferDevice):LongWord;
Note | None documented |
---|
function RPi3FramebufferDeviceBlank(Framebuffer:PFramebufferDevice; Blank:Boolean):LongWord;
Note | None documented |
---|
function RPi3FramebufferDeviceCommit(Framebuffer:PFramebufferDevice; Address:PtrUInt; Size,Flags:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferDeviceSetBacklight(Framebuffer:PFramebufferDevice; Brightness:LongWord):LongWord;
Note | None documented |
---|
function RPi3FramebufferDeviceSetProperties(Framebuffer:PFramebufferDevice; Properties:PFramebufferProperties):LongWord;
Note | None documented |
---|
RPi3 helper functions
procedure RPi3Wait; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3LongWait; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3ShortWait; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3SlowBlink; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3FastBlink; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3BootBlink; assembler; nostackframe;
Note | None documented |
---|
procedure RPi3BootConsoleStart;
Note | None documented |
---|
procedure RPi3BootConsoleWrite(const Value:String);
Note | None documented |
---|
procedure RPi3BootConsoleWriteEx(const Value:String; X,Y:LongWord);
Note | None documented |
---|
function RPi3BootConsoleGetX:LongWord;
Note | None documented |
---|
function RPi3BootConsoleGetY:LongWord;
Note | None documented |
---|
function RPi3ConvertPowerIdRequest(PowerId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertPowerStateRequest(PowerState:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertPowerStateResponse(PowerState:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertClockIdRequest(ClockId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertClockStateRequest(ClockState:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertClockStateResponse(ClockState:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertVoltageIdRequest(VoltageId:LongWord):LongWord;
Note | None documented |
---|
function RPi3ConvertTemperatureIdRequest(TemperatureId:LongWord):LongWord;
Note | None documented |
---|
Return to Unit Reference