blob: 8b0c356aa01c9840c09058b220f57ecbdd098341 [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
17#include <arch/cpu.h>
18#include <bootblock_common.h>
19#include <cpu/x86/mtrr.h>
20#include <device/pci.h>
21#include <FsptUpd.h>
22#include <intelblocks/fast_spi.h>
23#include <lib.h>
24#include <soc/bootblock.h>
25#include <soc/iomap.h>
26#include <spi-generic.h>
27#include <timestamp.h>
28#include <console/console.h>
29
30const FSPT_UPD temp_ram_init_params = {
31 .FspUpdHeader = {
32 .Signature = 0x545F445055564E44ULL,
33 .Revision = 1,
34 .Reserved = {0},
35 },
36 .FsptCoreUpd = {
37 .MicrocodeRegionBase =
38 (UINT32)CONFIG_CPU_MICROCODE_CBFS_LOC,
39 .MicrocodeRegionLength =
40 (UINT32)CONFIG_CPU_MICROCODE_CBFS_LEN,
41 .CodeRegionBase =
42 (UINT32)(0x100000000ULL - CONFIG_CBFS_SIZE),
43 .CodeRegionLength = (UINT32)CONFIG_CBFS_SIZE,
44 .Reserved1 = {0},
45 },
46 .FsptConfig = {
47 .PcdFsptPort80RouteDisable = 0,
48 .ReservedTempRamInitUpd = {0},
49 },
50 .UnusedUpdSpace0 = {0},
51 .UpdTerminator = 0x55AA,
52};
53
54asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
55{
56 /* Call lib/bootblock.c main */
Julius Werner12574dd2018-05-15 17:48:30 -070057 bootblock_main_with_timestamp(base_timestamp, NULL, 0);
Mariusz Szafranskia4041332017-08-02 17:28:17 +020058};
59
60void bootblock_soc_early_init(void)
61{
62
63#if (IS_ENABLED(CONFIG_CONSOLE_SERIAL))
64 early_uart_init();
65#endif
66};
67
68void bootblock_soc_init(void)
69{
70 if (IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE))
71 printk(BIOS_DEBUG, "FSP TempRamInit successful...\n");
72};