coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
3
#include <baseboard/variants.h>
4
#include <
boardid.h
>
5
#include <gpio.h>
6
7
int
variant_memory_sku
(
void
)
8
{
9
/*
10
* The memory straps in the P0 build don't match those generated by
11
* spd_tools, so override the memory ID to 0.
12
*/
13
if
(
board_id
() == 0)
14
return
0;
15
16
/*
17
* Memory configuration board straps
18
* GPIO_MEM_CONFIG_0 GPP_E1
19
* GPIO_MEM_CONFIG_1 GPP_E2
20
* GPIO_MEM_CONFIG_2 GPP_E3
21
*/
22
gpio_t
spd_gpios[] = {
23
GPP_E1
,
24
GPP_E2
,
25
GPP_E3
,
26
};
27
28
return
gpio_base2_value
(spd_gpios,
ARRAY_SIZE
(spd_gpios));
29
}
GPP_E3
#define GPP_E3
Definition:
gpio_soc_defs.h:631
GPP_E2
#define GPP_E2
Definition:
gpio_soc_defs.h:630
GPP_E1
#define GPP_E1
Definition:
gpio_soc_defs.h:629
boardid.h
ARRAY_SIZE
#define ARRAY_SIZE(a)
Definition:
helpers.h:12
board_id
uint32_t board_id(void)
board_id() - Get the board version
Definition:
ec_boardid.c:6
gpio_base2_value
uint32_t gpio_base2_value(const gpio_t gpio[], int num_gpio)
Definition:
gpio.c:30
variant_memory_sku
int __weak variant_memory_sku(void)
Definition:
memory.c:74
gpio_t
Definition:
gpio_base.h:7
src
mainboard
google
brya
variants
nereid
memory.c
Generated by
1.9.1