Difference between revisions of "Unit ARMGIC"

From Ultibo.org
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
----
 
----
  
'''ARM Generic Interrupt Controller Driver'''
+
'''ARM Generic Interrupt Controller Driver unit'''
  
 
=== Constants ===
 
=== Constants ===
Line 690: Line 690:
 
----
 
----
  
''To be documented''
+
 
 +
'''ARM GIC state'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
 
 +
<code>TGICState = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|Describes the state of a block of interrupts (32 per record)
 +
|-
 +
| <code>Enabled:LongWord;</code>
 +
| style="width: 50%;"|Bit mask of the enabled interrupts
 +
|-
 +
| <code>Available:LongWord;</code>
 +
| Bit mask of the available interrupts
 +
|-
 +
| <code>Permanent:LongWord;</code>
 +
| Bit mask of the permanently enabled interrupts
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''ARM GIC states'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGICStates = ^TGICStates;</code>
 +
 
 +
<code>TGICStates = array[0..31] of TGICState;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 +
'''ARM GIC entries'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGICEntries = ^TGICEntries;</code>
 +
 
 +
<code>TGICEntries = array[0..1023] of PInterruptEntry;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''ARM GIC arrays'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGICArrays = ^TGICArrays;</code>
 +
 
 +
<code>TGICArrays = array[0..7] of PGICEntries;</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
| &nbsp;
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
|}
 +
</div></div>
 +
 
 +
'''ARM GIC device'''
 +
 
 +
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;">
 +
<code>PGICDevice = ^TGICDevice;</code>
 +
 
 +
<code>TGICDevice = record</code>
 +
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 +
{| class="wikitable" style="font-size: 14px; background: white;"
 +
|-
 +
|colspan="2"|''GIC Properties''
 +
|-
 +
| <code>DistAddress:PtrUInt;</code>
 +
| style="width: 50%;"|&nbsp;
 +
|-
 +
| <code>CPUAddress:PtrUInt;</code>
 +
| &nbsp;
 +
|-
 +
| <code>CPUCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>IRQCount:LongWord;</code>
 +
| &nbsp;
 +
|-
 +
| <code>SecureMode:LongBool;</code>
 +
| &nbsp;
 +
|-
 +
| <code>FIQAvailable:LongBool;</code>
 +
| &nbsp;
 +
|-
 +
| <code>GICEnabled:LongBool;</code>
 +
| &nbsp;
 +
|-
 +
|colspan="2"|''Interrupt Properties''
 +
|-
 +
| <code>Interrupts:PGICEntries;</code>
 +
| Array of interrupt entries
 +
|-
 +
| <code>LocalInterrupts:PGICArrays;</code>
 +
| Arrays of local interrupt entries (1 array per CPU)
 +
|-
 +
| <code>SoftwareInterrupts:PGICArrays;</code>
 +
| Arrays of software interrupt entries (1 array per CPU)
 +
|-
 +
|colspan="2"|''State Properties''
 +
|-
 +
| <code>States:PGICStates;</code>
 +
| Array of interrupt states
 +
|-
 +
| <code>LocalStates:PGICStates;</code>
 +
| Array of local interrupt states (1 element per CPU)
 +
|-
 +
| <code>SoftwareStates:PGICStates;</code>
 +
| Array of software interrupt states (1 element per CPU)
 +
|-
 +
|}
 +
</div></div>
 +
<br />
  
 
=== Public variables ===
 
=== Public variables ===

Latest revision as of 05:10, 31 August 2021

Return to Unit Reference


Description


ARM Generic Interrupt Controller Driver unit

Constants



[Expand]
ARM GIC specific constants ARM_GIC_*


[Expand]
ARM GIC distributor registers ARM_GICD_*


[Expand]
ARM GIC distributor control register ARM_GICD_CTLR_*


[Expand]
ARM GIC interrupt controller type register ARM_GICD_TYPER_*


[Expand]
ARM GIC distributor implementer identification register ARM_GICD_IIDR_*


[Expand]
ARM GIC interrupt priority register ARM_GICD_IPRIORITYR_*


[Expand]
ARM GIC interrupt processor targets register ARM_GICD_ITARGETSR_*


[Expand]
ARM GIC interrupt configuration register ARM_GICD_ICFGR_*


[Expand]
ARM GIC non-secure access control register (Group 0 Interrupts) ARM_GICD_NSACR_*


[Expand]
ARM GIC software generated interrupt register ARM_GICD_SGIR_*


[Expand]
ARM GIC SGI clear-pending registers ARM_GICD_CPENDSGIR_*


[Expand]
ARM GIC SGI set-pending registers ARM_GICD_SPENDSGIR_*


[Expand]
ARM GIC CPU registers ARM_GICC_*


[Expand]
ARM GIC CPU interface control register ARM_GICC_CTLR_*


[Expand]
ARM GIC interrupt priority mask register ARM_GICC_PMR_*


[Expand]
ARM GIC binary point register ARM_GICC_BPR_*


[Expand]
ARM GIC interrupt acknowledge register ARM_GICC_IAR_*


[Expand]
ARM GIC end of interrupt register ARM_GICC_EOIR_*


[Expand]
ARM GIC running priority register ARM_GICC_RPR_*


[Expand]
ARM GIC highest priority pending interrupt register ARM_GICC_HPPIR_*


[Expand]
ARM GIC aliased binary point register ARM_GICC_ABPR_*


[Expand]
ARM GIC aliased interrupt acknowledge register ARM_GICC_AIAR_*


[Expand]
ARM GIC aliased end of interrupt register ARM_GICC_AEOIR_*


[Expand]
ARM GIC aliased highest priority pending interrupt register ARM_GICC_AHPPIR_*


[Expand]
ARM GIC CPU interface identification register ARM_GICC_IIDR_*


[Expand]
ARM GIC deactivate interrupt register ARM_GICC_DIR_*


Type definitions



ARM GIC state

[Expand]

TGICState = record

ARM GIC states

[Expand]

PGICStates = ^TGICStates;

TGICStates = array[0..31] of TGICState;

ARM GIC entries

[Expand]

PGICEntries = ^TGICEntries;

TGICEntries = array[0..1023] of PInterruptEntry;

ARM GIC arrays

[Expand]

PGICArrays = ^TGICArrays;

TGICArrays = array[0..7] of PGICEntries;

ARM GIC device

[Expand]

PGICDevice = ^TGICDevice;

TGICDevice = record


Public variables


None defined

Function declarations



ARM GIC functions

[Expand]
function ARMGICCreate(DistAddress,CPUAddress:PtrUInt):PGICDevice;
Description: To be documented


[Expand]
function ARMGICStart(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetEntry(GIC:PGICDevice; CPUID,Number,Flags:LongWord; var Entry:TInterruptEntry; Index:LongWord):LongWord;
Description: To be documented


[Expand]
function ARMGICRegisterEntry(GIC:PGICDevice; const Entry:TInterruptEntry):LongWord;
Description: To be documented


[Expand]
function ARMGICDeregisterEntry(GIC:PGICDevice; const Entry:TInterruptEntry):LongWord;
Description: To be documented


ARM GIC interrupt functions

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


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


[Expand]
function ARMGICDispatchInterrupt(CPUID:LongWord; Thread:TThreadHandle):TThreadHandle;
Description: Process any pending IRQ/FIQ requests


ARM GIC helper functions

[Expand]
function ARMGICIsValid(GIC:PGICDevice; Number:LongWord):Boolean;
Description: To be documented


[Expand]
function ARMGICIsLocal(GIC:PGICDevice; Number:LongWord):Boolean;
Description: To be documented


[Expand]
function ARMGICIsSoftware(GIC:PGICDevice; Number:LongWord):Boolean;
Description: To be documented


[Expand]
function ARMGICIsGlobal(GIC:PGICDevice; Number:LongWord):Boolean;
Description: To be documented


[Expand]
function ARMGICGetIRQCount(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetFIQCount(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetIRQStart(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetIRQRouting(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetFIQRouting(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetIRQLocalCount(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetFIQLocalCount(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetIRQLocalStart(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetIRQSoftwareCount(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetFIQSoftwareCount(GIC:PGICDevice):LongWord;
Description: To be documented


[Expand]
function ARMGICGetIRQSoftwateStart(GIC:PGICDevice):LongWord;
Description: To be documented


Return to Unit Reference