; @param[in] RAX Initial value of the EAX register (BIST: Built-in Self Test)\r
; @param[in] DI 'BP': boot-strap processor, or 'AP': application processor\r
; @param[in] RBP Pointer to the start of the Boot Firmware Volume\r
+; @param[in] DS Selector allowing flat access to all addresses\r
+; @param[in] ES Selector allowing flat access to all addresses\r
+; @param[in] FS Selector allowing flat access to all addresses\r
+; @param[in] GS Selector allowing flat access to all addresses\r
+; @param[in] SS Selector allowing flat access to all addresses\r
;\r
; @return None This routine does not return\r
;\r
global ASM_PFX(_ModuleEntryPoint)\r
ASM_PFX(_ModuleEntryPoint):\r
\r
+ ;\r
+ ; Fill the temporary RAM with the initial stack value.\r
+ ; The loop below will seed the heap as well, but that's harmless.\r
+ ;\r
+ mov rax, (FixedPcdGet32 (PcdInitValueInTempStack) << 32) | FixedPcdGet32 (PcdInitValueInTempStack)\r
+ ; qword to store\r
+ mov rdi, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) ; base address,\r
+ ; relative to\r
+ ; ES\r
+ mov rcx, FixedPcdGet32 (PcdOvmfSecPeiTempRamSize) / 8 ; qword count\r
+ cld ; store from base\r
+ ; up\r
+ rep stosq\r
+\r
;\r
; Load temporary RAM stack based on PCDs\r
;\r