VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Sec/Ia32/SecEntry.nasm@ 77662

最後變更 在這個檔案從77662是 77662,由 vboxsync 提交於 6 年 前

EFI: First step in UDK2018 merge. Does not build yet.

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.7 KB
 
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
22extern 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; @param[in] DS Selector allowing flat access to all addresses
33; @param[in] ES Selector allowing flat access to all addresses
34; @param[in] FS Selector allowing flat access to all addresses
35; @param[in] GS Selector allowing flat access to all addresses
36; @param[in] SS Selector allowing flat access to all addresses
37;
38; @return None This routine does not return
39;
40global ASM_PFX(_ModuleEntryPoint)
41ASM_PFX(_ModuleEntryPoint):
42
43 ;
44 ; Fill the temporary RAM with the initial stack value.
45 ; The loop below will seed the heap as well, but that's harmless.
46 ;
47 mov eax, FixedPcdGet32 (PcdInitValueInTempStack) ; dword to store
48 mov edi, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) ; base address,
49 ; relative to
50 ; ES
51 mov ecx, FixedPcdGet32 (PcdOvmfSecPeiTempRamSize) / 4 ; dword count
52 cld ; store from base
53 ; up
54 rep stosd
55
56 ;
57 ; Load temporary RAM stack based on PCDs
58 ;
59 %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \
60 FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))
61 mov eax, SEC_TOP_OF_STACK
62 mov esp, eax
63 nop
64
65 ;
66 ; Setup parameters and call SecCoreStartupWithStack
67 ; [esp] return address for call
68 ; [esp+4] BootFirmwareVolumePtr
69 ; [esp+8] TopOfCurrentStack
70 ;
71 push eax
72 push ebp
73 call ASM_PFX(SecCoreStartupWithStack)
74
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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