From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web11.8011.1588717172306850183 for ; Tue, 05 May 2020 15:19:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A7KMLnry; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588717171; 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=Pxid9jcOs83tv/o45/zv15y/trsTvqUi3mjYujG5FNI=; b=A7KMLnry5zyPa8v26psgeEZKFm/X57kQd24aG1xcCyqUZafV7dvPfk3BD5+rQ0+C0EZ86n uSlSnmtFI3A+fgjkFAXgb3o1W5728QkmzfAyvAt0JM6XfqMsx9u/OSQN8LySnxUJ/Wu+Y/ ugdFabwic96V+3L4GxTfLvdep6NXktY= 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-417-5CuOZpskOwClt0zWNl0cNQ-1; Tue, 05 May 2020 18:19:22 -0400 X-MC-Unique: 5CuOZpskOwClt0zWNl0cNQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45603BFC3; Tue, 5 May 2020 22:19:20 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-134.ams2.redhat.com [10.36.114.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CFDD6249A; Tue, 5 May 2020 22:19:17 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 2/4] UefiPayloadPkg: Use toolchain appropriate CpuExceptionHandlerLib To: devel@edk2.groups.io, thomas.lendacky@amd.com Cc: Jordan Justen , Ard Biesheuvel , Liming Gao , Eric Dong , Ray Ni , Brijesh Singh , Anthony Perard , Benjamin You , Guo Dong , Julien Grall , Maurice Ma , Andrew Fish References: From: "Laszlo Ersek" Message-ID: <6d4c885a-9191-0ef0-b33b-96cf74c11314@redhat.com> Date: Wed, 6 May 2020 00:19:16 +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.15 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/01/20 22:17, Lendacky, Thomas wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2340 > > Use the XCODE5 CpuExceptionHandlerLib library in place of the standard > library when building with the XCODE5 toolchain. The XCODE5 version of > the library performs binary patching and should only be used when building > with the XCODE5 toolchain. > > Cc: Maurice Ma > Cc: Guo Dong > Cc: Benjamin You > Cc: Liming Gao > Signed-off-by: Tom Lendacky > --- > UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > index d52945442e0e..2bf7aafd8c77 100644 > --- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > +++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc > @@ -232,7 +232,11 @@ [LibraryClasses.common.DXE_CORE] > !if $(SOURCE_DEBUG_ENABLE) > DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf > !endif > +!if $(TOOL_CHAIN_TAG) != "XCODE5" > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf > +!else > + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf > +!endif > > [LibraryClasses.common.DXE_DRIVER] > PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf > @@ -243,7 +247,11 @@ [LibraryClasses.common.DXE_DRIVER] > !if $(SOURCE_DEBUG_ENABLE) > DebugAgentLib|SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.inf > !endif > +!if $(TOOL_CHAIN_TAG) != "XCODE5" > CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeCpuExceptionHandlerLib.inf > +!else > + CpuExceptionHandlerLib|UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf > +!endif > MpInitLib|UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf > > [LibraryClasses.common.DXE_RUNTIME_DRIVER] > This patch should be dropped, as it only modifies the lib class resolutions for DXE_CORE and DXE_DRIVER modules; in those modules, the self-patching is harmless. Thanks Laszlo