2 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/processor.h>
12 #include <asm/fsp/fsp_support.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 int print_cpuinfo(void)
18 post_code(POST_CPU_INFO);
19 return default_print_cpuinfo();
22 int fsp_init_phase_pci(void)
26 /* call into FspNotify */
27 debug("Calling into FSP (notify phase INIT_PHASE_PCI): ");
28 status = fsp_notify(NULL, INIT_PHASE_PCI);
30 debug("fail, error code %x\n", status);
34 return status ? -EPERM : 0;
37 int board_pci_post_scan(struct pci_controller *hose)
39 return fsp_init_phase_pci();
42 void board_final_cleanup(void)
46 /* call into FspNotify */
47 debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
48 status = fsp_notify(NULL, INIT_PHASE_BOOT);
50 debug("fail, error code %x\n", status);
57 int x86_fsp_init(void)
59 if (!gd->arch.hob_list) {
61 * The first time we enter here, call fsp_init().
62 * Note the execution does not return to this function,
63 * instead it jumps to fsp_continue().
65 fsp_init(CONFIG_FSP_TEMP_RAM_ADDR, BOOT_FULL_CONFIG, NULL);
68 * The second time we enter here, adjust the size of malloc()
69 * pool before relocation. Given gd->malloc_base was adjusted
70 * after the call to board_init_f_mem() in arch/x86/cpu/start.S,
71 * we should fix up gd->malloc_limit here.
73 gd->malloc_limit += CONFIG_FSP_SYS_MALLOC_F_LEN;