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-or-later */
2 
3 #include <console/console.h>
4 #include <romstage_handoff.h>
6 #include <arch/romstage.h>
7 
8 #if CONFIG(SOUTHBRIDGE_INTEL_I82801JX)
10 #elif CONFIG(SOUTHBRIDGE_INTEL_I82801GX)
12 #endif
13 
14 #include "raminit.h"
15 #include "x4x.h"
16 
17 __weak void mb_pre_raminit_setup(int s3_resume)
18 {
19 }
20 
22 {
23  u8 spd_addr_map[4] = {};
24  u8 boot_path = 0;
25  u8 s3_resume;
26 
27 #if CONFIG(SOUTHBRIDGE_INTEL_I82801JX)
29 #elif CONFIG(SOUTHBRIDGE_INTEL_I82801GX)
31 #endif
32 
34 
35  s3_resume = southbridge_detect_s3_resume();
36  mb_pre_raminit_setup(s3_resume);
37 
38  if (s3_resume)
39  boot_path = BOOT_PATH_RESUME;
41  boot_path = BOOT_PATH_WARM_RESET;
42 
43  mb_get_spd_map(spd_addr_map);
44  sdram_initialize(boot_path, spd_addr_map);
45 
46  x4x_late_init();
47  printk(BIOS_DEBUG, "x4x late init complete\n");
48 
49  romstage_handoff_init(s3_resume);
50 }
#define printk(level,...)
Definition: stdlib.h:16
static __always_inline uint32_t mchbar_read32(const uintptr_t offset)
Definition: fixed_bars.h:21
#define PMSTS_WARM_RESET
Definition: gm45.h:226
#define PMSTS_MCHBAR
Definition: gm45.h:225
void i82801gx_early_init(void)
#define BOOT_PATH_RESUME
Definition: raminit.h:35
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
void mb_get_spd_map(struct spd_info *spdi)
Definition: romstage.c:19
void mainboard_romstage_entry(void)
Definition: romstage.c:6
void mb_pre_raminit_setup(sysinfo_t *sysinfo)
Definition: romstage.c:24
void sdram_initialize(void)
Definition: raminit.c:1692
void x4x_early_init(void)
Definition: early_init.c:14
void x4x_late_init(void)
Definition: early_init.c:217
int romstage_handoff_init(int is_s3_resume)
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
int southbridge_detect_s3_resume(void)
Definition: pmclib.c:18
void i82801jx_early_init(void)
Definition: early_init.c:68
uint8_t u8
Definition: stdint.h:45
#define BOOT_PATH_WARM_RESET
Definition: x4x.h:10