; @param[in] EAX 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] EBP 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 eax, FixedPcdGet32 (PcdInitValueInTempStack) ; dword to store\r
+ mov edi, FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) ; base address,\r
+ ; relative to\r
+ ; ES\r
+ mov ecx, FixedPcdGet32 (PcdOvmfSecPeiTempRamSize) / 4 ; dword count\r
+ cld ; store from base\r
+ ; up\r
+ rep stosd\r
+\r
;\r
; Load temporary RAM stack based on PCDs\r
;\r