From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::22b; helo=mail-wr0-x22b.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C15342034C5EE for ; Tue, 21 Nov 2017 09:54:59 -0800 (PST) Received: by mail-wr0-x22b.google.com with SMTP id w95so12136752wrc.2 for ; Tue, 21 Nov 2017 09:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=RyAVPtzp/u358RtcqSlZUL3hN4IARKysfIHG4pGI1ww=; b=BbjL7+Eo553ybWcCUewUji/f32I8SiwgwAjOoVjetkyOGf1nMrX/QnLKBpv0vzvVHH 0LoVF0qStYgi9I296M0iZbxsv3b776OmkqJwVjXgtk++pOYlezTnmetmaROJ3p0I8VC2 rjq8eSF4cy6y1r953o9Tvi1grx0Kub5dWGT6Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=RyAVPtzp/u358RtcqSlZUL3hN4IARKysfIHG4pGI1ww=; b=jOkjDaQsx2ZCSRo8SlAbRdYMhQ6SJzW3AQxv+uUtg60egPbPitMmlUxc8iquDuQkgu mj8OsOa04XtCVHSMKCoAytahEG08R0SwnUyX/4JGuCXPEUPsRA2/nXwltkLNcyOhfcWH dp/x+lncVDX3CH7lOUIRqaTea7GIz5Xx9wjEEK6qjA4GJeOwItu5E+RIUe+4U9ZMTLlt fIfdLCeOuZLKZrZts3GVLJh1tPBIgvqTJqbGX1q8FNKtqthr5W8wCD96O4PUqL8Zwn0n 0+zHGEwr8KD5IYTdSK4223+ZK9BtLPNYnTUSZQMKRALdkp0iGshvZl5FXbACgn0OAe6V /SEg== X-Gm-Message-State: AJaThX6gkqVVR9ck6PmY7RzU3wnJyPrwe90zJcB2h4ckWhdcBb/fM9Fy 2EDHf2rV2n1aY0Mji4DYiGIgcTSGJyw= X-Google-Smtp-Source: AGs4zMZYZ4fZOjITevGAcYEkX7BNA03jBq/tfava55LJ8QpB6KxZM4TRwTA4hsGq+X72encOEqW4OA== X-Received: by 10.223.134.1 with SMTP id 1mr14373354wrv.213.1511287153077; Tue, 21 Nov 2017 09:59:13 -0800 (PST) Received: from [192.168.1.104] ([154.145.25.106]) by smtp.gmail.com with ESMTPSA id 80sm1725763wmk.14.2017.11.21.09.59.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Nov 2017 09:59:12 -0800 (PST) From: Ard Biesheuvel Mime-Version: 1.0 (1.0) Date: Tue, 21 Nov 2017 17:57:36 +0000 Message-Id: <4D4989D0-DC49-40D2-A20A-9B14A0973BA4@linaro.org> References: <20171117160913.17292-1-ard.biesheuvel@linaro.org> <20171117160913.17292-14-ard.biesheuvel@linaro.org> <0795247f-2296-e486-50f5-0ba4caaa150b@redhat.com> Cc: edk2-devel@lists.01.org, leif.lindholm@linaro.org In-Reply-To: <0795247f-2296-e486-50f5-0ba4caaa150b@redhat.com> To: Laszlo Ersek X-Mailer: iPhone Mail (15A432) Subject: Re: [PATCH 13/15] ArmVirtPkg: implement ArmVirtMemInfo PPI, PEIM and library 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: Tue, 21 Nov 2017 17:55:00 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On 21 Nov 2017, at 17:49, Laszlo Ersek wrote: >=20 >> On 11/17/17 17:09, Ard Biesheuvel wrote: >> Equivalent to the PrePi based platforms, this patch implements the >> newly introduced ArmVirtMemInfo library class via a separate PEIM >> and PPI. >>=20 >> The reason is that ArmVirtPlatformLib has populated the ArmPlatformLib >> API function ArmPlatformInitializeSystemMemory () to retrieve memory >> information from the DT, ensuring that it will be present when >> MemoryPeim() is executed. This is a bit of a hack, and someting we >> will need to get rid of if we want to reduce our dependency on >> ArmPlatformLib altogether. >=20 > OK, so whenever I try to look at this code, my brain crashes. This > occasion is no exception. All the more reason to clean it all up; thanks > for doing that. >=20 > So, I guess we are talking about the following call stack. If you agree, > please add it to the commit message (IMO it's OK to exceed the preferred > 74 chars width for such sections): >=20 > ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf [ArmVirtPkg/ArmVirtQemu.d= sc] > InitializeMemory() [ArmPlatformPkg/MemoryIni= tPei/MemoryInitPeim.c] > ArmPlatformInitializeSystemMemory() [ArmVirtPkg/Library/ArmVi= rtPlatformLib/Virt.c] > // > // set PcdSystemMemorySize from the DT > // > MemoryPeim() [ArmVirtPkg/Library/ArmVi= rtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c] > InitMmu() [ArmVirtPkg/Library/ArmVi= rtMemoryInitPeiLib/ArmVirtMemoryInitPeiLib.c] > ArmPlatformGetVirtualMemoryMap() [ArmVirtPkg/Library/ArmVi= rtPlatformLib/VirtMem.c] > // > // consume PcdSystemMemorySize > // >=20 > Here we have two ArmVirtPlatformLib actions: >=20 > - The "PCD consumption" half of that has been moved -- well, copied, for > now -- to QemuVirtMemInfoLib, in patch 12/15. >=20 > - And we are now looking for a new home for the "PCD production" half. >=20 Yes >> Putting this code in a ArmVirtMemInfo library constructor is >> problematic as well, given that the implementation uses other >> libraries, among which PcdLib, and so we need to find another way to >> run it before MemoryPeim() >=20 > Hm, this claim could be true :) , but I'm not totally convinced by the > way you put it. >=20 > First off, I notice that > "ArmVirtPkg/Library/ArmVirtPlatformLib/ArmVirtPlatformLib.inf" does not > spell out PcdLib as a dependency. This is quite bad, because it uses > PCDs. >=20 > However, ultimately, "gEfiPeiPcdPpiGuid" does end up in the final DEPEX > of "MemoryInitPeim.inf", according to the ArmVirtQemu build report file. > This must be due to some of the library instances already pulling in > PeiPcdLib. >=20 > Therefore, if we modify the constructor of QemuVirtMemInfoLib to parse > the DT and to set the PCD, *plus* we spell out PcdLib in the > QemuVirtMemInfoLib INF file, then the ultimate DEPEX for the > MemoryInitPeim module should remain the same. And, the PeiPcdLib > constructor should run before the QemuVirtMemInfoLib constructor > (parsing the DT and setting the PCD). >=20 > What's wrong with this argument? >=20 I guess you=E2=80=99re right. Direct dependencies between libraries with con= structors are handled correctly by the tools, I simply managed to confuse my= self due to the issues with transitive dependencies which you surely remembe= r. >> So instead, create a separate PEIM that encapsulates the >> ArmVirtMemInfo code and exposes it via a PPI. Another ArmVirtMemInfo >> library class implementation is also provided that depexes on the PPI, >> which ensures that the code is called in the correct order. >=20 > I understand what this does, but I find it very complex. >=20 > Sometimes, whenever we want to make sure that a PCD is set dynamically > "no later than" it's consumed by a "common" module outside of > ArmVirtPkg, we create a dedicated library instance (with all the right > library dependencies spelled out in its INF file), set the PCD in its > constructor, and hook it into the consumer module via NULL class > resolution. >=20 > In this case, we have a lib instance that is used through an actual lib > class already, so I would suggest to add a constructor function, and to > spell out the PcdLib dependency in the INF file. >=20 > ... In fact, this is something that I missed in patch 12 -- > QemuVirtMemInfoLib already uses PCDs, but doesn't include "PcdLib" under > [LibraryClasses]. That is a bug inherited from ArmVirtPlatformLib (see > above), and should be fixed. And then we should only need the > constructor. >=20 > What do you think? >=20 I think you=E2=80=99re right. So how do you propose i go about creating two versions of QemuVirtMemInfoLib= , only one of which has a constructor? Share the .c file between two infs in= the same directory? >=20 >>=20 >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> ArmVirtPkg/ArmVirtPkg.dec | 3 + >> ArmVirtPkg/Include/Ppi/ArmVirtMemInfo.h | 48 ++++++++= >> ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.c | 46 ++++++++= >> ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf | 42 +++++++ >> ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.c | 121 ++++++++= ++++++++++++ >> ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf | 60 ++++++++= ++ >> 6 files changed, 320 insertions(+) >>=20 >> diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec >> index 8f656fd2739d..260849dc845c 100644 >> --- a/ArmVirtPkg/ArmVirtPkg.dec >> +++ b/ArmVirtPkg/ArmVirtPkg.dec >> @@ -39,6 +39,9 @@ [Guids.common] >>=20 >> gArmVirtVariableGuid =3D { 0x50bea1e5, 0xa2c5, 0x46e9, { 0x9b, 0x3a, 0= x59, 0x59, 0x65, 0x16, 0xb0, 0x0a } } >>=20 >> +[Ppis] >> + gArmVirtMemInfoPpiGuid =3D { 0x3b060b72, 0x8696, 0x4393, { 0xa8, 0x93,= 0x34, 0x25, 0x1e, 0x3f, 0x8a, 0x6b } } >> + >> [Protocols] >> gFdtClientProtocolGuid =3D { 0xE11FACA0, 0x4710, 0x4C8E, { 0xA7, 0xA2, 0= x01, 0xBA, 0xA2, 0x59, 0x1B, 0x4C } } >>=20 >> diff --git a/ArmVirtPkg/Include/Ppi/ArmVirtMemInfo.h b/ArmVirtPkg/Include= /Ppi/ArmVirtMemInfo.h >> new file mode 100644 >> index 000000000000..46885d02c384 >> --- /dev/null >> +++ b/ArmVirtPkg/Include/Ppi/ArmVirtMemInfo.h >> @@ -0,0 +1,48 @@ >> +/** @file >> + >> + Copyright (c) 2011-2013, ARM Limited. All rights reserved. >> + Copyright (c) 2017, Linaro, Ltd. All rights reserved. >> + >> + This program and the accompanying materials are licensed and made avai= lable >> + under the terms and conditions of the BSD License which accompanies th= is >> + distribution. The full text of the license may be found at >> + http://opensource.org/licenses/bsd-license.php >> + >> + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. >> + >> +**/ >> + >> +#ifndef _ARM_VIRT_MEMINFO_PPI_H_ >> +#define _ARM_VIRT_MEMINFO_PPI_H_ >> + >> +#include >> + >> +#define ARM_VIRT_MEMINFO_PPI_GUID \ >> + { 0x3b060b72, 0x8696, 0x4393, { 0xa8, 0x93, 0x34, 0x25, 0x1e, 0x3f, 0x= 8a, 0x6b } } >> + >> +/** >> + Return the Virtual Memory Map of your platform >> + >> + This Virtual Memory Map is used by MemoryInitPei Module to initialize t= he MMU >> + on your platform. >> + >> + @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTO= R >> + describing a Physical-to-Virtual Mem= ory >> + mapping. This array must be ended by= a >> + zero-filled entry >> + >> +**/ >> +typedef >> +VOID >> +(EFIAPI * GET_MEMORY_MAP) ( >> + OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap >> + ); >> + >> +typedef struct { >> + GET_MEMORY_MAP GetMemoryMap; >> +} ARM_VIRT_MEMINFO_PPI; >> + >> +extern EFI_GUID gArmVirtMemInfoPpiGuid; >> + >> +#endif >> diff --git a/ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.c b/A= rmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.c >> new file mode 100644 >> index 000000000000..ad27b246f980 >> --- /dev/null >> +++ b/ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.c >> @@ -0,0 +1,46 @@ >> +/** @file >> + >> + Copyright (c) 2014-2017, Linaro Limited. All rights reserved. >> + >> + This program and the accompanying materials are licensed and made avai= lable >> + under the terms and conditions of the BSD License which accompanies th= is >> + distribution. The full text of the license may be found at >> + http://opensource.org/licenses/bsd-license.php >> + >> + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. >> + >> +**/ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +/** >> + Return the Virtual Memory Map of your platform >> + >> + This Virtual Memory Map is used by MemoryInitPei Module to initialize t= he MMU >> + on your platform. >> + >> + @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTO= R >> + describing a Physical-to-Virtual Mem= ory >> + mapping. This array must be ended by= a >> + zero-filled entry >> + >> +**/ >> +VOID >> +ArmVirtGetMemoryMap ( >> + OUT ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap >> + ) >> +{ >> + ARM_VIRT_MEMINFO_PPI *MemInfo; >> + EFI_STATUS Status; >> + >> + Status =3D PeiServicesLocatePpi (&gArmVirtMemInfoPpiGuid, 0, NULL, >> + (VOID **)&MemInfo); >> + ASSERT_EFI_ERROR (Status); >> + >> + MemInfo->GetMemoryMap (VirtualMemoryMap); >> +} >> diff --git a/ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf b= /ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf >> new file mode 100644 >> index 000000000000..b661c2f43faf >> --- /dev/null >> +++ b/ArmVirtPkg/Library/PeiVirtMemInfoLib/PeiVirtMemInfoLib.inf >> @@ -0,0 +1,42 @@ >> +#/* @file >> +# >> +# Copyright (c) 2011-2015, ARM Limited. All rights reserved. >> +# Copyright (c) 2014-2017, Linaro Limited. All rights reserved. >> +# >> +# This program and the accompanying materials are licensed and made ava= ilable >> +# under the terms and conditions of the BSD License which accompanies t= his >> +# distribution. The full text of the license may be found at >> +# http://opensource.org/licenses/bsd-license.php >> +# >> +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,= >> +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. >> +# >> +#*/ >> + >> +[Defines] >> + INF_VERSION =3D 0x0001001A >> + BASE_NAME =3D PeiVirtMemInfoLib >> + FILE_GUID =3D 1d7bae0f-9674-4a4b-8d85-9804968cb12= b >> + MODULE_TYPE =3D PEIM >> + VERSION_STRING =3D 1.0 >> + LIBRARY_CLASS =3D ArmVirtMemInfoLib|PEIM >> + >> +[Sources] >> + PeiVirtMemInfoLib.c >> + >> +[Packages] >> + ArmPkg/ArmPkg.dec >> + ArmVirtPkg/ArmVirtPkg.dec >> + MdeModulePkg/MdeModulePkg.dec >> + MdePkg/MdePkg.dec >> + >> +[LibraryClasses] >> + ArmLib >> + DebugLib >> + PeiServicesLib >> + >> +[Ppis] >> + gArmVirtMemInfoPpiGuid >> + >> +[Depex] >> + gArmVirtMemInfoPpiGuid >> diff --git a/ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.c b/ArmVi= rtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.c >> new file mode 100644 >> index 000000000000..90ee552bdba0 >> --- /dev/null >> +++ b/ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.c >> @@ -0,0 +1,121 @@ >> +/**@file >> + >> + Copyright (c) 2017, Linaro, Ltd. All rights reserved.
>> + >> + This program and the accompanying materials are licensed and made avai= lable >> + under the terms and conditions of the BSD License which accompanies th= is >> + distribution. The full text of the license may be found at >> + http://opensource.org/licenses/bsd-license.php >> + >> + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. >> + >> +**/ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +STATIC ARM_VIRT_MEMINFO_PPI mArmVirtMeminfoPpi =3D { >> + ArmVirtGetMemoryMap >> +}; >> + >> +STATIC CONST EFI_PEI_PPI_DESCRIPTOR mArmVirtMeminfoPpiTable =3D { >> + EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, >> + &gArmVirtMemInfoPpiGuid, >> + &mArmVirtMeminfoPpi >> +}; >> + >> +EFI_STATUS >> +EFIAPI >> +QemuVirtMemInfoPeimEntryPoint ( >> + IN EFI_PEI_FILE_HANDLE FileHandle, >> + IN CONST EFI_PEI_SERVICES **PeiServices >> + ) >> +{ >> + VOID *DeviceTreeBase; >> + INT32 Node, Prev; >> + UINT64 NewBase, CurBase; >> + UINT64 NewSize, CurSize; >> + CONST CHAR8 *Type; >> + INT32 Len; >> + CONST UINT64 *RegProp; >> + RETURN_STATUS PcdStatus; >> + >> + NewBase =3D 0; >> + NewSize =3D 0; >> + >> + DeviceTreeBase =3D (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAd= dress); >> + ASSERT (DeviceTreeBase !=3D NULL); >> + >> + // >> + // Make sure we have a valid device tree blob >> + // >> + ASSERT (fdt_check_header (DeviceTreeBase) =3D=3D 0); >> + >> + // >> + // Look for the lowest memory node >> + // >> + for (Prev =3D 0;; Prev =3D Node) { >> + Node =3D fdt_next_node (DeviceTreeBase, Prev, NULL); >> + if (Node < 0) { >> + break; >> + } >> + >> + // >> + // Check for memory node >> + // >> + Type =3D fdt_getprop (DeviceTreeBase, Node, "device_type", &Len); >> + if (Type && AsciiStrnCmp (Type, "memory", Len) =3D=3D 0) { >> + // >> + // Get the 'reg' property of this node. For now, we will assume >> + // two 8 byte quantities for base and size, respectively. >> + // >> + RegProp =3D fdt_getprop (DeviceTreeBase, Node, "reg", &Len); >> + if (RegProp !=3D 0 && Len =3D=3D (2 * sizeof (UINT64))) { >> + >> + CurBase =3D fdt64_to_cpu (ReadUnaligned64 (RegProp)); >> + CurSize =3D fdt64_to_cpu (ReadUnaligned64 (RegProp + 1)); >> + >> + DEBUG ((DEBUG_INFO, "%a: System RAM @ 0x%lx - 0x%lx\n", >> + __FUNCTION__, CurBase, CurBase + CurSize - 1)); >> + >> + if (NewBase > CurBase || NewBase =3D=3D 0) { >> + NewBase =3D CurBase; >> + NewSize =3D CurSize; >> + } >> + } else { >> + DEBUG ((DEBUG_ERROR, "%a: Failed to parse FDT memory node\n", >> + __FUNCTION__)); >> + } >> + } >> + } >> + >> + // >> + // Make sure the start of DRAM matches our expectation >> + // >> + ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) =3D=3D NewBase); >> + PcdStatus =3D PcdSet64S (PcdSystemMemorySize, NewSize); >> + ASSERT_RETURN_ERROR (PcdStatus); >> + >> + // >> + // We need to make sure that the machine we are running on has at leas= t >> + // 128 MB of memory configured, and is currently executing this binary= from >> + // NOR flash. This prevents a device tree image in DRAM from getting >> + // clobbered when our caller installs permanent PEI RAM, before we hav= e a >> + // chance of marking its location as reserved or copy it to a freshly >> + // allocated block in the permanent PEI RAM in the platform PEIM. >> + // >> + ASSERT (NewSize >=3D SIZE_128MB); >> + ASSERT ( >> + (((UINT64)PcdGet64 (PcdFdBaseAddress) + >> + (UINT64)PcdGet32 (PcdFdSize)) <=3D NewBase) || >> + ((UINT64)PcdGet64 (PcdFdBaseAddress) >=3D (NewBase + NewSize))); >> + >> + return PeiServicesInstallPpi (&mArmVirtMeminfoPpiTable); >> +} >> diff --git a/ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf b/Arm= VirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf >> new file mode 100644 >> index 000000000000..ac91e065be57 >> --- /dev/null >> +++ b/ArmVirtPkg/QemuVirtMemInfoPeim/QemuVirtMemInfoPeim.inf >> @@ -0,0 +1,60 @@ >> +## @file >> +# >> +# Copyright (c) 2017, Linaro, Ltd. All rights reserved.
>> +# >> +# This program and the accompanying materials are licensed and made ava= ilable >> +# under the terms and conditions of the BSD License which accompanies t= his >> +# distribution. The full text of the license may be found at >> +# http://opensource.org/licenses/bsd-license.php >> +# >> +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,= >> +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. >> +# >> +## >> + >> +[Defines] >> + INF_VERSION =3D 0x0001001A >> + BASE_NAME =3D QemuVirtMemInfoPeim >> + FILE_GUID =3D 91da13af-d0ff-4810-b9b9-b095a9ee6b0= 9 >> + MODULE_TYPE =3D PEIM >> + VERSION_STRING =3D 1.0 >> + ENTRY_POINT =3D QemuVirtMemInfoPeimEntryPoint >> + >> +# >> +# The following information is for reference only and not required by th= e build tools. >> +# >> +# VALID_ARCHITECTURES =3D ARM AARCH64 >> +# >> + >> +[Sources] >> + QemuVirtMemInfoPeim.c >> + >> +[Packages] >> + ArmPkg/ArmPkg.dec >> + ArmVirtPkg/ArmVirtPkg.dec >> + EmbeddedPkg/EmbeddedPkg.dec >> + MdePkg/MdePkg.dec >> + >> +[LibraryClasses] >> + ArmLib >> + ArmVirtMemInfoLib >> + DebugLib >> + FdtLib >> + PeimEntryPoint >> + PeiServicesLib >> + >> +[Pcd] >> + gArmTokenSpaceGuid.PcdSystemMemorySize >> + >> +[Ppis] >> + gArmVirtMemInfoPpiGuid >> + >> +[FixedPcd] >> + gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> + gArmTokenSpaceGuid.PcdSystemMemoryBase >> + gArmTokenSpaceGuid.PcdFdBaseAddress >> + gArmTokenSpaceGuid.PcdFdSize >> + gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize >> + >> +[Depex] >> + TRUE >>=20 >=20