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 <baseboard/gpio.h>
6 #include <gpio.h>
7 
9 {
10  uint32_t board_ver;
11 
12  /* On boards where board version is populated, ram strap is also populated */
13  if (!google_chromeec_get_board_version(&board_ver))
14  return !gpio_get(GPIO_MEM_CH_SEL);
15 
16  return false;
17 }
int google_chromeec_get_board_version(uint32_t *version)
google_chromeec_get_board_version() - Get the board version
Definition: ec.c:915
int gpio_get(gpio_t gpio)
Definition: gpio.c:166
#define GPIO_MEM_CH_SEL
Definition: gpio.h:30
bool __weak variant_mem_is_half_populated(void)
Get data whether memory channel is half-populated or not.
Definition: memory.c:63
unsigned int uint32_t
Definition: stdint.h:14