hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/** @file
  Pch Early update.
 
  @copyright
  Copyright 2014 - 2021 Intel Corporation. <BR>
 
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#include "PeiBoardInit.h"
 
#include <Library/UbaPchEarlyUpdateLib.h>
 
#include <PchAccess.h>
#include <GpioPinsSklH.h>
#include <Library/GpioLib.h>
#include <Ppi/DynamicSiLibraryPpi.h>
 
EFI_STATUS
TypeCooperCityRPPchLanConfig (
  IN SYSTEM_CONFIGURATION         *SystemConfig
)
{
  DYNAMIC_SI_LIBARY_PPI  *DynamicSiLibraryPpi = NULL;
  EFI_STATUS              Status;
 
  Status = PeiServicesLocatePpi (&gDynamicSiLibraryPpiGuid, 0, NULL, &DynamicSiLibraryPpi);
  if (EFI_ERROR (Status)) {
    ASSERT_EFI_ERROR (Status);
    return Status;
  }
 
  DynamicSiLibraryPpi->PchDisableGbe ();
 
  return EFI_SUCCESS;
}
 
EFI_STATUS
TypeCooperCityRPOemInitLateHook (
  IN SYSTEM_CONFIGURATION         *SystemConfig
)
{
  return EFI_SUCCESS;
}
 
 
PLATFORM_PCH_EARLY_UPDATE_TABLE  TypeCooperCityRPPchEarlyUpdateTable =
{
  PLATFORM_PCH_EARLY_UPDATE_SIGNATURE,
  PLATFORM_PCH_EARLY_UPDATE_VERSION,
  TypeCooperCityRPPchLanConfig,
  TypeCooperCityRPOemInitLateHook
};
 
 
/**
  Entry point function for the PEIM
 
  @param FileHandle      Handle of the file being invoked.
  @param PeiServices     Describes the list of possible PEI Services.
 
  @return EFI_SUCCESS    If we installed our PPI
 
**/
EFI_STATUS
EFIAPI
TypeCooperCityRPPchEarlyUpdate(
  IN UBA_CONFIG_DATABASE_PPI    *UbaConfigPpi
  )
{
  EFI_STATUS                            Status;
 
  Status = UbaConfigPpi->AddData (
                               UbaConfigPpi,
                               &gPlatformPchEarlyConfigDataGuid,
                               &TypeCooperCityRPPchEarlyUpdateTable,
                               sizeof(TypeCooperCityRPPchEarlyUpdateTable)
                               );
 
  return Status;
}