blob: 528159df5b74b3159be51b81f5c37721f40f4623 [file] [log] [blame]
Marshall Dawson9df969a2017-07-25 18:46:46 -06001/*
2 * This file is part of the coreboot project.
3 *
Marshall Dawson9df969a2017-07-25 18:46:46 -06004 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15/******************************************************************************
16 * $Workfile:: cache_as_ram.S
17 *
18 * Description: CAR setup called from bootblock_crt0.S.
19 *
20 ******************************************************************************
21 */
22
23#include "gcccar.inc"
Marshall Dawson9df969a2017-07-25 18:46:46 -060024#include <cpu/x86/post_code.h>
25
26/*
27 * on entry:
28 * mm0: BIST (ignored)
29 * mm2_mm1: timestamp at bootblock_protected_mode_entry
30 */
31
32.global bootblock_pre_c_entry
33bootblock_pre_c_entry:
34
35 post_code(0xa0)
36
37 AMD_ENABLE_STACK
38
39 /* Align the stack and keep aligned for call to bootblock_c_entry() */
40 and $0xfffffff0, %esp
41 sub $8, %esp
42
43 movd %mm2, %eax
44 pushl %eax /* tsc[63:32] */
45 movd %mm1, %eax
46 pushl %eax /* tsc[31:0] */
47
48before_carstage:
49 post_code(0xa2)
50
51 call bootblock_c_entry
52 /* Never reached */
53
54.halt_forever:
55 post_code(POST_DEAD_CODE)
56 hlt
57 jmp .halt_forever