coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <baseboard/variants.h>
4 #include <bootstate.h>
5 #include <gpio.h>
6 #include <intelblocks/pcr.h>
7 #include <soc/gpio.h>
8 #include <soc/pcr_ids.h>
9 
11 {
12  /* PIR8 register mapping for PCIe root ports
13  INTA#->PIRQC#, INTB#->PIRQD#, INTC#->PIRQA#, INTD#-> PIRQB# */
14  pcr_write16(PID_ITSS, 0x3150, 0x1032);
15 }
16 
17 static void finalize_boot(void *unused)
18 {
19  /* Set coreboot ready LED. */
20  gpio_output(GPP_F20, 1);
21 }
22 
#define GPP_F20
@ BS_PAYLOAD_BOOT
Definition: bootstate.h:89
@ BS_ON_ENTRY
Definition: bootstate.h:95
void pcr_write16(uint8_t pid, uint16_t offset, uint16_t indata)
Definition: pcr.c:134
BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_EXIT, sch5545_ec_hwm_init, NULL)
@ PID_ITSS
Definition: pcr.h:16
void gpio_output(gpio_t gpio, int value)
Definition: gpio.c:194
void __weak variant_mainboard_final(void)
Definition: mainboard.c:245
static void finalize_boot(void *unused)
Definition: mainboard.c:17
#define NULL
Definition: stddef.h:19