TianoCore EDK2 master
Loading...
Searching...
No Matches
ArmGicV3Dxe.c File Reference
#include <Library/ArmGicLib.h>
#include "ArmGicDxe.h"

Go to the source code of this file.

Macros

#define ARM_GIC_DEFAULT_PRIORITY   0x80
 

Functions

STATIC EFI_STATUS EFIAPI GicV3EnableInterruptSource (IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
 
STATIC EFI_STATUS EFIAPI GicV3DisableInterruptSource (IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
 
STATIC EFI_STATUS EFIAPI GicV3GetInterruptSourceState (IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, IN BOOLEAN *InterruptState)
 
STATIC EFI_STATUS EFIAPI GicV3EndOfInterrupt (IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
 
STATIC VOID EFIAPI GicV3IrqInterruptHandler (IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_SYSTEM_CONTEXT SystemContext)
 
STATIC EFI_STATUS EFIAPI GicV3GetTriggerType (IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, OUT EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE *TriggerType)
 
STATIC EFI_STATUS EFIAPI GicV3SetTriggerType (IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, IN EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE TriggerType)
 
VOID EFIAPI GicV3ExitBootServicesEvent (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS GicV3DxeInitialize (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

EFI_HARDWARE_INTERRUPT_PROTOCOL gHardwareInterruptV3Protocol
 
EFI_HARDWARE_INTERRUPT2_PROTOCOL gHardwareInterrupt2V3Protocol
 
STATIC UINTN mGicDistributorBase
 
STATIC UINTN mGicRedistributorsBase
 

Detailed Description

Copyright (c) 2011-2023, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file ArmGicV3Dxe.c.

Macro Definition Documentation

◆ ARM_GIC_DEFAULT_PRIORITY

#define ARM_GIC_DEFAULT_PRIORITY   0x80

Definition at line 13 of file ArmGicV3Dxe.c.

Function Documentation

◆ GicV3DisableInterruptSource()

STATIC EFI_STATUS EFIAPI GicV3DisableInterruptSource ( IN EFI_HARDWARE_INTERRUPT_PROTOCOL This,
IN HARDWARE_INTERRUPT_SOURCE  Source 
)

Disable interrupt source Source.

Parameters
ThisInstance pointer for this protocol
SourceHardware source of the interrupt
Return values
EFI_SUCCESSSource interrupt disabled.
EFI_DEVICE_ERRORHardware could not be programmed.

Definition at line 62 of file ArmGicV3Dxe.c.

◆ GicV3DxeInitialize()

EFI_STATUS GicV3DxeInitialize ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Initialize the state information for the CPU Architectural Protocol

Parameters
ImageHandleof the loaded driver
SystemTablePointer to the System Table
Return values
EFI_SUCCESSProtocol registered
EFI_OUT_OF_RESOURCESCannot allocate protocol data structure
EFI_DEVICE_ERRORHardware problems

Definition at line 370 of file ArmGicV3Dxe.c.

◆ GicV3EnableInterruptSource()

STATIC EFI_STATUS EFIAPI GicV3EnableInterruptSource ( IN EFI_HARDWARE_INTERRUPT_PROTOCOL This,
IN HARDWARE_INTERRUPT_SOURCE  Source 
)

Enable interrupt source Source.

Parameters
ThisInstance pointer for this protocol
SourceHardware source of the interrupt
Return values
EFI_SUCCESSSource interrupt enabled.
EFI_DEVICE_ERRORHardware could not be programmed.

Definition at line 34 of file ArmGicV3Dxe.c.

◆ GicV3EndOfInterrupt()

STATIC EFI_STATUS EFIAPI GicV3EndOfInterrupt ( IN EFI_HARDWARE_INTERRUPT_PROTOCOL This,
IN HARDWARE_INTERRUPT_SOURCE  Source 
)

Signal to the hardware that the End Of Interrupt state has been reached.

Parameters
ThisInstance pointer for this protocol
SourceHardware source of the interrupt
Return values
EFI_SUCCESSSource interrupt ended successfully.
EFI_DEVICE_ERRORHardware could not be programmed.

Definition at line 125 of file ArmGicV3Dxe.c.

◆ GicV3ExitBootServicesEvent()

VOID EFIAPI GicV3ExitBootServicesEvent ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Shutdown our hardware

DXE Core will disable interrupts and turn off the timer and disable interrupts after all the event handlers have run.

Parameters
[in]EventThe Event that is being processed
[in]ContextEvent Context

Definition at line 339 of file ArmGicV3Dxe.c.

◆ GicV3GetInterruptSourceState()

STATIC EFI_STATUS EFIAPI GicV3GetInterruptSourceState ( IN EFI_HARDWARE_INTERRUPT_PROTOCOL This,
IN HARDWARE_INTERRUPT_SOURCE  Source,
IN BOOLEAN *  InterruptState 
)

Return current state of interrupt source Source.

Parameters
ThisInstance pointer for this protocol
SourceHardware source of the interrupt
InterruptStateTRUE: source enabled, FALSE: source disabled.
Return values
EFI_SUCCESSInterruptState is valid
EFI_DEVICE_ERRORInterruptState is not valid

Definition at line 91 of file ArmGicV3Dxe.c.

◆ GicV3GetTriggerType()

STATIC EFI_STATUS EFIAPI GicV3GetTriggerType ( IN EFI_HARDWARE_INTERRUPT2_PROTOCOL This,
IN HARDWARE_INTERRUPT_SOURCE  Source,
OUT EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE *  TriggerType 
)

Get interrupt trigger type of an interrupt

Parameters
ThisInstance pointer for this protocol
SourceHardware source of the interrupt.
TriggerTypeReturns interrupt trigger type.
Return values
EFI_SUCCESSSource interrupt supported.
EFI_UNSUPPORTEDSource interrupt is not supported.

Definition at line 203 of file ArmGicV3Dxe.c.

◆ GicV3IrqInterruptHandler()

STATIC VOID EFIAPI GicV3IrqInterruptHandler ( IN EFI_EXCEPTION_TYPE  InterruptType,
IN EFI_SYSTEM_CONTEXT  SystemContext 
)

EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs.

Parameters
InterruptTypeDefines the type of interrupt or exception that occurred on the processor. This parameter is processor architecture specific.
SystemContextA pointer to the processor context when the interrupt occurred on the processor.
Returns
None

Definition at line 154 of file ArmGicV3Dxe.c.

◆ GicV3SetTriggerType()

STATIC EFI_STATUS EFIAPI GicV3SetTriggerType ( IN EFI_HARDWARE_INTERRUPT2_PROTOCOL This,
IN HARDWARE_INTERRUPT_SOURCE  Source,
IN EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE  TriggerType 
)

Set interrupt trigger type of an interrupt

Parameters
ThisInstance pointer for this protocol
SourceHardware source of the interrupt.
TriggerTypeInterrupt trigger type.
Return values
EFI_SUCCESSSource interrupt supported.
EFI_UNSUPPORTEDSource interrupt is not supported.

Definition at line 245 of file ArmGicV3Dxe.c.

Variable Documentation

◆ gHardwareInterrupt2V3Protocol

EFI_HARDWARE_INTERRUPT2_PROTOCOL gHardwareInterrupt2V3Protocol
Initial value:
= {
(HARDWARE_INTERRUPT2_REGISTER)RegisterInterruptSource,
}
STATIC EFI_STATUS EFIAPI GicV3DisableInterruptSource(IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
Definition: ArmGicV3Dxe.c:62
STATIC EFI_STATUS EFIAPI GicV3GetInterruptSourceState(IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, IN BOOLEAN *InterruptState)
Definition: ArmGicV3Dxe.c:91
STATIC EFI_STATUS EFIAPI GicV3EnableInterruptSource(IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
Definition: ArmGicV3Dxe.c:34
STATIC EFI_STATUS EFIAPI GicV3GetTriggerType(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, OUT EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE *TriggerType)
Definition: ArmGicV3Dxe.c:203
STATIC EFI_STATUS EFIAPI GicV3SetTriggerType(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, IN EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE TriggerType)
Definition: ArmGicV3Dxe.c:245
STATIC EFI_STATUS EFIAPI GicV3EndOfInterrupt(IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
Definition: ArmGicV3Dxe.c:125
EFI_STATUS(EFIAPI * HARDWARE_INTERRUPT2_DISABLE)(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
EFI_STATUS(EFIAPI * HARDWARE_INTERRUPT2_REGISTER)(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, IN HARDWARE_INTERRUPT_HANDLER Handler)
EFI_STATUS(EFIAPI * HARDWARE_INTERRUPT2_END_OF_INTERRUPT)(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
EFI_STATUS(EFIAPI * HARDWARE_INTERRUPT2_ENABLE)(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source)
EFI_STATUS(EFIAPI * HARDWARE_INTERRUPT2_INTERRUPT_STATE)(IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, IN HARDWARE_INTERRUPT_SOURCE Source, IN BOOLEAN *InterruptState)

Definition at line 318 of file ArmGicV3Dxe.c.

◆ gHardwareInterruptV3Protocol

EFI_HARDWARE_INTERRUPT_PROTOCOL gHardwareInterruptV3Protocol
Initial value:

Definition at line 182 of file ArmGicV3Dxe.c.

◆ mGicDistributorBase

STATIC UINTN mGicDistributorBase

Definition at line 18 of file ArmGicV3Dxe.c.

◆ mGicRedistributorsBase

STATIC UINTN mGicRedistributorsBase

Definition at line 19 of file ArmGicV3Dxe.c.