1 ;------------------------------------------------------------------------------ 2 ;* 3 ;* Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR> 4 ;* This program and the accompanying materials 5 ;* are licensed and made available under the terms and conditions of the BSD License 6 ;* which accompanies this distribution. The full text of the license may be found at 7 ;* http://opensource.org/licenses/bsd-license.php 8 ;* 9 ;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 ;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 ;* 12 ;* CpuAsm.asm 13 ;* 14 ;* Abstract: 15 ;* 16 ;------------------------------------------------------------------------------ 17 18 #include <Base.h> 19 20 SECTION .text 21 22 extern ASM_PFX(SecCoreStartupWithStack) 23 24 ; 25 ; SecCore Entry Point 26 ; 27 ; Processor is in flat protected mode 28 ; 29 ; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test) 30 ; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor 31 ; @param[in] EBP Pointer to the start of the Boot Firmware Volume 32 ; 33 ; @return None This routine does not return 34 ; 35 global ASM_PFX(_ModuleEntryPoint) 36 ASM_PFX(_ModuleEntryPoint): 37 38 ; 39 ; Load temporary RAM stack based on PCDs 40 ; 41 %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \ 42 FixedPcdGet32 (PcdOvmfSecPeiTempRamSize)) 43 mov eax, SEC_TOP_OF_STACK 44 mov esp, eax 45 nop 46 47 ; 48 ; Setup parameters and call SecCoreStartupWithStack 49 ; [esp] return address for call 50 ; [esp+4] BootFirmwareVolumePtr 51 ; [esp+8] TopOfCurrentStack 52 ; 53 push eax 54 push ebp 55 call ASM_PFX(SecCoreStartupWithStack) 56 57