VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/Sec/Ia32/SecEntry.nasm

最後變更 在這個檔案是 99404,由 vboxsync 提交於 20 月 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:mime-type 設為 text/x-asm
檔案大小: 2.3 KB
 
1;------------------------------------------------------------------------------
2;*
3;* Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
4;* SPDX-License-Identifier: BSD-2-Clause-Patent
5;*
6;* CpuAsm.asm
7;*
8;* Abstract:
9;*
10;------------------------------------------------------------------------------
11
12#include <Base.h>
13
14 SECTION .text
15
16extern ASM_PFX(SecCoreStartupWithStack)
17
18;
19; SecCore Entry Point
20;
21; Processor is in flat protected mode
22;
23; @param[in] EAX Initial value of the EAX register (BIST: Built-in Self Test)
24; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
25; @param[in] EBP Pointer to the start of the Boot Firmware Volume
26; @param[in] DS Selector allowing flat access to all addresses
27; @param[in] ES Selector allowing flat access to all addresses
28; @param[in] FS Selector allowing flat access to all addresses
29; @param[in] GS Selector allowing flat access to all addresses
30; @param[in] SS Selector allowing flat access to all addresses
31;
32; @return None This routine does not return
33;
34global ASM_PFX(_ModuleEntryPoint)
35ASM_PFX(_ModuleEntryPoint):
36
37 ;
38 ; Fill the temporary RAM with the initial stack value.
39 ; The loop below will seed the heap as well, but that's harmless.
40 ;
41 mov eax, FixedPcdGet32 (PcdInitValueInTempStack) ; dword to store
42 mov edi, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) ; base address,
43 ; relative to
44 ; ES
45 mov ecx, FixedPcdGet32 (PcdOvmfSecPeiTempRamSize) / 4 ; dword count
46 cld ; store from base
47 ; up
48 rep stosd
49
50 ;
51 ; Load temporary RAM stack based on PCDs
52 ;
53 %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \
54 FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))
55 mov eax, SEC_TOP_OF_STACK
56 mov esp, eax
57 nop
58
59 ;
60 ; Setup parameters and call SecCoreStartupWithStack
61 ; [esp] return address for call
62 ; [esp+4] BootFirmwareVolumePtr
63 ; [esp+8] TopOfCurrentStack
64 ;
65 push eax
66 push ebp
67 call ASM_PFX(SecCoreStartupWithStack)
68
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette