From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web11.1950.1588791869652661913 for ; Wed, 06 May 2020 12:04:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LJ5tJQtj; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588791868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D0CECYkgyA4GprZzZ229LFuYjTmrZ3DfOF7YMTfGbUk=; b=LJ5tJQtjbQwJqM8EXZpMbYoFDWlEyK2/Z7//sgJtlh26jEvafNIYO8wH2oa+lTvxb4ucaK bl2cJB8z0wcuw4jdyCgbZki5fbVuQX/73710027sT91CidiF5Xo1Pq90FcWINVrln/ibP8 alNG411JLXMPOgFwI6EHP4ygIL2P1S8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-261-9yo9DfwHMq2rGAHPJD_RYA-1; Wed, 06 May 2020 15:04:26 -0400 X-MC-Unique: 9yo9DfwHMq2rGAHPJD_RYA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A6BC7107ACF6; Wed, 6 May 2020 19:04:24 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-227.ams2.redhat.com [10.36.112.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 032695C3FA; Wed, 6 May 2020 19:04:21 +0000 (UTC) Subject: Re: [PATCH v2 2/3] OvmfPkg: Use toolchain appropriate CpuExceptionHandlerLib To: Tom Lendacky , devel@edk2.groups.io Cc: Jordan Justen , Ard Biesheuvel , Liming Gao , Eric Dong , Ray Ni , Anthony Perard , Julien Grall , Brijesh Singh , Andrew Fish , Ard Biesheuvel References: From: "Laszlo Ersek" Message-ID: <2e51ca65-a8a1-e83f-b1a5-71c1762ddfc2@redhat.com> Date: Wed, 6 May 2020 21:04:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 05/06/20 18:33, Tom Lendacky wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2340 > > During the SEC phase, use the XCODE5 CpuExceptionHandlerLib library in > place of the standard library when building with the XCODE5 toolchain. > The SEC XCODE5 version of the library performs binary patching and should > only be used when building with the XCODE5 toolchain. > > Cc: Jordan Justen > Cc: Laszlo Ersek > Cc: Ard Biesheuvel > Cc: Anthony Perard > Cc: Julien Grall > Cc: Liming Gao > Signed-off-by: Tom Lendacky > --- > OvmfPkg/OvmfPkgIa32.dsc | 4 ++++ > OvmfPkg/OvmfPkgIa32X64.dsc | 4 ++++ > OvmfPkg/OvmfPkgX64.dsc | 4 ++++ > OvmfPkg/OvmfXen.dsc | 4 ++++ > 4 files changed, 16 insertions(+) > > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 7c8b51f43b66..41ac3202961b 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -246,7 +246,11 @@ [LibraryClasses.common.SEC] > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > +!if $(TOOL_CHAIN_TAG) == "XCODE5" > + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf > +!else > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf > +!endif > > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index a0596c44168c..c2f11aee2cec 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -250,7 +250,11 @@ [LibraryClasses.common.SEC] > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > +!if $(TOOL_CHAIN_TAG) == "XCODE5" > + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf > +!else > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf > +!endif > > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index 2e764b6b7233..643e6041ad53 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -250,7 +250,11 @@ [LibraryClasses.common.SEC] > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > +!if $(TOOL_CHAIN_TAG) == "XCODE5" > + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf > +!else > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf > +!endif > > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > diff --git a/OvmfPkg/OvmfXen.dsc b/OvmfPkg/OvmfXen.dsc > index 8b3615e0b07e..143dc6d5a766 100644 > --- a/OvmfPkg/OvmfXen.dsc > +++ b/OvmfPkg/OvmfXen.dsc > @@ -228,7 +228,11 @@ [LibraryClasses.common.SEC] > PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf > PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf > MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf > +!if $(TOOL_CHAIN_TAG) == "XCODE5" > + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf > +!else > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib.inf > +!endif > > [LibraryClasses.common.PEI_CORE] > HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf > Reviewed-by: Laszlo Ersek