coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
arch/romstage.h
>
4
#include <
console/console.h
>
5
#include <
device/mmio.h
>
6
#include <elog.h>
7
#include <
romstage_handoff.h
>
8
#include <
security/intel/txt/txt.h
>
9
#include <
security/intel/txt/txt_register.h
>
10
#include <
northbridge/intel/haswell/haswell.h
>
11
#include <
northbridge/intel/haswell/raminit.h
>
12
#include <
southbridge/intel/common/pmclib.h
>
13
#include <
southbridge/intel/lynxpoint/pch.h
>
14
15
void
__weak
mb_late_romstage_setup
(
void
)
16
{
17
}
18
19
/* The romstage entry point for this platform is not mainboard-specific, hence the name */
20
void
mainboard_romstage_entry
(
void
)
21
{
22
early_pch_init
();
23
24
/* Perform some early chipset initialization required
25
* before RAM initialization can work
26
*/
27
haswell_early_initialization
();
28
printk
(
BIOS_DEBUG
,
"Back from haswell_early_initialization()\n"
);
29
30
const
int
s3resume =
southbridge_detect_s3_resume
();
31
32
elog_boot_notify
(s3resume);
33
34
/* Prepare USB controller early in S3 resume */
35
if
(s3resume)
36
enable_usb_bar
();
37
38
post_code
(0x3a);
39
40
report_platform_info
();
41
42
if
(
CONFIG
(INTEL_TXT))
43
intel_txt_romstage_init
();
44
45
perform_raminit
(s3resume);
46
47
if
(
CONFIG
(INTEL_TXT)) {
48
printk
(
BIOS_DEBUG
,
"Check TXT_ERROR register after MRC\n"
);
49
50
intel_txt_log_acm_error
(
read32
((
void
*)
TXT_ERROR
));
51
52
intel_txt_log_spad
();
53
54
intel_txt_memory_has_secrets
();
55
56
txt_dump_regions
();
57
}
58
59
haswell_unhide_peg
();
60
61
romstage_handoff_init
(s3resume);
62
63
mb_late_romstage_setup
();
64
65
post_code
(0x3f);
66
}
read32
static uint32_t read32(const void *addr)
Definition:
mmio.h:22
romstage.h
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
CONFIG
@ CONFIG
Definition:
dsi_common.h:201
enable_usb_bar
void enable_usb_bar(void)
Definition:
early_usb_mrc.c:17
raminit.h
mmio.h
elog_boot_notify
static void elog_boot_notify(int s3_resume)
Definition:
elog.h:62
BIOS_DEBUG
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition:
loglevel.h:128
mainboard_romstage_entry
void mainboard_romstage_entry(void)
Definition:
romstage.c:6
mb_late_romstage_setup
void mb_late_romstage_setup(void)
Definition:
romstage.c:23
haswell_early_initialization
void haswell_early_initialization(void)
Definition:
early_init.c:183
haswell_unhide_peg
void haswell_unhide_peg(void)
Definition:
early_init.c:110
haswell.h
report_platform_info
void report_platform_info(void)
Definition:
report_platform.c:92
perform_raminit
void perform_raminit(const int s3resume)
Definition:
raminit.c:342
post_code
#define post_code(value)
Definition:
post_code.h:12
romstage_handoff.h
romstage_handoff_init
int romstage_handoff_init(int is_s3_resume)
Definition:
romstage_handoff.c:42
__weak
const struct smm_save_state_ops *legacy_ops __weak
Definition:
save_state.c:8
intel_txt_log_spad
void intel_txt_log_spad(void)
Definition:
common.c:101
intel_txt_memory_has_secrets
bool intel_txt_memory_has_secrets(void)
Definition:
common.c:135
intel_txt_log_acm_error
int intel_txt_log_acm_error(const uint32_t acm_error)
Dump the ACM error status bits.
Definition:
common.c:49
intel_txt_romstage_init
void intel_txt_romstage_init(void)
Definition:
romstage.c:84
early_pch_init
void early_pch_init(void)
Definition:
early_pch.c:299
southbridge_detect_s3_resume
int southbridge_detect_s3_resume(void)
Definition:
pmclib.c:18
pmclib.h
pch.h
txt_dump_regions
void txt_dump_regions(void)
Definition:
logging.c:191
txt.h
txt_register.h
TXT_ERROR
#define TXT_ERROR
Definition:
txt_register.h:25
src
northbridge
intel
haswell
romstage.c
Generated by
1.9.1