Angel Pons | ae59387 | 2020-04-04 18:50:57 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Marshall Dawson | 9df969a | 2017-07-25 18:46:46 -0600 | [diff] [blame] | 2 | |
| 3 | /****************************************************************************** |
| 4 | * $Workfile:: cache_as_ram.S |
| 5 | * |
| 6 | * Description: CAR setup called from bootblock_crt0.S. |
| 7 | * |
| 8 | ****************************************************************************** |
| 9 | */ |
| 10 | |
| 11 | #include "gcccar.inc" |
Marshall Dawson | 9df969a | 2017-07-25 18:46:46 -0600 | [diff] [blame] | 12 | #include <cpu/x86/post_code.h> |
| 13 | |
| 14 | /* |
| 15 | * on entry: |
| 16 | * mm0: BIST (ignored) |
| 17 | * mm2_mm1: timestamp at bootblock_protected_mode_entry |
| 18 | */ |
| 19 | |
| 20 | .global bootblock_pre_c_entry |
| 21 | bootblock_pre_c_entry: |
| 22 | |
| 23 | post_code(0xa0) |
| 24 | |
| 25 | AMD_ENABLE_STACK |
| 26 | |
| 27 | /* Align the stack and keep aligned for call to bootblock_c_entry() */ |
| 28 | and $0xfffffff0, %esp |
| 29 | sub $8, %esp |
| 30 | |
| 31 | movd %mm2, %eax |
| 32 | pushl %eax /* tsc[63:32] */ |
| 33 | movd %mm1, %eax |
| 34 | pushl %eax /* tsc[31:0] */ |
| 35 | |
| 36 | before_carstage: |
| 37 | post_code(0xa2) |
| 38 | |
| 39 | call bootblock_c_entry |
| 40 | /* Never reached */ |
| 41 | |
| 42 | .halt_forever: |
| 43 | post_code(POST_DEAD_CODE) |
| 44 | hlt |
| 45 | jmp .halt_forever |