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
*/
15
void
mainboard_config_gpios
(
void
)
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
;
25
num =
ARRAY_SIZE
(
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 =
40
bmcinfo_fsp_verbosity_level
();
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
}
bmcinfo_fsp_verbosity_level
int bmcinfo_fsp_verbosity_level(void)
Definition:
bmcinfo.c:136
bmcinfo_serial
char * bmcinfo_serial(void)
Definition:
bmcinfo.c:94
bmcinfo.h
ARRAY_SIZE
#define ARRAY_SIZE(a)
Definition:
helpers.h:12
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
BIOS_INFO
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition:
loglevel.h:113
BIOS_ERR
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition:
loglevel.h:72
BIOS_SPEW
#define BIOS_SPEW
BIOS_SPEW - Excessively verbose output.
Definition:
loglevel.h:142
mainboard_memory_init_params
void mainboard_memory_init_params(FSPM_UPD *mupd)
Definition:
romstage.c:22
mainboard_config_gpios
void mainboard_config_gpios(void)
Definition:
romstage.c:70
tagada_gpio_config
const struct pad_config tagada_gpio_config[]
Definition:
gpio.h:12
gpio_configure_pads
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
gpio.h
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
pad_config
Definition:
gpio.h:75
src
mainboard
scaleway
tagada
romstage.c
Generated by
1.9.1