coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
bootblock.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
bootblock_common.h
>
4
#include <
console/console.h
>
5
#include <
gpio.h
>
6
#include <soc/gpio.h>
7
8
#include "
gpio.h
"
9
10
void
bootblock_mainboard_early_init
(
void
)
11
{
12
/* This is a hack for FSP because it does things in MemoryInit()
13
which it shouldn't do. We have to prepare certain gpios here
14
because of the brokenness in FSP. */
15
program_early_gpio_pads
();
16
}
17
18
void
bootblock_mainboard_init
(
void
)
19
{
20
u8
bmc_hsi = (
gpio_get
(
GPP_K13
) << 3) |
21
(
gpio_get
(
GPP_K12
) << 2) |
22
(
gpio_get
(
GPP_K14
) << 1) |
23
(
gpio_get
(
GPP_K16
) << 0);
24
25
printk
(
BIOS_INFO
,
"BMC HSI 0x%x\n"
, bmc_hsi);
26
}
bootblock_common.h
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
GPP_K16
#define GPP_K16
Definition:
gpio_soc_defs_cnp_h.h:221
GPP_K13
#define GPP_K13
Definition:
gpio_soc_defs_cnp_h.h:218
GPP_K14
#define GPP_K14
Definition:
gpio_soc_defs_cnp_h.h:219
GPP_K12
#define GPP_K12
Definition:
gpio_soc_defs_cnp_h.h:217
gpio_get
int gpio_get(gpio_t gpio)
Definition:
gpio.c:166
bootblock_mainboard_init
__weak void bootblock_mainboard_init(void)
Definition:
bootblock.c:19
bootblock_mainboard_early_init
__weak void bootblock_mainboard_early_init(void)
Definition:
bootblock.c:16
BIOS_INFO
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition:
loglevel.h:113
program_early_gpio_pads
void program_early_gpio_pads(void)
Definition:
gpio.c:412
gpio.h
u8
uint8_t u8
Definition:
stdint.h:45
src
mainboard
prodrive
hermes
bootblock.c
Generated by
1.9.1