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 <arch/bootblock.h>
4 #include <device/pci_ops.h>
6 #include "pch.h"
7 
8 static void enable_port80_on_lpc(void)
9 {
10  /* Enable port 80 POST on LPC */
11  RCBA32(GCS) &= (~0x04);
12 }
13 
14 static void set_spi_speed(void)
15 {
16  u32 fdod;
17  u8 ssfc;
18 
19  /* Observe SPI Descriptor Component Section 0 */
20  RCBA32(0x38b0) = 0x1000;
21 
22  /* Extract the Write/Erase SPI Frequency from descriptor */
23  fdod = RCBA32(0x38b4);
24  fdod >>= 24;
25  fdod &= 7;
26 
27  /* Set Software Sequence frequency to match */
28  ssfc = RCBA8(0x3893);
29  ssfc &= ~7;
30  ssfc |= fdod;
31  RCBA8(0x3893) = ssfc;
32 }
33 
35 {
37 
39 
41  set_spi_speed();
42 
43  /* Enable upper 128bytes of CMOS */
44  RCBA32(RC) = (1 << 2);
45 }
void __weak bootblock_early_southbridge_init(void)
Definition: bootblock.c:17
static void enable_spi_prefetching_and_caching(void)
Definition: early_spi.h:8
#define GCS
Definition: lpc.h:36
#define RC
Definition: rcba.h:120
static void enable_port80_on_lpc(void)
Definition: bootblock.c:8
static void set_spi_speed(void)
Definition: bootblock.c:14
void early_pch_init(void)
Definition: early_pch.c:299
#define RCBA8(x)
Definition: rcba.h:12
#define RCBA32(x)
Definition: rcba.h:14
uint32_t u32
Definition: stdint.h:51
uint8_t u8
Definition: stdint.h:45