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 <stdint.h>
4 #include <amdblocks/cpu.h>
5 #include <bootblock_common.h>
6 #include <console/console.h>
7 #include <cpu/x86/tsc.h>
8 #include <soc/psp_transfer.h>
9 #include <soc/southbridge.h>
11 
13 {
17 
18  /*
19  * base_timestamp is raw tsc value. We need to divide by tsc_freq_mhz
20  * when we use micro-seconds granularity for Zork
21  */
22  base_timestamp /= tsc_freq_mhz();
23 
24  if (CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK))
25  boot_with_psp_timestamp(base_timestamp);
26 
27  /*
28  * if VBOOT_STARTS_BEFORE_BOOTBLOCK is not selected or
29  * previous step did nothing, proceed with normal bootblock main.
30  */
31  bootblock_main_with_basetime(base_timestamp);
32 }
33 
35 {
36  fch_pre_init();
37 }
38 
40 {
41  u32 val = cpuid_eax(1);
42  printk(BIOS_DEBUG, "Family_Model: %08x\n", val);
43 
44  if (CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) {
47  }
48 
50 }
void enable_pci_mmconf(void)
Definition: amd_pci_mmconf.c:8
#define asmlinkage
Definition: cpu.h:8
static unsigned int cpuid_eax(unsigned int op)
Definition: cpu.h:79
void fch_pre_init(void)
Definition: early_fch.c:35
void fch_early_init(void)
Definition: early_fch.c:71
void boot_with_psp_timestamp(uint64_t base_timestamp)
void verify_psp_transfer_buf(void)
void show_psp_transfer_info(void)
#define printk(level,...)
Definition: stdlib.h:16
void bootblock_soc_early_init(void)
Definition: bootblock.c:20
void bootblock_soc_init(void)
Definition: bootblock.c:27
asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
Definition: bootblock.c:26
@ CONFIG
Definition: dsi_common.h:201
void early_cache_setup(void)
Definition: early_cache.c:15
unsigned long tsc_freq_mhz(void)
Definition: fsb.c:118
void bootblock_main_with_basetime(uint64_t base_timestamp)
Definition: bootblock.c:71
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
uint32_t u32
Definition: stdint.h:51
unsigned long long uint64_t
Definition: stdint.h:17
u8 val
Definition: sys.c:300
void write_resume_eip(void)