coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c File Reference
#include <string.h>
#include <baseboard/variants.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
Include dependency graph for romstage.c:

Go to the source code of this file.

Macros

#define BOARD_ID_GLK_RVP1_DDR4   0x5 /* GLK RVP1 - DDR4 */
 
#define BOARD_ID_GLK_RVP2_LP4SD   0x7 /* GLK RVP2 - LP4 Solder Down */
 
#define BOARD_ID_GLK_RVP2_LP4   0x8 /* RVP2 - LP4 Socket */
 

Functions

static void fill_lpddr4_params (FSP_M_CONFIG *cfg)
 
static void fill_ddr4_params (FSP_M_CONFIG *cfg)
 
static void fill_memory_params (FSP_M_CONFIG *cfg)
 
void mainboard_memory_init_params (FSPM_UPD *memupd)
 
void mainboard_save_dimm_info (void)
 

Variables

static const uint8_t swizzling_ch0_ddr4 []
 
static const uint8_t swizzling_ch1_ddr4 []
 
static const uint8_t swizzling_ch2_ddr4 []
 
static const uint8_t swizzling_ch3_ddr4 []
 
static const uint8_t swizzling_ch0_lpddr4 []
 
static const uint8_t swizzling_ch1_lpddr4 []
 
static const uint8_t swizzling_ch2_lpddr4 []
 
static const uint8_t swizzling_ch3_lpddr4 []
 

Macro Definition Documentation

◆ BOARD_ID_GLK_RVP1_DDR4

#define BOARD_ID_GLK_RVP1_DDR4   0x5 /* GLK RVP1 - DDR4 */

Definition at line 7 of file romstage.c.

◆ BOARD_ID_GLK_RVP2_LP4

#define BOARD_ID_GLK_RVP2_LP4   0x8 /* RVP2 - LP4 Socket */

Definition at line 9 of file romstage.c.

◆ BOARD_ID_GLK_RVP2_LP4SD

#define BOARD_ID_GLK_RVP2_LP4SD   0x7 /* GLK RVP2 - LP4 Solder Down */

Definition at line 8 of file romstage.c.

Function Documentation

◆ fill_ddr4_params()

static void fill_ddr4_params ( FSP_M_CONFIG cfg)
static

Definition at line 130 of file romstage.c.

References memcpy(), swizzling_ch0_ddr4, swizzling_ch1_ddr4, swizzling_ch2_ddr4, and swizzling_ch3_ddr4.

Referenced by fill_memory_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_lpddr4_params()

static void fill_lpddr4_params ( FSP_M_CONFIG cfg)
static

Definition at line 65 of file romstage.c.

References memcpy(), swizzling_ch0_lpddr4, swizzling_ch1_lpddr4, swizzling_ch2_lpddr4, and swizzling_ch3_lpddr4.

Referenced by fill_memory_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_memory_params()

static void fill_memory_params ( FSP_M_CONFIG cfg)
static

Definition at line 196 of file romstage.c.

References BOARD_ID_GLK_RVP1_DDR4, BOARD_ID_GLK_RVP2_LP4, BOARD_ID_GLK_RVP2_LP4SD, CONFIG, fill_ddr4_params(), and fill_lpddr4_params().

Referenced by mainboard_memory_init_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mainboard_memory_init_params()

void mainboard_memory_init_params ( FSPM_UPD *  memupd)

Definition at line 216 of file romstage.c.

References fill_memory_params(), and FSP_M_CONFIG.

Here is the call graph for this function:

◆ mainboard_save_dimm_info()

void mainboard_save_dimm_info ( void  )

Definition at line 222 of file romstage.c.

References save_lpddr4_dimm_info(), variant_lpddr4_config(), and variant_memory_sku().

Here is the call graph for this function:

Variable Documentation

◆ swizzling_ch0_ddr4

const uint8_t swizzling_ch0_ddr4[]
static
Initial value:
= {
15, 14, 10, 11, 8, 9, 13, 12, 2, 7, 3, 6, 4, 0, 1, 5,
29, 31, 27, 26, 24, 28, 25, 30, 19, 22, 18, 21, 23, 16, 17, 20,
}

Definition at line 14 of file romstage.c.

Referenced by fill_ddr4_params().

◆ swizzling_ch0_lpddr4

const uint8_t swizzling_ch0_lpddr4[]
static
Initial value:
= {
10, 8, 12, 11, 9, 13, 14, 15, 1, 3, 2, 0, 5, 4, 6, 7,
30, 26, 24, 25, 28, 29, 31, 27, 20, 21, 22, 16, 23, 17, 18, 19,
}

Definition at line 41 of file romstage.c.

Referenced by fill_lpddr4_params().

◆ swizzling_ch1_ddr4

const uint8_t swizzling_ch1_ddr4[]
static
Initial value:
= {
1, 0, 4, 5, 7, 2, 6, 3, 24, 25, 28, 30, 26, 27, 31, 29,
21, 20, 17, 16, 23, 22, 19, 18, 8, 12, 11, 15, 10, 9, 13, 14,
}

Definition at line 20 of file romstage.c.

Referenced by fill_ddr4_params().

◆ swizzling_ch1_lpddr4

const uint8_t swizzling_ch1_lpddr4[]
static
Initial value:
= {
0, 6, 7, 5, 3, 2, 1, 4, 12, 15, 13, 8, 9, 10, 11, 14,
17, 18, 19, 16, 23, 20, 21, 22, 30, 31, 25, 27, 26, 29, 28, 24,
}

Definition at line 47 of file romstage.c.

Referenced by fill_lpddr4_params().

◆ swizzling_ch2_ddr4

const uint8_t swizzling_ch2_ddr4[]
static
Initial value:
= {
14, 12, 9, 13, 10, 15, 11, 8, 1, 3, 7, 5, 2, 6, 0, 4,
27, 24, 29, 28, 30, 26, 31, 25, 19, 20, 18, 22, 16, 21, 23, 17,
}

Definition at line 26 of file romstage.c.

Referenced by fill_ddr4_params().

◆ swizzling_ch2_lpddr4

const uint8_t swizzling_ch2_lpddr4[]
static
Initial value:
= {
15, 8, 11, 10, 14, 12, 13, 9, 5, 1, 0, 6, 2, 3, 7, 4,
31, 25, 24, 27, 30, 29, 28, 26, 21, 18, 20, 23, 16, 17, 22, 19,
}

Definition at line 53 of file romstage.c.

Referenced by fill_lpddr4_params().

◆ swizzling_ch3_ddr4

const uint8_t swizzling_ch3_ddr4[]
static
Initial value:
= {
12, 8, 13, 9, 15, 11, 14, 10, 0, 5, 1, 4, 7, 2, 6, 3,
20, 16, 21, 17, 19, 18, 22, 23, 29, 24, 28, 26, 25, 30, 31, 27
}

Definition at line 32 of file romstage.c.

Referenced by fill_ddr4_params().

◆ swizzling_ch3_lpddr4

const uint8_t swizzling_ch3_lpddr4[]
static
Initial value:
= {
15, 9, 8, 10, 13, 14, 12, 11, 7, 6, 5, 0, 4, 2, 1, 3,
20, 21, 23, 22, 19, 17, 18, 16, 24, 27, 26, 30, 25, 31, 28, 29
}

Definition at line 59 of file romstage.c.

Referenced by fill_lpddr4_params().