3 #include <baseboard/variants.h>
4 #include <soc/meminit.h>
5 #include <soc/romstage.h>
7 #define BOARD_ID_GLK_RVP1_DDR4 0x5
8 #define BOARD_ID_GLK_RVP2_LP4SD 0x7
9 #define BOARD_ID_GLK_RVP2_LP4 0x8
15 15, 14, 10, 11, 8, 9, 13, 12, 2, 7, 3, 6, 4, 0, 1, 5,
16 29, 31, 27, 26, 24, 28, 25, 30, 19, 22, 18, 21, 23, 16, 17, 20,
21 1, 0, 4, 5, 7, 2, 6, 3, 24, 25, 28, 30, 26, 27, 31, 29,
22 21, 20, 17, 16, 23, 22, 19, 18, 8, 12, 11, 15, 10, 9, 13, 14,
27 14, 12, 9, 13, 10, 15, 11, 8, 1, 3, 7, 5, 2, 6, 0, 4,
28 27, 24, 29, 28, 30, 26, 31, 25, 19, 20, 18, 22, 16, 21, 23, 17,
33 12, 8, 13, 9, 15, 11, 14, 10, 0, 5, 1, 4, 7, 2, 6, 3,
34 20, 16, 21, 17, 19, 18, 22, 23, 29, 24, 28, 26, 25, 30, 31, 27
42 10, 8, 12, 11, 9, 13, 14, 15, 1, 3, 2, 0, 5, 4, 6, 7,
43 30, 26, 24, 25, 28, 29, 31, 27, 20, 21, 22, 16, 23, 17, 18, 19,
48 0, 6, 7, 5, 3, 2, 1, 4, 12, 15, 13, 8, 9, 10, 11, 14,
49 17, 18, 19, 16, 23, 20, 21, 22, 30, 31, 25, 27, 26, 29, 28, 24,
54 15, 8, 11, 10, 14, 12, 13, 9, 5, 1, 0, 6, 2, 3, 7, 4,
55 31, 25, 24, 27, 30, 29, 28, 26, 21, 18, 20, 23, 16, 17, 22, 19,
60 15, 9, 8, 10, 13, 14, 12, 11, 7, 6, 5, 0, 4, 2, 1, 3,
61 20, 21, 23, 22, 19, 17, 18, 16, 24, 27, 26, 30, 25, 31, 28, 29
69 cfg->DDR3LPageSize = 0;
71 cfg->ScramblerSupport = 1;
72 cfg->ChannelHashMask = 0x36;
73 cfg->SliceHashMask = 0x9;
74 cfg->InterleavedMode = 2;
75 cfg->ChannelsSlicesEnable = 0;
76 cfg->MinRefRate2xEnable = 0;
77 cfg->DualRankSupportEnable = 0;
78 cfg->DisableFastBoot = 0;
81 cfg->RmtMarginCheckScaleHighThreshold = 0;
82 cfg->MemorySizeLimit = 0;
83 cfg->LowMemoryMaxValue = 0;
84 cfg->HighMemoryMaxValue = 0;
86 cfg->DIMM0SPDAddress = 0x00;
87 cfg->DIMM1SPDAddress = 0x00;
88 cfg->Ch0_RankEnable = 0x1;
89 cfg->Ch0_DeviceWidth = 0x1;
90 cfg->Ch0_DramDensity = 0x2;
91 cfg->Ch0_Option = 0x3;
92 cfg->Ch0_TristateClk1 = 0;
94 cfg->Ch0_OdtLevels = 0;
95 cfg->Ch1_RankEnable = 0x1;
96 cfg->Ch1_DeviceWidth = 0x1;
97 cfg->Ch1_DramDensity = 0x2;
98 cfg->Ch1_Option = 0x3;
99 cfg->Ch1_TristateClk1 = 0;
101 cfg->Ch1_OdtLevels = 0;
102 cfg->Ch2_RankEnable = 0x1;
103 cfg->Ch2_DeviceWidth = 0x1;
104 cfg->Ch2_DramDensity = 0x2;
105 cfg->Ch2_Option = 0x3;
106 cfg->Ch2_TristateClk1 = 0;
108 cfg->Ch2_OdtLevels = 0;
109 cfg->Ch3_RankEnable = 0x1;
110 cfg->Ch3_DeviceWidth = 0x1;
111 cfg->Ch3_DramDensity = 0x2;
112 cfg->Ch3_Option = 0x3;
113 cfg->Ch3_TristateClk1 = 0;
115 cfg->Ch3_OdtLevels = 0;
134 cfg->DDR3LPageSize = 1;
136 cfg->ScramblerSupport = 0;
137 cfg->ChannelHashMask = 0x36;
138 cfg->SliceHashMask = 0x9;
139 cfg->InterleavedMode = 0;
140 cfg->ChannelsSlicesEnable = 0;
141 cfg->MinRefRate2xEnable = 0;
142 cfg->DualRankSupportEnable = 1;
143 cfg->DisableFastBoot = 0;
145 cfg->RmtCheckRun = 0;
146 cfg->RmtMarginCheckScaleHighThreshold = 0;
147 cfg->MemorySizeLimit = 0;
148 cfg->LowMemoryMaxValue = 0;
149 cfg->HighMemoryMaxValue = 0;
151 cfg->DIMM0SPDAddress = 0xA0;
152 cfg->DIMM1SPDAddress = 0xA4;
153 cfg->Ch0_RankEnable = 0x3;
154 cfg->Ch0_DeviceWidth = 0x1;
155 cfg->Ch0_DramDensity = 0x0;
156 cfg->Ch0_Option = 0x3;
157 cfg->Ch0_TristateClk1 = 0;
159 cfg->Ch0_OdtLevels = 0;
160 cfg->Ch1_RankEnable = 0x3;
161 cfg->Ch1_DeviceWidth = 0x1;
162 cfg->Ch1_DramDensity = 0x2;
163 cfg->Ch1_Option = 0x3;
164 cfg->Ch1_TristateClk1 = 0;
166 cfg->Ch1_OdtLevels = 0;
167 cfg->Ch2_RankEnable = 0x0;
168 cfg->Ch2_DeviceWidth = 0x1;
169 cfg->Ch2_DramDensity = 0x2;
170 cfg->Ch2_Option = 0x3;
171 cfg->Ch2_TristateClk1 = 0;
173 cfg->Ch2_OdtLevels = 0;
174 cfg->Ch3_RankEnable = 0x0;
175 cfg->Ch3_DeviceWidth = 0x1;
176 cfg->Ch3_DramDensity = 0x2;
177 cfg->Ch3_Option = 0x3;
178 cfg->Ch3_TristateClk1 = 0;
180 cfg->Ch3_OdtLevels = 0;
void save_lpddr4_dimm_info(const struct lpddr4_cfg *lpcfg, size_t mem_sku)
void * memcpy(void *dest, const void *src, size_t n)
__weak void mainboard_save_dimm_info(struct romstage_params *params)
const struct lpddr4_cfg * variant_lpddr4_config(void)
void mainboard_memory_init_params(FSPM_UPD *mupd)
int __weak variant_memory_sku(void)
static void fill_memory_params(FSP_M_CONFIG *cfg)
static const uint8_t swizzling_ch3_lpddr4[]
#define BOARD_ID_GLK_RVP1_DDR4
static void fill_ddr4_params(FSP_M_CONFIG *cfg)
static const uint8_t swizzling_ch3_ddr4[]
static const uint8_t swizzling_ch2_ddr4[]
static const uint8_t swizzling_ch1_lpddr4[]
#define BOARD_ID_GLK_RVP2_LP4SD
static const uint8_t swizzling_ch0_ddr4[]
static const uint8_t swizzling_ch1_ddr4[]
static const uint8_t swizzling_ch0_lpddr4[]
#define BOARD_ID_GLK_RVP2_LP4
static const uint8_t swizzling_ch2_lpddr4[]
static void fill_lpddr4_params(FSP_M_CONFIG *cfg)