coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include "gpio.h"
4 #include <console/console.h>
5 #include <fsp/api.h>
6 #include <fsp/soc_binding.h>
7 #include "bmcinfo.h"
8 
9 void mainboard_config_gpios(void);
10 void mainboard_memory_init_params(FSPM_UPD *mupd);
11 
12 /*
13 * Configure GPIO depend on platform
14 */
16 {
17  size_t num;
18  const struct pad_config *table;
19 
20  printk(BIOS_SPEW, "Board Serial: %s.\n", bmcinfo_serial());
21  /* Configure pads prior to SiliconInit() in case there's any
22  * dependencies during hardware initialization.
23  */
24  table = tagada_gpio_config;
26 
27  if ((!table) || (!num)) {
28  printk(BIOS_ERR, "No valid GPIO table found!\n");
29  return;
30  }
31 
32  printk(BIOS_INFO, "GPIO table: 0x%x, entry num: 0x%x!\n",
33  (uint32_t)table, (uint32_t)num);
34  gpio_configure_pads(table, num);
35 }
36 
37 void mainboard_memory_init_params(FSPM_UPD *mupd)
38 {
39  mupd->FspmConfig.PcdFspDebugPrintErrorLevel =
41 
42  // Enable Rmt and Fast Boot by default, RMT will be run only on first
43  // boot or when dimms change
44  mupd->FspmConfig.PcdMrcRmtSupport = 1;
45  mupd->FspmConfig.PcdFastBoot = 1;
46 }
int bmcinfo_fsp_verbosity_level(void)
Definition: bmcinfo.c:136
char * bmcinfo_serial(void)
Definition: bmcinfo.c:94
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define printk(level,...)
Definition: stdlib.h:16
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
Definition: loglevel.h:142
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition: romstage.c:22
void mainboard_config_gpios(void)
Definition: romstage.c:70
const struct pad_config tagada_gpio_config[]
Definition: gpio.h:12
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
unsigned int uint32_t
Definition: stdint.h:14