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 
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. */
16 }
17 
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 }
#define printk(level,...)
Definition: stdlib.h:16
#define GPP_K16
#define GPP_K13
#define GPP_K14
#define GPP_K12
int gpio_get(gpio_t gpio)
Definition: gpio.c:166
__weak void bootblock_mainboard_init(void)
Definition: bootblock.c:19
__weak void bootblock_mainboard_early_init(void)
Definition: bootblock.c:16
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
void program_early_gpio_pads(void)
Definition: gpio.c:412
uint8_t u8
Definition: stdint.h:45