OS: Ubuntu

Toolchain:GCC48

Issue Description :

  Program received signal SIGSEGV, Segmentation fault.
   at 
/home/pedroa/workspace/orign/edkcrb/MdeModulePkg/Core/Pei/Memory/MemoryServices.c:129
129      Private->MemoryPages.Size = (UINTN) 
(Private->HobList.HandoffInformationTable->EfiMemoryTop -


if the GCC optimization option is used not -O0 so the "rbp" register will be 
used as "general register"

in the SecTemporaryRamSupport function as below, this function will modify the 
rbp (as general register not stack base address pointer)value that result in 
program crash.

ASM_PFX(SecTemporaryRamSupport):
  // Adjust callers %rbp to account for stack move
  subq    %rdx, %rbp     // Calc offset of %rbp in Temp Memory
  addq    %r8,  %rbp     // add in permanent base to offset

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to