VirtualBox

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

最後變更 在這個檔案從99396是 80721,由 vboxsync 提交於 5 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.4 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
14DEFAULT REL
15SECTION .text
16
17extern ASM_PFX(SecCoreStartupWithStack)
18
19;
20; SecCore Entry Point
21;
22; Processor is in flat protected mode
23;
24; @param[in] RAX Initial value of the EAX register (BIST: Built-in Self Test)
25; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor
26; @param[in] RBP Pointer to the start of the Boot Firmware Volume
27; @param[in] DS Selector allowing flat access to all addresses
28; @param[in] ES Selector allowing flat access to all addresses
29; @param[in] FS Selector allowing flat access to all addresses
30; @param[in] GS Selector allowing flat access to all addresses
31; @param[in] SS Selector allowing flat access to all addresses
32;
33; @return None This routine does not return
34;
35global ASM_PFX(_ModuleEntryPoint)
36ASM_PFX(_ModuleEntryPoint):
37
38 ;
39 ; Fill the temporary RAM with the initial stack value.
40 ; The loop below will seed the heap as well, but that's harmless.
41 ;
42 mov rax, (FixedPcdGet32 (PcdInitValueInTempStack) << 32) | FixedPcdGet32 (PcdInitValueInTempStack)
43 ; qword to store
44 mov rdi, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) ; base address,
45 ; relative to
46 ; ES
47 mov rcx, FixedPcdGet32 (PcdOvmfSecPeiTempRamSize) / 8 ; qword count
48 cld ; store from base
49 ; up
50 rep stosq
51
52 ;
53 ; Load temporary RAM stack based on PCDs
54 ;
55 %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) + \
56 FixedPcdGet32 (PcdOvmfSecPeiTempRamSize))
57 mov rsp, SEC_TOP_OF_STACK
58 nop
59
60 ;
61 ; Setup parameters and call SecCoreStartupWithStack
62 ; rcx: BootFirmwareVolumePtr
63 ; rdx: TopOfCurrentStack
64 ;
65 mov rcx, rbp
66 mov rdx, rsp
67 sub rsp, 0x20
68 call ASM_PFX(SecCoreStartupWithStack)
69
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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