1;------------------------------------------------------------------------------
2;*
3;*   Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
4;*   SPDX-License-Identifier: BSD-2-Clause-Patent
5
6;------------------------------------------------------------------------------
7
8#include <Base.h>
9
10DEFAULT REL
11SECTION .text
12
13extern ASM_PFX(PayloadEntry)
14extern  ASM_PFX(PcdGet32 (PcdPayloadStackTop))
15
16;
17; SecCore Entry Point
18;
19; Processor is in flat protected mode
20
21global ASM_PFX(_ModuleEntryPoint)
22ASM_PFX(_ModuleEntryPoint):
23
24  ;
25  ; Disable all the interrupts
26  ;
27  cli
28
29
30  mov   rsp, FixedPcdGet32 (PcdPayloadStackTop)
31
32  ;
33  ; Push the bootloader parameter address onto new stack
34  ;
35  push  rcx
36  mov   rax, 0
37  push  rax ; shadow space
38  push  rax
39  push  rax
40  push  rax
41
42  ;
43  ; Call into C code
44  ;
45  call  ASM_PFX(PayloadEntry)
46  jmp   $
47
48