blob: f75de1f2d0e67e4807d27275fe6d6e897a0755e1 [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>
Mariusz Szafranskia4041332017-08-02 17:28:17 +020025#include <console/console.h>
26
27const FSPT_UPD temp_ram_init_params = {
28 .FspUpdHeader = {
29 .Signature = 0x545F445055564E44ULL,
30 .Revision = 1,
31 .Reserved = {0},
32 },
33 .FsptCoreUpd = {
34 .MicrocodeRegionBase =
35 (UINT32)CONFIG_CPU_MICROCODE_CBFS_LOC,
36 .MicrocodeRegionLength =
37 (UINT32)CONFIG_CPU_MICROCODE_CBFS_LEN,
38 .CodeRegionBase =
Arthur Heymans62c0b612019-02-05 21:10:01 +010039 (UINT32)(0x100000000ULL - CONFIG_ROM_SIZE),
40 .CodeRegionLength = (UINT32)CONFIG_ROM_SIZE,
Mariusz Szafranskia4041332017-08-02 17:28:17 +020041 .Reserved1 = {0},
42 },
43 .FsptConfig = {
44 .PcdFsptPort80RouteDisable = 0,
45 .ReservedTempRamInitUpd = {0},
46 },
47 .UnusedUpdSpace0 = {0},
48 .UpdTerminator = 0x55AA,
49};
50
51asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
52{
53 /* Call lib/bootblock.c main */
Kyösti Mälkki101ef0b2019-08-18 06:58:42 +030054 bootblock_main_with_basetime(base_timestamp);
Mariusz Szafranskia4041332017-08-02 17:28:17 +020055};
56
57void bootblock_soc_early_init(void)
58{
59
Julius Wernercd49cce2019-03-05 16:53:33 -080060#if (CONFIG(CONSOLE_SERIAL))
Mariusz Szafranskia4041332017-08-02 17:28:17 +020061 early_uart_init();
62#endif
63};
64
65void bootblock_soc_init(void)
66{
Julius Wernercd49cce2019-03-05 16:53:33 -080067 if (CONFIG(BOOTBLOCK_CONSOLE))
Mariusz Szafranskia4041332017-08-02 17:28:17 +020068 printk(BIOS_DEBUG, "FSP TempRamInit successful...\n");
69};