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
>
5
#include <
southbridge/intel/common/early_spi.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
34
void
bootblock_early_southbridge_init
(
void
)
35
{
36
enable_spi_prefetching_and_caching
();
37
38
early_pch_init
();
39
40
enable_port80_on_lpc
();
41
set_spi_speed
();
42
43
/* Enable upper 128bytes of CMOS */
44
RCBA32
(
RC
) = (1 << 2);
45
}
bootblock.h
bootblock_early_southbridge_init
void __weak bootblock_early_southbridge_init(void)
Definition:
bootblock.c:17
early_spi.h
enable_spi_prefetching_and_caching
static void enable_spi_prefetching_and_caching(void)
Definition:
early_spi.h:8
pci_ops.h
GCS
#define GCS
Definition:
lpc.h:36
RC
#define RC
Definition:
rcba.h:120
enable_port80_on_lpc
static void enable_port80_on_lpc(void)
Definition:
bootblock.c:8
set_spi_speed
static void set_spi_speed(void)
Definition:
bootblock.c:14
early_pch_init
void early_pch_init(void)
Definition:
early_pch.c:299
RCBA8
#define RCBA8(x)
Definition:
rcba.h:12
RCBA32
#define RCBA32(x)
Definition:
rcba.h:14
pch.h
u32
uint32_t u32
Definition:
stdint.h:51
u8
uint8_t u8
Definition:
stdint.h:45
src
southbridge
intel
bd82x6x
bootblock.c
Generated by
1.9.1