]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Include/Protocol/HardwareInterrupt.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / EmbeddedPkg / Include / Protocol / HardwareInterrupt.h
index a4825832c4ec476116b8ce9f1b2ef80c31056596..412e99b6d1375cd9d22e67a25d030992f65c6261 100644 (file)
@@ -1,23 +1,17 @@
 /** @file\r
   Abstraction for hardware based interrupt routine\r
-  \r
+\r
   On non IA-32 systems it is common to have a single hardware interrupt vector\r
   and a 2nd layer of software that routes the interrupt handlers based on the\r
-  interrupt source. This protocol enables this routing. The driver implementing \r
-  this protocol is responsible for clearing the pending interrupt in the \r
-  interrupt routing hardware. The HARDWARE_INTERRUPT_HANDLER is responsible \r
+  interrupt source. This protocol enables this routing. The driver implementing\r
+  this protocol is responsible for clearing the pending interrupt in the\r
+  interrupt routing hardware. The HARDWARE_INTERRUPT_HANDLER is responsible\r
   for clearing interrupt sources from individual devices.\r
 \r
 \r
-  Copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\r
-\r
-  All rights reserved. This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
+  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -26,7 +20,6 @@
 \r
 #include <Protocol/DebugSupport.h>\r
 \r
-\r
 //\r
 // Protocol GUID\r
 //\r
 #define EFI_HARDWARE_INTERRUPT_PROTOCOL_GGUID \\r
   { 0x2890B3EA, 0x053D, 0x1643, { 0xAD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } }\r
 \r
-\r
 typedef struct _EFI_HARDWARE_INTERRUPT_PROTOCOL EFI_HARDWARE_INTERRUPT_PROTOCOL;\r
 \r
-\r
 typedef UINTN HARDWARE_INTERRUPT_SOURCE;\r
 \r
-\r
 /**\r
   C Interrupt Handler calledin the interrupt context when Source interrupt is active.\r
 \r
   @param Source         Source of the interrupt. Hardware routing off a specific platform defines\r
                         what source means.\r
   @param SystemContext  Pointer to system register context. Mostly used by debuggers and will\r
-                        update the system context after the return from the interrupt if \r
+                        update the system context after the return from the interrupt if\r
                         modified. Don't change these values unless you know what you are doing\r
 \r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *HARDWARE_INTERRUPT_HANDLER) (\r
+(EFIAPI *HARDWARE_INTERRUPT_HANDLER)(\r
   IN  HARDWARE_INTERRUPT_SOURCE   Source,\r
-  IN  EFI_SYSTEM_CONTEXT          SystemContext     \r
+  IN  EFI_SYSTEM_CONTEXT          SystemContext\r
   );\r
 \r
-\r
 /**\r
   Register Handler for the specified interrupt source.\r
 \r
@@ -73,13 +62,12 @@ VOID
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *HARDWARE_INTERRUPT_REGISTER) (\r
+(EFIAPI *HARDWARE_INTERRUPT_REGISTER)(\r
   IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,\r
   IN HARDWARE_INTERRUPT_SOURCE          Source,\r
   IN HARDWARE_INTERRUPT_HANDLER         Handler\r
   );\r
 \r
-\r
 /**\r
   Enable interrupt source Source.\r
 \r
@@ -92,13 +80,11 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *HARDWARE_INTERRUPT_ENABLE) (\r
+(EFIAPI *HARDWARE_INTERRUPT_ENABLE)(\r
   IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,\r
   IN HARDWARE_INTERRUPT_SOURCE          Source\r
   );\r
 \r
-\r
-\r
 /**\r
   Disable interrupt source Source.\r
 \r
@@ -111,12 +97,11 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *HARDWARE_INTERRUPT_DISABLE) (\r
+(EFIAPI *HARDWARE_INTERRUPT_DISABLE)(\r
   IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,\r
   IN HARDWARE_INTERRUPT_SOURCE          Source\r
   );\r
 \r
-\r
 /**\r
   Return current state of interrupt source Source.\r
 \r
@@ -130,22 +115,38 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *HARDWARE_INTERRUPT_INTERRUPT_STATE) (\r
+(EFIAPI *HARDWARE_INTERRUPT_INTERRUPT_STATE)(\r
   IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,\r
   IN HARDWARE_INTERRUPT_SOURCE          Source,\r
   IN BOOLEAN                            *InterruptState\r
   );\r
 \r
+/**\r
+  Signal to the hardware that the End Of Interrupt state\r
+  has been reached.\r
+\r
+  @param This     Instance pointer for this protocol\r
+  @param Source   Hardware source of the interrupt\r
+\r
+  @retval EFI_SUCCESS       Source interrupt EOI'ed.\r
+  @retval EFI_DEVICE_ERROR  Hardware could not be programmed.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *HARDWARE_INTERRUPT_END_OF_INTERRUPT)(\r
+  IN EFI_HARDWARE_INTERRUPT_PROTOCOL    *This,\r
+  IN HARDWARE_INTERRUPT_SOURCE          Source\r
+  );\r
 \r
 struct _EFI_HARDWARE_INTERRUPT_PROTOCOL {\r
-  HARDWARE_INTERRUPT_REGISTER         RegisterInterruptSource;\r
-  HARDWARE_INTERRUPT_ENABLE           EnableInterruptSource;\r
-  HARDWARE_INTERRUPT_DISABLE          DisableInterruptSource;\r
-  HARDWARE_INTERRUPT_INTERRUPT_STATE  GetInterruptSourceState;\r
+  HARDWARE_INTERRUPT_REGISTER            RegisterInterruptSource;\r
+  HARDWARE_INTERRUPT_ENABLE              EnableInterruptSource;\r
+  HARDWARE_INTERRUPT_DISABLE             DisableInterruptSource;\r
+  HARDWARE_INTERRUPT_INTERRUPT_STATE     GetInterruptSourceState;\r
+  HARDWARE_INTERRUPT_END_OF_INTERRUPT    EndOfInterrupt;\r
 };\r
 \r
-extern EFI_GUID gHardwareInterruptProtocolGuid;\r
+extern EFI_GUID  gHardwareInterruptProtocolGuid;\r
 \r
 #endif\r
-\r
-\r