X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FSmmGpiDispatch.h;h=b9df94dbfcb2cfa15afb7e9f2640e759486f8f0a;hp=70d9ef641c45d31d0fa3c424797daeeb6209b769;hb=b530f741ba88b5cc6fd81e4eccc515f54155fbf5;hpb=69686d5669e0bc621ded618becf1529ce93ff1fd diff --git a/IntelFrameworkPkg/Include/Protocol/SmmGpiDispatch.h b/IntelFrameworkPkg/Include/Protocol/SmmGpiDispatch.h index 70d9ef641c..b9df94dbfc 100644 --- a/IntelFrameworkPkg/Include/Protocol/SmmGpiDispatch.h +++ b/IntelFrameworkPkg/Include/Protocol/SmmGpiDispatch.h @@ -1,10 +1,12 @@ /** @file - This file declares Smm Gpi Smi Child Protocol - The EFI_SMM_GPI_DISPATCH_PROTOCOL provides the ability to install child handlers for the - given event types. Several inputs can be enabled. This purpose of this interface is to generate an + This file declares Smm Gpi Smi Child Protocol. + + The EFI_SMM_GPI_DISPATCH_PROTOCOL is defined in Framework of EFI SMM Core Interface Spec + Version 0.9. It provides the ability to install child handlers for the given event types. + Several inputs can be enabled. This purpose of this interface is to generate an SMI in response to any of these inputs having a true value provided. - Copyright (c) 2007, Intel Corporation + Copyright (c) 2007 - 2009, Intel Corporation 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 @@ -13,16 +15,10 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - Module Name: SmmGpiDispatch.h - - @par Revision Reference: - This Protocol is defined in Framework of EFI SMM Core Interface Spec - Version 0.9. - **/ -#ifndef _EFI_SMM_GPI_DISPATCH_H_ -#define _EFI_SMM_GPI_DISPATCH_H_ +#ifndef _SMM_GPI_DISPATCH_H_ +#define _SMM_GPI_DISPATCH_H_ #include @@ -39,6 +35,7 @@ typedef struct _EFI_SMM_GPI_DISPATCH_PROTOCOL EFI_SMM_GPI_DISPATCH_PROTOCOL; // // Related Definitions // + // // GpiMask is a bit mask of 32 possible general purpose inputs that can generate a // a SMI. Bit 0 corresponds to logical GPI[0], 1 corresponds to logical GPI[1], etc. @@ -54,6 +51,7 @@ typedef struct { // // Member functions // + /** Dispatch function for a GPI SMI handler. @@ -61,9 +59,6 @@ typedef struct { @param DispatchContext Pointer to the dispatch function's context. The DispatchContext fields are filled in by the dispatching driver prior to invoking this dispatch function. - - @return None - **/ typedef VOID @@ -75,16 +70,15 @@ VOID /** Register a child SMI source dispatch function with a parent SMM driver - @param This Protocol instance pointer. - @param DispatchFunction Pointer to dispatch function to be invoked for - this SMI source + @param This Pointer to the EFI_SMM_GPI_DISPATCH_PROTOCOL instance. + @param DispatchFunction Function to install. @param DispatchContext Pointer to the dispatch function's context. The caller fills this context in before calling the register function to indicate to the register function the GPI(s) for which the dispatch function should be invoked. - @param DispatchHandle Handle of dispatch function, for when interfacing - with the parent Sx state SMM driver. + @param DispatchHandle Handle generated by the dispatcher to track the + function instance. @retval EFI_SUCCESS The dispatch function has been successfully registered and the SMI source has been enabled. @@ -98,57 +92,46 @@ VOID typedef EFI_STATUS (EFIAPI *EFI_SMM_GPI_REGISTER)( - IN EFI_SMM_GPI_DISPATCH_PROTOCOL *This, - IN EFI_SMM_GPI_DISPATCH DispatchFunction, - IN EFI_SMM_GPI_DISPATCH_CONTEXT *DispatchContext, - OUT EFI_HANDLE *DispatchHandle + IN EFI_SMM_GPI_DISPATCH_PROTOCOL *This, + IN EFI_SMM_GPI_DISPATCH DispatchFunction, + IN EFI_SMM_GPI_DISPATCH_CONTEXT *DispatchContext, + OUT EFI_HANDLE *DispatchHandle ); /** - Unregister a child SMI source dispatch function with a parent SMM driver + Unregisters a General Purpose Input (GPI) service. - @param This Protocol instance pointer. - @param DispatchHandle Handle of dispatch function to deregister. + @param This Pointer to the EFI_SMM_GPI_DISPATCH_PROTOCOL instance. + @param DispatchHandle Handle of the service to remove. @retval EFI_SUCCESS The dispatch function has been successfully unregistered and the SMI source has been disabled if there are no other registered child dispatch functions for this SMI source. - @retval EFI_INVALID_PARAMETER Handle is invalid. - @retval other TBD + @retval EFI_INVALID_PARAMETER DispatchHandle is invalid. **/ typedef EFI_STATUS (EFIAPI *EFI_SMM_GPI_UNREGISTER)( - IN EFI_SMM_GPI_DISPATCH_PROTOCOL *This, - IN EFI_HANDLE DispatchHandle + IN EFI_SMM_GPI_DISPATCH_PROTOCOL *This, + IN EFI_HANDLE DispatchHandle ); // // Interface structure for the SMM GPI SMI Dispatch Protocol // -/** - @par Protocol Description: - Provides the parent dispatch service for the General Purpose Input - (GPI) SMI source generator. - - @param Register - Installs a child service to be dispatched by this protocol. - - @param UnRegister - Removes a child service dispatched by this protocol. - - @param NumSupportedGpis - Denotes the maximum value of inputs that can have handlers attached. - -**/ struct _EFI_SMM_GPI_DISPATCH_PROTOCOL { EFI_SMM_GPI_REGISTER Register; EFI_SMM_GPI_UNREGISTER UnRegister; + + // + // Denotes the maximum value of inputs that can have handlers attached. + // UINTN NumSupportedGpis; }; extern EFI_GUID gEfiSmmGpiDispatchProtocolGuid; #endif +