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.100; helo=mga07.intel.com; envelope-from=jordan.l.justen@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 DD3D1220757DF for ; Mon, 13 Nov 2017 10:04:46 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2017 10:08:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,389,1505804400"; d="scan'208";a="1078586" Received: from sacolema-mobl2.amr.corp.intel.com (HELO localhost) ([10.254.117.1]) by fmsmga004.fm.intel.com with ESMTP; 13 Nov 2017 10:08:52 -0800 MIME-Version: 1.0 To: Laszlo Ersek , edk2-devel-01 Message-ID: <151059653162.20614.10956585129107897594@jljusten-skl> From: Jordan Justen In-Reply-To: <20171110154908.306-2-lersek@redhat.com> Cc: Ard Biesheuvel , Ruiyu Ni References: <20171110154908.306-1-lersek@redhat.com> <20171110154908.306-2-lersek@redhat.com> User-Agent: alot/0.6 Date: Mon, 13 Nov 2017 10:08:51 -0800 Subject: Re: [PATCH 1/4] OvmfPkg/Sec/Ia32: free up EAX for other uses while setting up the stack X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2017 18:04:47 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2017-11-10 07:49:05, Laszlo Ersek wrote: > Currently EAX is used as an intermediary in setting ESP to > SEC_TOP_OF_STACK, and in passing SEC_TOP_OF_STACK to > SecCoreStartupWithStack() as the "TopOfCurrentStack" argument. > = > In a later patch we'll use EAX differently, so replace it with EBX under > the current use. > = > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Laszlo Ersek > --- > OvmfPkg/Sec/Ia32/SecEntry.nasm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > = > diff --git a/OvmfPkg/Sec/Ia32/SecEntry.nasm b/OvmfPkg/Sec/Ia32/SecEntry.n= asm > index 7fee1c2b2e4f..54d074e621f6 100644 > --- a/OvmfPkg/Sec/Ia32/SecEntry.nasm > +++ b/OvmfPkg/Sec/Ia32/SecEntry.nasm > @@ -40,8 +40,8 @@ ASM_PFX(_ModuleEntryPoint): > ; > %define SEC_TOP_OF_STACK (FixedPcdGet32 (PcdOvmfSecPeiTempRamBase) += \ > FixedPcdGet32 (PcdOvmfSecPeiTempRamSize)) > - mov eax, SEC_TOP_OF_STACK > - mov esp, eax > + mov ebx, SEC_TOP_OF_STACK > + mov esp, ebx Can't you initialize the temp RAM before this code? -Jordan