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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/** @file
  Slot Data Update.
 
  @copyright
  Copyright 2018 - 2021 Intel Corporation. <BR>
 
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#include "SlotDataUpdateDxe.h"
 
UINT8
GetTypeWilsonCitySMTIOU0Setting (
  UINT8  IOU0Data
)
{
  //
  // Change bifurcation of Port1A-1B as xxx8 when QATGpio enabled.
  //
  IOU0Data = IIO_BIFURCATE_xxx8xxx8;
  return IOU0Data;
}
 
UINT8
GetTypeWilsonCitySMTIOU2Setting (
  UINT8  SkuPersonalityType,
  UINT8  IOU2Data
)
{
  return IOU2Data;
}
 
static IIO_BROADWAY_ADDRESS_DATA_ENTRY   SlotTypeWilsonCitySMTBroadwayTable[] = {
    {Iio_Socket0, Iio_Iou2, Bw5_Addr_0 },
    {Iio_Socket1, Iio_Iou1, Bw5_Addr_2},
    {Iio_Socket1, Iio_Iou0, Bw5_Addr_1 },
};
 
 
PLATFORM_SLOT_UPDATE_TABLE  TypeWilsonCitySMTSlotTable =
{
  PLATFORM_SLOT_UPDATE_SIGNATURE,
  PLATFORM_SLOT_UPDATE_VERSION,
 
  SlotTypeWilsonCitySMTBroadwayTable,
  GetTypeWilsonCitySMTIOU0Setting,
  0
};
 
PLATFORM_SLOT_UPDATE_TABLE2  TypeWilsonCitySMTSlotTable2 =
{
  PLATFORM_SLOT_UPDATE_SIGNATURE,
  PLATFORM_SLOT_UPDATE_VERSION,
 
  SlotTypeWilsonCitySMTBroadwayTable,
  GetTypeWilsonCitySMTIOU0Setting,
  0,
  GetTypeWilsonCitySMTIOU2Setting
};
 
/**
  The Driver Entry Point.
 
  The function is the driver Entry point.
 
  @param ImageHandle   A handle for the image that is initializing this driver
  @param SystemTable   A pointer to the EFI system table
 
  @retval EFI_SUCCESS:              Driver initialized successfully
  @retval EFI_LOAD_ERROR:           Failed to Initialize or has been loaded
  @retval EFI_OUT_OF_RESOURCES      Could not allocate needed resources
 
**/
EFI_STATUS
EFIAPI
SlotDataUpdateEntry (
  IN EFI_HANDLE                            ImageHandle,
  IN EFI_SYSTEM_TABLE                      *SystemTable
)
{
  EFI_STATUS                               Status;
  UBA_CONFIG_DATABASE_PROTOCOL             *UbaConfigProtocol = NULL;
 
  DEBUG((DEBUG_INFO, "UBA:SlotDataUpdate-TypeWilsonCitySMT\n"));
  Status = gBS->LocateProtocol (
                  &gUbaConfigDatabaseProtocolGuid,
                  NULL,
                  &UbaConfigProtocol
                  );
  if (EFI_ERROR(Status)) {
    return Status;
  }
 
  Status = UbaConfigProtocol->AddData (
                                     UbaConfigProtocol,
                                     &gPlatformSlotDataDxeGuid,
                                     &TypeWilsonCitySMTSlotTable,
                                     sizeof(TypeWilsonCitySMTSlotTable)
                                     );
  if (EFI_ERROR(Status)) {
    return Status;
  }
 
  Status = UbaConfigProtocol->AddData (
                                     UbaConfigProtocol,
                                     &gPlatformSlotDataDxeGuid,
                                     &TypeWilsonCitySMTSlotTable2,
                                     sizeof(TypeWilsonCitySMTSlotTable2)
                                     );
  if (EFI_ERROR(Status)) {
    return Status;
  }
 
  return Status;
}