#include <Library/UefiLib.h>\r
#include <Library/ArmGenericTimerCounterLib.h>\r
\r
+#include <Protocol/HardwareInterrupt2.h>\r
#include <Protocol/WatchdogTimer.h>\r
-#include <Protocol/HardwareInterrupt.h>\r
\r
#include "GenericWatchdog.h"\r
\r
It is therefore stored here. 0 means the timer is not running. */\r
UINT64 mNumTimerTicks = 0;\r
\r
-EFI_HARDWARE_INTERRUPT_PROTOCOL *mInterruptProtocol;\r
+EFI_HARDWARE_INTERRUPT2_PROTOCOL *mInterruptProtocol;\r
\r
EFI_STATUS\r
WatchdogWriteOffsetRegister (\r
if (!EFI_ERROR (Status)) {\r
// Install interrupt handler\r
Status = gBS->LocateProtocol (\r
- &gHardwareInterruptProtocolGuid,\r
+ &gHardwareInterrupt2ProtocolGuid,\r
NULL,\r
(VOID **)&mInterruptProtocol\r
);\r
WatchdogInterruptHandler\r
);\r
if (!EFI_ERROR (Status)) {\r
- // Install the Timer Architectural Protocol onto a new handle\r
- Handle = NULL;\r
- Status = gBS->InstallMultipleProtocolInterfaces (\r
- &Handle,\r
- &gEfiWatchdogTimerArchProtocolGuid,\r
- &gWatchdogTimer,\r
- NULL\r
- );\r
+ Status = mInterruptProtocol->SetTriggerType (\r
+ mInterruptProtocol,\r
+ FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum),\r
+ EFI_HARDWARE_INTERRUPT2_TRIGGER_EDGE_RISING\r
+ );\r
+ if (!EFI_ERROR (Status)) {\r
+ // Install the Timer Architectural Protocol onto a new handle\r
+ Handle = NULL;\r
+ Status = gBS->InstallMultipleProtocolInterfaces (\r
+ &Handle,\r
+ &gEfiWatchdogTimerArchProtocolGuid,\r
+ &gWatchdogTimer,\r
+ NULL\r
+ );\r
+ }\r
}\r
}\r
}\r