From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 BD1342035D0E6 for ; Fri, 10 Nov 2017 07:45:16 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7621780476; Fri, 10 Nov 2017 15:49:19 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-145.rdu2.redhat.com [10.10.120.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id 364B05D9C8; Fri, 10 Nov 2017 15:49:18 +0000 (UTC) From: Laszlo Ersek To: edk2-devel-01 Cc: Ard Biesheuvel , Jordan Justen , Ruiyu Ni Date: Fri, 10 Nov 2017 16:49:05 +0100 Message-Id: <20171110154908.306-2-lersek@redhat.com> In-Reply-To: <20171110154908.306-1-lersek@redhat.com> References: <20171110154908.306-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 10 Nov 2017 15:49:19 +0000 (UTC) Subject: [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: Fri, 10 Nov 2017 15:45:16 -0000 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.nasm 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 nop ; @@ -50,7 +50,7 @@ ASM_PFX(_ModuleEntryPoint): ; [esp+4] BootFirmwareVolumePtr ; [esp+8] TopOfCurrentStack ; - push eax + push ebx push ebp call ASM_PFX(SecCoreStartupWithStack) -- 2.14.1.3.gb7cf6e02401b