1 /** 2 **/ 3 /** 4 5 Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved 6 7 This program and the accompanying materials are licensed and made available under 8 the terms and conditions of the BSD License that accompanies this distribution. 9 The full text of the license may be found at 10 http://opensource.org/licenses/bsd-license.php. 11 12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 15 16 17 @file 18 PchReset.h 19 20 @brief 21 PCH Reset Protocol 22 23 **/ 24 #ifndef _PCH_RESET_H_ 25 #define _PCH_RESET_H_ 26 27 28 // 29 #define PCH_RESET_PROTOCOL_GUID \ 30 { \ 31 0xdb63592c, 0xb8cc, 0x44c8, 0x91, 0x8c, 0x51, 0xf5, 0x34, 0x59, 0x8a, 0x5a \ 32 } 33 #define PCH_RESET_CALLBACK_PROTOCOL_GUID \ 34 { \ 35 0x3a3300ab, 0xc929, 0x487d, 0xab, 0x34, 0x15, 0x9b, 0xc1, 0x35, 0x62, 0xc0 \ 36 } 37 extern EFI_GUID gPchResetProtocolGuid; 38 extern EFI_GUID gPchResetCallbackProtocolGuid; 39 40 /// 41 /// Forward reference for ANSI C compatibility 42 /// 43 typedef struct _PCH_RESET_PROTOCOL PCH_RESET_PROTOCOL; 44 45 typedef struct _PCH_RESET_CALLBACK_PROTOCOL PCH_RESET_CALLBACK_PROTOCOL; 46 47 /// 48 /// Related Definitions 49 /// 50 /// 51 /// PCH Reset Types 52 /// 53 typedef enum { 54 ColdReset, 55 WarmReset, 56 ShutdownReset, 57 PowerCycleReset, 58 GlobalReset, 59 GlobalResetWithEc 60 } PCH_RESET_TYPE; 61 62 /// 63 /// Member functions 64 /// 65 typedef 66 EFI_STATUS 67 (EFIAPI *PCH_RESET) ( 68 IN PCH_RESET_PROTOCOL * This, 69 IN PCH_RESET_TYPE PchResetType 70 ) 71 /** 72 73 @brief 74 Execute Pch Reset from the host controller. 75 76 @param[in] This Pointer to the PCH_RESET_PROTOCOL instance. 77 @param[in] PchResetType Pch Reset Types which includes ColdReset, WarmReset, ShutdownReset, 78 PowerCycleReset, GlobalReset, GlobalResetWithEc 79 80 @retval EFI_SUCCESS Successfully completed. 81 @retval EFI_INVALID_PARAMETER If ResetType is invalid. 82 83 **/ 84 ; 85 86 typedef 87 EFI_STATUS 88 (EFIAPI *PCH_RESET_CALLBACK) ( 89 IN PCH_RESET_TYPE PchResetType 90 ) 91 /** 92 93 @brief 94 Execute call back function for Pch Reset. 95 96 @param[in] PchResetType Pch Reset Types which includes PowerCycle, Globalreset. 97 98 @retval EFI_SUCCESS The callback function has been done successfully 99 @retval EFI_NOT_FOUND Failed to find Pch Reset Callback protocol. Or, none of 100 callback protocol is installed. 101 @retval Others Do not do any reset from PCH 102 103 **/ 104 ; 105 106 /// 107 /// Interface structure for the Pch Reset Protocol 108 /// 109 struct _PCH_RESET_PROTOCOL { 110 PCH_RESET Reset; 111 }; 112 113 /// 114 /// PCH_RESET_CALLBACK_PROTOCOL Structure Definition 115 /// 116 struct _PCH_RESET_CALLBACK_PROTOCOL { 117 PCH_RESET_CALLBACK ResetCallback; 118 }; 119 120 #endif 121