soc/intel/alderlake: Add ADL-P 4+4 with 28W TDP
[coreboot.git] / src / cpu / x86 / entry32.S
blob215d60182adf828862bcf7a99dac2b1cfa4d3989
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /* For starting coreboot in protected mode */
5 /*
6  * This is the modern bootblock. It prepares the system for C environment runtime
7  * setup. The actual setup is done by hardware-specific code.
8  *
9  * It provides a bootflow similar to other architectures, and thus is considered
10  * to be the modern approach.
11  *
12  */
14 #include <arch/rom_segs.h>
15 #include <cpu/x86/cr.h>
16 #include <cpu/x86/post_code.h>
18 .section .init, "ax", @progbits
20         .code32
22  *      When we come here we are in protected mode.
23  *      NOTE aligned to 4 so that we are sure that the prefetch
24  *      cache will be reloaded.
25  */
26         .align  4
28 .globl bootblock_protected_mode_entry
29 bootblock_protected_mode_entry:
31         /* Save the BIST value */
32         movl    %eax, %ebp
34         post_code(POST_ENTER_PROTECTED_MODE)
36         movw    $ROM_DATA_SEG, %ax
37         movw    %ax, %ds
38         movw    %ax, %es
39         movw    %ax, %ss
40         xor     %ax, %ax /* zero out the gs and fs segment index */
41         movw    %ax, %fs
42         movw    %ax, %gs /* Will be used for cpu_info */
44         /* Restore the BIST value to %eax */
45         movl    %ebp, %eax
47 #if CONFIG(BOOTBLOCK_DEBUG_SPINLOOP)
49         /* Wait for a JTAG debugger to break in and set EBX non-zero */
50         xor     %ebx, %ebx
52 debug_spinloop:
53         cmp     $0, %ebx
54         jz      debug_spinloop
55 #endif
57 #if !CONFIG(USE_MARCH_586)
58         /* MMX registers required here */
60         /* BIST result in eax */
61         movd    %eax, %mm0
63 __timestamp:
65         /* Get an early timestamp */
66         rdtsc
67         movd    %eax, %mm1
68         movd    %edx, %mm2
69 #endif
71 #if CONFIG(SSE)
72 enable_sse:
73         mov     %cr4, %eax
74         or      $CR4_OSFXSR, %ax
75         mov     %eax, %cr4
76 #endif /* CONFIG(SSE) */
78         /* We're done. Now it's up to platform-specific code */
79         jmp     bootblock_pre_c_entry