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
/** @file
 Source code for the board SA configuration Pcd init functions in Pre-Memory init phase.
 
 
  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#include "TigerlakeURvpInit.h"
#include <Pins/GpioPinsVer2Lp.h>
#include <PlatformBoardId.h>
#include <PlatformBoardConfig.h>
 
/**
  MRC configuration init function for PEI pre-memory phase.
 
  @param[in]  BoardId           An unsigned integer represent the board id.
 
  @retval EFI_SUCCESS   The function completed successfully.
**/
EFI_STATUS
SaMiscConfigInit (
  IN UINT16         BoardId
  )
{
  //
  // UserBd
  //
  switch (BoardId) {
    case BoardIdTglUDdr4:
      //
      // Assign UserBd to 5 which is assigned to MrcInputs->BoardType btUser4 for ULT platforms.
      // This is required to skip Memory voltage programming based on GPIO's in MRC
      //
      PcdSet8S (PcdSaMiscUserBd, 5); // MrcBoardType btUser4 for ULT platform
      break;
 
    default:
      // MiscPeiPreMemConfig.UserBd = 0 by default.
      break;
  }
 
  return EFI_SUCCESS;
}
 
/**
  Board Memory Init related configuration init function for PEI pre-memory phase.
 
  @param[in]  BoardId   An unsigned integrer represent the board id.
 
  @retval EFI_SUCCESS   The function completed successfully.
**/
EFI_STATUS
MrcConfigInit (
  IN UINT16 BoardId
  )
{
 
  PcdSet8S (PcdMrcSpdAddressTable0, 0xA0);
  PcdSet8S (PcdMrcSpdAddressTable1, 0xA2);
  PcdSet8S (PcdMrcSpdAddressTable2, 0xA4);
  PcdSet8S (PcdMrcSpdAddressTable3, 0xA6);
 
  return EFI_SUCCESS;
}
 
/**
  Board SA related GPIO configuration init function for PEI pre-memory phase.
 
  @param[in]  BoardId   An unsigned integer represent the board id.
 
  @retval EFI_SUCCESS   The function completed successfully.
**/
EFI_STATUS
SaGpioConfigInit (
  IN UINT16 BoardId
  )
{
  return EFI_SUCCESS;
}
 
/**
  SA Display DDI configuration init function for PEI pre-memory phase.
 
  @param[in]  BoardId       An unsigned integer represent the board id.
 
  @retval     EFI_SUCCESS   The function completed successfully.
**/
EFI_STATUS
SaDisplayConfigInit (
  IN UINT16 BoardId
  )
{
  return EFI_SUCCESS;
}