Files
system76-edk2/UefiPayloadPkg/UefiPayloadEntry/X64/SecEntry.nasm
Guo Dong 7c4ab1c2ef UefiPayloadPkg: Remove PEI phase from Payload
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3100

It is not necessary to have a PEI phase in the UEFI payload since no
specific PEI task is required. This patch adds a UefiPayloadEntry
driver to get UEFI Payload required information from the bootloaders,
convert them into a HOB list, load DXE core and transfer control to it.

Here is the change details:
1) Removed PEI phase, including Peicore, BlSupportPei, SecCore, etc.
2) Added UefiPayloadEntry driver. this is the only driver before DXE core.
3) Added Pure X64 support, dropped Pure IA32 (Could add later if required)
   64bit payload with 32bit entry point is still supported.
4) Use one DSC file UefiPayloadPkg.dsc to support X64 and IA32X64 build.
   Removed UefiPayloadIa32.dsc and UefiPayloadIa32X64.dsc

Tested with SBL and coreboot on QEMU.

Signed-off-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Benjamin You <benjamin.you@intel.com>
2020-12-02 23:10:22 +00:00

48 lines
911 B
NASM

;------------------------------------------------------------------------------
;*
;* Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR>
;* SPDX-License-Identifier: BSD-2-Clause-Patent
;------------------------------------------------------------------------------
#include <Base.h>
DEFAULT REL
SECTION .text
extern ASM_PFX(PayloadEntry)
extern ASM_PFX(PcdGet32 (PcdPayloadStackTop))
;
; SecCore Entry Point
;
; Processor is in flat protected mode
global ASM_PFX(_ModuleEntryPoint)
ASM_PFX(_ModuleEntryPoint):
;
; Disable all the interrupts
;
cli
mov rsp, FixedPcdGet32 (PcdPayloadStackTop)
;
; Push the bootloader parameter address onto new stack
;
push rcx
mov rax, 0
push rax ; shadow space
push rax
push rax
push rax
;
; Call into C code
;
call ASM_PFX(PayloadEntry)
jmp $