From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=jordan.l.justen@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6DBAB2194D3AE for ; Sun, 18 Nov 2018 01:27:04 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Nov 2018 01:27:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,247,1539673200"; d="scan'208";a="280939312" Received: from dtan-mobl.amr.corp.intel.com (HELO localhost) ([10.254.55.211]) by fmsmga005.fm.intel.com with ESMTP; 18 Nov 2018 01:27:03 -0800 MIME-Version: 1.0 To: afish@apple.com, jordan.l.justen@intel.com, ruiyu.ni@intel.com, Liu Yu Message-ID: <154253322290.3729.10762860453718631884@jljusten-skl> From: Jordan Justen In-Reply-To: Cc: "edk2-devel@lists.01.org" References: User-Agent: alot/0.7 Date: Sun, 18 Nov 2018 01:27:03 -0800 Subject: Re: EmulatorPkg Unix Host Segmentation fault. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Nov 2018 09:27:05 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2018-11-17 20:51:11, Liu Yu wrote: > OS: Ubuntu > = > Toolchain:GCC48 I don't have gcc-4.8, so I couldn't reproduce the issue, but I wonder if this branch can fix the issue for you? https://github.com/jljusten/edk2/tree/emulator-temp-ram You can fetch this branch locally to a branch named `test` with a command like this: $ git fetch --no-tags https://github.com/jljusten/edk2.git emulator-temp-ra= m:test Then checkout the `test` branch to try it. First, there is some patches to cleanup Sec, but then I added a patch: 53a432e149 "EmulatorPkg/Sec: Disable optimizations for TemporaryRamMigratio= n function" Which I hope might help in your case. -Jordan > = > Issue Description : > = > Program received signal SIGSEGV, Segmentation fault. > at /home/pedroa/workspace/orign/edkcrb/MdeModulePkg/Core/Pei/Memory/Me= moryServices.c:129 > 129 Private->MemoryPages.Size =3D (UINTN) (Private->HobList.HandoffI= nformationTable->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 modif= y the rbp (as general register not stack base address pointer)value that re= sult 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