Felix Held | 4667322 | 2020-04-04 02:37:04 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Felix Held | 4667322 | 2020-04-04 02:37:04 +0200 | [diff] [blame] | 2 | |
| 3 | #include <cpu/x86/post_code.h> |
| 4 | |
| 5 | /* |
| 6 | * on entry: |
| 7 | * mm0: BIST (ignored) |
| 8 | * mm2_mm1: timestamp at bootblock_protected_mode_entry |
| 9 | */ |
| 10 | |
| 11 | .global bootblock_pre_c_entry |
| 12 | bootblock_pre_c_entry: |
| 13 | post_code(0xa0) |
| 14 | |
| 15 | movl $_eearlyram_stack, %esp |
| 16 | |
| 17 | /* Align the stack and keep aligned for call to bootblock_c_entry() */ |
| 18 | and $0xfffffff0, %esp |
| 19 | sub $8, %esp |
| 20 | |
| 21 | movd %mm2, %eax |
| 22 | pushl %eax /* tsc[63:32] */ |
| 23 | movd %mm1, %eax |
| 24 | pushl %eax /* tsc[31:0] */ |
| 25 | |
| 26 | post_code(0xa2) |
| 27 | |
| 28 | call bootblock_c_entry |
| 29 | /* Never reached */ |
| 30 | |
| 31 | .halt_forever: |
| 32 | post_code(POST_DEAD_CODE) |
| 33 | hlt |
| 34 | jmp .halt_forever |