hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/** @file
 
Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
 
**/
 
#ifndef _PCH_RESET_COMMON_LIB_H_
#define _PCH_RESET_COMMON_LIB_H_
#include <Uefi/UefiSpec.h>
#include <Protocol/PchReset.h>
///
/// Private data structure definitions for the driver
///
#define PCH_RESET_SIGNATURE SIGNATURE_32 ('I', 'E', 'R', 'S')
 
typedef struct {
  UINT32              Signature;
  EFI_HANDLE          Handle;
  union {
    PCH_RESET_PPI       PchResetPpi;
    PCH_RESET_PROTOCOL  PchResetProtocol;
  }PchResetInterface;
  UINT32              PchPwrmBase;
  UINT16              PchAcpiBase;
  UINTN               PchPmcBase;
} PCH_RESET_INSTANCE;
 
//
// Function prototypes used by the Pch Reset ppi/protocol.
//
/**
  Initialize an Pch Reset ppi/protocol instance.
 
  @param[in] PchResetInstance     Pointer to PchResetInstance to initialize
 
  @retval EFI_SUCCESS             The protocol instance was properly initialized
  @exception EFI_UNSUPPORTED      The PCH is not supported by this module
**/
EFI_STATUS
PchResetConstructor (
  PCH_RESET_INSTANCE          *PchResetInstance
  );
 
/**
  Execute Pch Reset from the host controller.
  @param[in] PchResetInstance     Pointer to PchResetInstance to initialize
  @param[in] PchResetType         Pch Reset Types which includes ColdReset, WarmReset, ShutdownReset,
                                  PowerCycleReset, GlobalReset, GlobalResetWithEc
 
  @retval EFI_SUCCESS             Successfully completed.
  @retval EFI_INVALID_PARAMETER   If ResetType is invalid.
**/
EFI_STATUS
PchReset (
  IN PCH_RESET_INSTANCE *PchResetInstance,
  IN PCH_RESET_TYPE     PchResetType
  );
#endif