2014-07-04 16:36:42 +02:00
|
|
|
/** @file
|
|
|
|
*
|
2021-06-07 15:38:18 +02:00
|
|
|
* Copyright (c) 2013-2023, ARM Limited. All rights reserved.
|
2014-07-04 16:36:42 +02:00
|
|
|
*
|
2019-04-04 01:03:18 +02:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
2014-07-04 16:36:42 +02:00
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
|
|
|
#include <Library/ArmGicLib.h>
|
2021-06-07 15:38:18 +02:00
|
|
|
#include <Library/DebugLib.h>
|
2014-07-04 16:36:42 +02:00
|
|
|
#include <Library/IoLib.h>
|
|
|
|
|
|
|
|
UINTN
|
|
|
|
EFIAPI
|
|
|
|
ArmGicV2AcknowledgeInterrupt (
|
|
|
|
IN UINTN GicInterruptInterfaceBase
|
|
|
|
)
|
|
|
|
{
|
|
|
|
// Read the Interrupt Acknowledge Register
|
|
|
|
return MmioRead32 (GicInterruptInterfaceBase + ARM_GIC_ICCIAR);
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID
|
|
|
|
EFIAPI
|
|
|
|
ArmGicV2EndOfInterrupt (
|
|
|
|
IN UINTN GicInterruptInterfaceBase,
|
|
|
|
IN UINTN Source
|
|
|
|
)
|
|
|
|
{
|
2021-06-07 15:38:18 +02:00
|
|
|
ASSERT (Source <= MAX_UINT32);
|
|
|
|
MmioWrite32 (GicInterruptInterfaceBase + ARM_GIC_ICCEIOR, (UINT32)Source);
|
2014-07-04 16:36:42 +02:00
|
|
|
}
|