coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ramstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <smbios.h>
4 #include <soc/ramstage.h>
5 #include <variant/gpio.h>
6 
7 /* mainboard silk screen shows DIMM-A and DIMM-B */
8 void smbios_fill_dimm_locator(const struct dimm_info *dimm,
9  struct smbios_type17 *t)
10 {
11  switch (dimm->channel_num) {
12  case 0:
13  t->device_locator = smbios_add_string(t->eos, "DIMM-A");
14  break;
15  case 1:
16  t->device_locator = smbios_add_string(t->eos, "DIMM-B");
17  break;
18  default:
19  t->device_locator = smbios_add_string(t->eos, "UNKNOWN");
20  break;
21  }
22 }
23 
24 static void mainboard_init(void *chip_info)
25 {
26  const struct pad_config *gpio_table;
27  size_t num_gpios;
28 
29  gpio_table = variant_gpio_table(&num_gpios);
30  gpio_configure_pads(gpio_table, num_gpios);
31 }
32 
35 };
int smbios_add_string(u8 *start, const char *str)
Definition: smbios.c:40
static const struct pad_config gpio_table[]
Definition: gpio.h:24
struct chip_operations mainboard_ops
Definition: ramstage.c:11
const struct pad_config *__weak variant_gpio_table(size_t *num)
Definition: gpio.c:406
static void mainboard_init(void *chip_info)
Definition: ramstage.c:24
void smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t)
Definition: ramstage.c:8
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
Definition: gpio.c:307
void(* init)(void *chip_info)
Definition: device.h:25
If this table is filled and put in CBMEM, then these info in CBMEM will be used to generate smbios ty...
Definition: memory_info.h:19
uint8_t channel_num
Definition: memory_info.h:36
u8 device_locator
Definition: smbios.h:869
u8 eos[2]
Definition: smbios.h:884