2 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0+
13 * Note: ebp holds the BIST value (built-in self test) so far, but ebp
14 * will be destroyed through the FSP call, thus we have to test the
15 * BIST value here before we call into FSP.
19 post_code(POST_BIST_FAILURE)
23 post_code(POST_CAR_START)
24 lea find_fsp_header_romstack, %esp
28 /* EAX points to FSP_INFO_HEADER */
32 cmp $CONFIG_FSP_ADDR, %eax
35 /* calculate TempRamInitEntry address */
39 /* call FSP TempRamInitEntry to setup temporary stack */
40 lea temp_ram_init_romstack, %esp
48 post_code(POST_CAR_CPU_CACHE)
51 * The FSP TempRamInit initializes the ecx and edx registers to
52 * point to a temporary but writable memory range (Cache-As-RAM).
53 * ecx: the start of this temporary memory range,
54 * edx: the end of this range.
57 /* stack grows down from top of CAR */
67 * We come here from fsp_continue() with eax pointing to the HOB list.
68 * Save eax to esi temporarily.
74 * Re-initialize the ebp (BIST) to zero, as we already reach here
75 * which means we passed BIST testing before.
81 post_code(POST_CAR_FAILURE)
89 * The function call before CAR initialization is tricky. It cannot
90 * be called using the 'call' instruction but only the 'jmp' with
91 * the help of a handcrafted stack in the ROM. The stack needs to
92 * contain the function return address as well as the parameters.
95 find_fsp_header_romstack:
96 .long find_fsp_header_ret
99 temp_ram_init_romstack:
100 .long temp_ram_init_ret
101 .long temp_ram_init_params
102 temp_ram_init_params:
104 /* These next two fields are filled in by ifdtool */
106 ucode_base: /* Declared in micrcode.h */
107 .long 0 /* microcode base */
108 .long 0 /* microcode size */
109 .long CONFIG_SYS_MONITOR_BASE /* code region base */
110 .long CONFIG_SYS_MONITOR_LEN /* code region size */