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/io.h>
4
#include <
stdint.h
>
5
#include <
console/console.h
>
6
#include <
cf9_reset.h
>
7
#include <
device/pci_ops.h
>
8
#include <
timestamp.h
>
9
#include <
romstage_handoff.h
>
10
#include "
ironlake.h
"
11
#include <
arch/romstage.h
>
12
#include <
device/pci_def.h
>
13
#include <
device/device.h
>
14
#include <
northbridge/intel/ironlake/chip.h
>
15
#include <
northbridge/intel/ironlake/raminit.h
>
16
#include <
southbridge/intel/common/pmclib.h
>
17
#include <
southbridge/intel/ibexpeak/pch.h
>
18
#include <
southbridge/intel/ibexpeak/me.h
>
19
20
/*
21
* Platform has no romstage entry point under mainboard directory,
22
* so this one is named with prefix mainboard.
23
*/
24
void
mainboard_romstage_entry
(
void
)
25
{
26
int
s3resume = 0;
27
u8
spd_addrmap[4] = {};
28
29
/* TODO, make this configurable */
30
ironlake_early_initialization
(
IRONLAKE_MOBILE
);
31
32
early_pch_init
();
33
34
s3resume =
southbridge_detect_s3_resume
();
35
if
(s3resume) {
36
u8
reg8 =
pci_read_config8
(
PCI_DEV
(0, 0x1f, 0), 0xa2);
37
if
(!(reg8 & 0x20)) {
38
s3resume = 0;
39
printk
(
BIOS_DEBUG
,
"Bad resume from S3 detected.\n"
);
40
}
41
}
42
43
early_thermal_init
();
44
45
timestamp_add_now
(
TS_INITRAM_START
);
46
47
chipset_init
(s3resume);
48
49
mainboard_pre_raminit
();
50
51
mainboard_get_spd_map
(spd_addrmap);
52
53
raminit
(s3resume, spd_addrmap);
54
55
timestamp_add_now
(
TS_INITRAM_END
);
56
57
intel_early_me_status
();
58
59
romstage_handoff_init
(s3resume);
60
}
romstage.h
intel_early_me_status
void intel_early_me_status(void)
Definition:
early_me.c:26
early_thermal_init
void early_thermal_init(void)
Definition:
early_thermal.c:14
cf9_reset.h
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
raminit
void raminit(struct romstage_params *params)
Definition:
raminit.c:15
mainboard_pre_raminit
__weak void mainboard_pre_raminit(struct romstage_params *params)
Definition:
romstage.c:133
device.h
pci_ops.h
pci_read_config8
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
Definition:
pci_ops.h:46
raminit.h
ironlake.h
IRONLAKE_MOBILE
#define IRONLAKE_MOBILE
Definition:
ironlake.h:16
timestamp_add_now
void timestamp_add_now(enum timestamp_id id)
Definition:
timestamp.c:141
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
mainboard_get_spd_map
void mainboard_get_spd_map(u8 *spd_addrmap)
Definition:
romstage.c:55
chip.h
ironlake_early_initialization
void ironlake_early_initialization(int chipset_type)
Definition:
early_init.c:77
chipset_init
void chipset_init(const int s3resume)
Definition:
raminit.c:2860
pci_def.h
PCI_DEV
#define PCI_DEV(SEGBUS, DEV, FN)
Definition:
pci_type.h:14
romstage_handoff.h
romstage_handoff_init
int romstage_handoff_init(int is_s3_resume)
Definition:
romstage_handoff.c:42
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
me.h
pch.h
stdint.h
u8
uint8_t u8
Definition:
stdint.h:45
timestamp.h
TS_INITRAM_END
@ TS_INITRAM_END
Definition:
timestamp_serialized.h:25
TS_INITRAM_START
@ TS_INITRAM_START
Definition:
timestamp_serialized.h:24
src
northbridge
intel
ironlake
romstage.c
Generated by
1.9.1