blob: 57e3a2e49bf0eb907d2baee0f453a81699c8b8f2 [file] [log] [blame]
Mariusz Szafranskia4041332017-08-02 17:28:17 +02001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2016 - 2017 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
Mariusz Szafranskia4041332017-08-02 17:28:17 +020017#include <bootblock_common.h>
18#include <cpu/x86/mtrr.h>
19#include <device/pci.h>
20#include <FsptUpd.h>
21#include <intelblocks/fast_spi.h>
Mariusz Szafranskia4041332017-08-02 17:28:17 +020022#include <soc/bootblock.h>
23#include <soc/iomap.h>
24#include <spi-generic.h>
25#include <timestamp.h>
26#include <console/console.h>
27
28const FSPT_UPD temp_ram_init_params = {
29 .FspUpdHeader = {
30 .Signature = 0x545F445055564E44ULL,
31 .Revision = 1,
32 .Reserved = {0},
33 },
34 .FsptCoreUpd = {
35 .MicrocodeRegionBase =
36 (UINT32)CONFIG_CPU_MICROCODE_CBFS_LOC,
37 .MicrocodeRegionLength =
38 (UINT32)CONFIG_CPU_MICROCODE_CBFS_LEN,
39 .CodeRegionBase =
Arthur Heymans62c0b612019-02-05 21:10:01 +010040 (UINT32)(0x100000000ULL - CONFIG_ROM_SIZE),
41 .CodeRegionLength = (UINT32)CONFIG_ROM_SIZE,
Mariusz Szafranskia4041332017-08-02 17:28:17 +020042 .Reserved1 = {0},
43 },
44 .FsptConfig = {
45 .PcdFsptPort80RouteDisable = 0,
46 .ReservedTempRamInitUpd = {0},
47 },
48 .UnusedUpdSpace0 = {0},
49 .UpdTerminator = 0x55AA,
50};
51
52asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
53{
54 /* Call lib/bootblock.c main */
Julius Werner12574dd2018-05-15 17:48:30 -070055 bootblock_main_with_timestamp(base_timestamp, NULL, 0);
Mariusz Szafranskia4041332017-08-02 17:28:17 +020056};
57
58void bootblock_soc_early_init(void)
59{
60
Julius Wernercd49cce2019-03-05 16:53:33 -080061#if (CONFIG(CONSOLE_SERIAL))
Mariusz Szafranskia4041332017-08-02 17:28:17 +020062 early_uart_init();
63#endif
64};
65
66void bootblock_soc_init(void)
67{
Julius Wernercd49cce2019-03-05 16:53:33 -080068 if (CONFIG(BOOTBLOCK_CONSOLE))
Mariusz Szafranskia4041332017-08-02 17:28:17 +020069 printk(BIOS_DEBUG, "FSP TempRamInit successful...\n");
70};