From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 CF1F480350 for ; Tue, 7 Mar 2017 08:21:52 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6432481236; Tue, 7 Mar 2017 16:21:53 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-184.phx2.redhat.com [10.3.116.184]) by smtp.corp.redhat.com (Postfix) with ESMTP id B7B2772381; Tue, 7 Mar 2017 16:21:50 +0000 (UTC) To: "Gabriel L. Somlo" , edk2-devel@ml01.01.org References: <1488856465-8965-1-git-send-email-gsomlo@gmail.com> <1488856465-8965-7-git-send-email-gsomlo@gmail.com> Cc: jordan.l.justen@intel.com, reza.jelveh@tuhh.de, agraf@suse.de, kraxel@redhat.com From: Laszlo Ersek Message-ID: <7806b73a-f5a5-a8d5-b695-3c032a1f049b@redhat.com> Date: Tue, 7 Mar 2017 17:21:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1488856465-8965-7-git-send-email-gsomlo@gmail.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 07 Mar 2017 16:21:53 +0000 (UTC) Subject: Re: [RFC PATCH 6/6] OvmfPkg: enable AppleSupport library for Ovmf firmware X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 16:21:53 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 03/07/17 04:14, Gabriel L. Somlo wrote: > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Reza Jelveh > Signed-off-by: Gabriel Somlo > --- > OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 10 ++++++++++ > OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h | 1 + > .../Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + > OvmfPkg/OvmfPkgIa32.dsc | 8 ++++++++ > OvmfPkg/OvmfPkgIa32.fdf | 3 +++ > OvmfPkg/OvmfPkgIa32X64.dsc | 8 ++++++++ > OvmfPkg/OvmfPkgIa32X64.fdf | 3 +++ > OvmfPkg/OvmfPkgX64.dsc | 8 ++++++++ > OvmfPkg/OvmfPkgX64.fdf | 3 +++ We usually split the DSC/FDF changes from module changes. In some cases it might mean splitting a patch like this into three: first add the library resolutions (DSC), then modify the code, then include further driver modules (DSC/FDF). > 9 files changed, 45 insertions(+) > > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > index cc35630..9f6be90 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c > @@ -381,6 +381,11 @@ Returns: > } > > // > + // Initialize AppleSupport library > + // > + InitializeAppleSupport (gImageHandle, gST); > + > + // > // Prevent further changes to LockBoxes or SMRAM. > // > Handle = NULL; > @@ -1474,6 +1479,11 @@ Routine Description: > > RemoveStaleFvFileOptions (); > SetBootOrderFromQemu (); > + > + // > + // Locate and launch Apple's OS X bootloader > + // > + BdsBootApple (); > } So, points I mentioned earlier: - not sure why BdsBootApple() is needed, - whatever calls we add here, they should depend on the new FeaturePCD. > > /** > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h > index ec58efa..3fa7712 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h > @@ -49,6 +49,7 @@ Abstract: > #include > #include > #include > +#include > > #include > #include > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf > index f9e35c9..66d31a5 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf > +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf > @@ -40,6 +40,7 @@ > OvmfPkg/OvmfPkg.dec > > [LibraryClasses] > + AppleSupportLib > BaseLib > MemoryAllocationLib > UefiBootServicesTableLib Please configure your git setup to include the INF/DSC/FDF/DEC section names in the diff hunk headers. For that, please refer to: (specifically the "xfuncname" setting), and to https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-09 > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc > index 0bce56b..da83cba 100644 > --- a/OvmfPkg/OvmfPkgIa32.dsc > +++ b/OvmfPkg/OvmfPkgIa32.dsc > @@ -176,6 +176,8 @@ > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf > XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf > > + AppleSupportLib|OvmfPkg/Library/AppleSupportLib/AppleSupportLib.inf > + Any reason to keep an empty line between XenHypercallLib and AppleSupportLib? > [LibraryClasses.common] > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > > @@ -696,6 +698,12 @@ > MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf > > # > + # Apple Support > + # > + OvmfPkg/FswHfsPlus/FswHfsPlus.inf > + IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf > + Should depend on the new build flag. > + # > # Network Support > # > MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf > index 09c1658..0e00bd9 100644 > --- a/OvmfPkg/OvmfPkgIa32.fdf > +++ b/OvmfPkg/OvmfPkgIa32.fdf > @@ -280,6 +280,9 @@ INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf > INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf > INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf > > +INF OvmfPkg/FswHfsPlus/FswHfsPlus.inf > +INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf > + Should depend on the new build flag, plus a leading comment (since we're adding one to the DSC too) would be welcome. Stopping here. Thanks Laszlo > INF FatPkg/EnhancedFatDxe/Fat.inf > > !ifndef $(USE_OLD_SHELL) > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc > index 56f7ff9..a38dc9b 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.dsc > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc > @@ -181,6 +181,8 @@ > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf > XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf > > + AppleSupportLib|OvmfPkg/Library/AppleSupportLib/AppleSupportLib.inf > + > [LibraryClasses.common] > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > > @@ -705,6 +707,12 @@ > MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf > > # > + # Apple Support > + # > + OvmfPkg/FswHfsPlus/FswHfsPlus.inf > + IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf > + > + # > # Network Support > # > MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf > index 5233314..2bd2d77 100644 > --- a/OvmfPkg/OvmfPkgIa32X64.fdf > +++ b/OvmfPkg/OvmfPkgIa32X64.fdf > @@ -280,6 +280,9 @@ INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf > INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf > INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf > > +INF OvmfPkg/FswHfsPlus/FswHfsPlus.inf > +INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf > + > INF FatPkg/EnhancedFatDxe/Fat.inf > > !ifndef $(USE_OLD_SHELL) > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc > index d0b0b0e..2bff68d 100644 > --- a/OvmfPkg/OvmfPkgX64.dsc > +++ b/OvmfPkg/OvmfPkgX64.dsc > @@ -181,6 +181,8 @@ > OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf > XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf > > + AppleSupportLib|OvmfPkg/Library/AppleSupportLib/AppleSupportLib.inf > + > [LibraryClasses.common] > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > > @@ -703,6 +705,12 @@ > MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf > > # > + # Apple Support > + # > + OvmfPkg/FswHfsPlus/FswHfsPlus.inf > + IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf > + > + # > # Network Support > # > MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf > index 3615010..0165a63 100644 > --- a/OvmfPkg/OvmfPkgX64.fdf > +++ b/OvmfPkg/OvmfPkgX64.fdf > @@ -280,6 +280,9 @@ INF MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf > INF MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf > INF MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf > > +INF OvmfPkg/FswHfsPlus/FswHfsPlus.inf > +INF IntelFrameworkModulePkg/Universal/DataHubDxe/DataHubDxe.inf > + > INF FatPkg/EnhancedFatDxe/Fat.inf > > !ifndef $(USE_OLD_SHELL) >