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