From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C53B97803CF for ; Tue, 14 Nov 2023 01:41:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2ZUV0YeoI65s+ZDIM+ZZ0rZpMMSlHXRTiRIVnFmmLUM=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1699926082; v=1; b=PkcL8xr4lmdv7Ja8PSv6tVU7dMyBQvkewJvclGbipu2Oh9fr4Sth+EC7uCgM/JpyJOQwyu2s hiB+QlLkDg+PUkw1Vx+GwjXGN8E8Oxc9uXdMStS3mUe+7b6mEEihYX7w+stn0OMY31sK28P+Oug Zr94AgUigiwC+GmU8m90G9Ew= X-Received: by 127.0.0.2 with SMTP id ZbiEYY7687511xh5kRFnowpJ; Mon, 13 Nov 2023 17:41:22 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.3842.1699926080195268813 for ; Mon, 13 Nov 2023 17:41:21 -0800 X-Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8Axueo70FJlTss5AA--.38277S3; Tue, 14 Nov 2023 09:41:16 +0800 (CST) X-Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxfNw20FJldWdBAA--.12445S3; Tue, 14 Nov 2023 09:41:10 +0800 (CST) Message-ID: Date: Tue, 14 Nov 2023 09:41:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH v2 16/30] ArmVirtPkg: Move PCD of FDT base address and FDT padding to OvmfPkg To: devel@edk2.groups.io, sami.mujawar@arm.com Cc: Ard Biesheuvel , Leif Lindholm , Gerd Hoffmann , Jiewen Yao , Jordan Justen , "nd@arm.com" References: <20231106032521.2251143-1-lichao@loongson.cn> <20231106032912.2285510-1-lichao@loongson.cn> From: "Chao Li" In-Reply-To: X-CM-TRANSID: AQAAf8CxfNw20FJldWdBAA--.12445S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAOCGVRh6kblABFsX X-Coremail-Antispam: 1Uk129KBj9fXoW3Zry8GFyrCr15XFWDZr4rCrX_yoW8AFyxZo WDKr109F45G343uw40gw4DGwsxJayaq39rWw1kXF9rJr4jqr47A34UJrZ5G3ykJr1IgrZr ury8Ja47JF9rtF97l-sFpf9Il3svdjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8wcxFpf 9Il3svdxBIdaVrnUUv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUU5M7kC6x804xWl 14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwV WUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE 14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j6F4UM28EF7xvwVC2z280aV AFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVCY1x0267AKxVW8JVW8Jr1le2I262IYc4CY6c8I j28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAv7VC0I7IYx2IY67AKxVWUXVWUAw Av7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx8G jcxK6IxK0xIIj40E5I8CrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8Jw C20s026c02F40E14v26r106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAF wI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjx v20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2 jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2KfnxnUUI43 ZEXa7IU1LZ23UUUUU== Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: HgrZMgoSBlUdv9vosQiJsGhAx7686176AA= Content-Type: multipart/alternative; boundary="------------M0YGjk6tbobzRA9sFrVPNMvL" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PkcL8xr4; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --------------M0YGjk6tbobzRA9sFrVPNMvL Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Sami, Ok, I will fix them in V3 and follow your suggestions, thanks for the review. Thanks, Chao On 2023/11/13 19:46, Sami Mujawar wrote: > Hi Chao, > > Thank you for this patch. > > I have a few suggestions marked inline as [SAMI]. > > Otherwise this patch looks good to me. > > With those fixed, > > Reviewed-by: Sami Mujawar > > Regards, > > Sami Mujawar > > On 06/11/2023 03:29 am, Chao Li wrote: >> Moved PcdDeviceTreeInitialBaseAddress and PcdDeviceTreeAllocationPadding >> to OvmfPkg for easier use by other architectures. >> >> Build-tested only (with "ArmVirtQemu.dsc"). >> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 >> >> Cc: Ard Biesheuvel >> Cc: Leif Lindholm >> Cc: Sami Mujawar >> Cc: Gerd Hoffmann >> Cc: Jiewen Yao >> Cc: Jordan Justen >> Signed-off-by: Chao Li >> --- >>   ArmVirtPkg/ArmVirtCloudHv.dsc                     |  2 +- >>   ArmVirtPkg/ArmVirtKvmTool.dsc                     |  2 +- >>   ArmVirtPkg/ArmVirtPkg.dec                         | 14 -------------- >>   ArmVirtPkg/ArmVirtQemu.dsc                        |  2 +- >>   ArmVirtPkg/ArmVirtQemuKernel.dsc                  |  2 +- >>   ArmVirtPkg/ArmVirtXen.dsc                         |  2 +- >>   .../ArmVirtPsciResetSystemPeiLib.inf              |  3 ++- >>   .../CloudHvVirtMemInfoPeiLib.inf                  |  3 ++- >>   .../DebugLibFdtPL011UartFlash.inf                 |  3 ++- >>   .../EarlyFdt16550SerialPortHookLib.inf            |  3 ++- >>   .../EarlyFdtPL011SerialPortLib.inf                |  3 ++- >>   .../KvmtoolPlatformPeiLib.inf                     |  5 +++-- >>   .../Library/PlatformPeiLib/PlatformPeiLib.inf     | 10 +++++----- >>   .../QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf  |  3 ++- >>   .../PrePi/ArmVirtPrePiUniCoreRelocatable.inf      |  3 ++- >>   OvmfPkg/OvmfPkg.dec                               | 15 +++++++++++++++ >>   16 files changed, 42 insertions(+), 33 deletions(-) >> >> diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc >> b/ArmVirtPkg/ArmVirtCloudHv.dsc >> index 2cb89ce10c..76c0d28544 100644 >> --- a/ArmVirtPkg/ArmVirtCloudHv.dsc >> +++ b/ArmVirtPkg/ArmVirtCloudHv.dsc >> @@ -129,7 +129,7 @@ >>     gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000 >>       # initial location of the device tree blob passed by Cloud >> Hypervisor -- base of DRAM >> - gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000 >> + gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000 >> gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE >>     gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, >> 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, >> 0xf4, 0x66, 0x23, 0x31 } >> diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc >> b/ArmVirtPkg/ArmVirtKvmTool.dsc >> index f50d53bf15..cac4fe06d3 100644 >> --- a/ArmVirtPkg/ArmVirtKvmTool.dsc >> +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc >> @@ -179,7 +179,7 @@ >>     # We are booting from RAM using the Linux kernel boot protocol, >>     # x0 will point to the DTB image in memory. >>     # >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0 >> + gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0 >>       gArmTokenSpaceGuid.PcdFdBaseAddress|0x0 >>     gArmTokenSpaceGuid.PcdFvBaseAddress|0x0 >> diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec >> index 0f2d787327..2451644844 100644 >> --- a/ArmVirtPkg/ArmVirtPkg.dec >> +++ b/ArmVirtPkg/ArmVirtPkg.dec >> @@ -42,20 +42,6 @@ >> gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|FALSE|BOOLEAN|0x00000004 >>     [PcdsFixedAtBuild, PcdsPatchableInModule] >> -  # >> -  # This is the physical address where the device tree is expected >> to be stored >> -  # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, >> so that we >> -  # can do a first pass over the device tree in the SEC phase to >> discover the >> -  # UART base address. >> -  # >> - >> gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0|UINT64|0x00000001 >> - >> -  # >> -  # Padding in bytes to add to the device tree allocation, so that >> the DTB can >> -  # be modified in place (default: 256 bytes) >> -  # >> - >> gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding|256|UINT32|0x00000002 >> - >>     # >>     # Binary representation of the GUID that determines the terminal >> type. The >>     # size must be exactly 16 bytes. The default value corresponds to >> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc >> index 30e3cfc8b9..cf306cac08 100644 >> --- a/ArmVirtPkg/ArmVirtQemu.dsc >> +++ b/ArmVirtPkg/ArmVirtQemu.dsc >> @@ -201,7 +201,7 @@ >>     gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000 >>       # initial location of the device tree blob passed by QEMU -- >> base of DRAM >> - gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000 >> + gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000 >> gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE >>     gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, >> 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, >> 0xf4, 0x66, 0x23, 0x31 } >> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc >> b/ArmVirtPkg/ArmVirtQemuKernel.dsc >> index b50f8e84a3..c0d079e28d 100644 >> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc >> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc >> @@ -198,7 +198,7 @@ >>     # Define a default initial address for the device tree. >>     # Ignored if x0 != 0 at entry. >>     # >> - gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000 >> + gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000 >>       gArmTokenSpaceGuid.PcdFdBaseAddress|0x0 >>     gArmTokenSpaceGuid.PcdFvBaseAddress|0x0 >> diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc >> index f0d15b823b..5809832e66 100644 >> --- a/ArmVirtPkg/ArmVirtXen.dsc >> +++ b/ArmVirtPkg/ArmVirtXen.dsc >> @@ -115,7 +115,7 @@ >>     # >>     gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0 >>     gArmTokenSpaceGuid.PcdSystemMemorySize|0x0 >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0 >> + gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0 >>       gArmTokenSpaceGuid.PcdFdBaseAddress|0x0 >>     gArmTokenSpaceGuid.PcdFvBaseAddress|0x0 >> diff --git >> a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf >> b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf >> >> index 3a65706e8d..79217d296d 100644 >> --- >> a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf >> +++ >> b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf >> @@ -26,6 +26,7 @@ >>     EmbeddedPkg/EmbeddedPkg.dec >>     MdeModulePkg/MdeModulePkg.dec >>     MdePkg/MdePkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [LibraryClasses] >>     ArmSmcLib >> @@ -36,4 +37,4 @@ >>     HobLib >>     [Pcd] >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> diff --git >> a/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf >> b/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf >> index 666b5d9711..6df26ccd64 100644 >> --- >> a/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf >> +++ >> b/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf >> @@ -26,6 +26,7 @@ >>     EmbeddedPkg/EmbeddedPkg.dec >>     MdeModulePkg/MdeModulePkg.dec >>     MdePkg/MdePkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [LibraryClasses] >>     ArmLib >> @@ -44,4 +45,4 @@ >>   [FixedPcd] >>     gArmTokenSpaceGuid.PcdFdSize >>     gArmTokenSpaceGuid.PcdFvSize >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> diff --git >> a/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf >> b/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf >> index 7870ca2ae4..f35a0913f0 100644 >> --- >> a/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf >> +++ >> b/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf >> @@ -30,6 +30,7 @@ >>     ArmPlatformPkg/ArmPlatformPkg.dec >>     ArmVirtPkg/ArmVirtPkg.dec >>     MdePkg/MdePkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [LibraryClasses] >>     BaseLib >> @@ -41,7 +42,7 @@ >>     PrintLib >>     [Pcd] >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress # Flash.c >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress # Flash.c > [SAMI] Please reorder this section in alphabetical order. >> gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue >>     gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask >>     gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel >> diff --git >> a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf >> b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf >> >> index 22aba53d9b..3e2303b7f4 100644 >> --- >> a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf >> +++ >> b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf >> @@ -29,7 +29,8 @@ >>     ArmVirtPkg/ArmVirtPkg.dec >>     MdeModulePkg/MdeModulePkg.dec >>     MdePkg/MdePkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [Pcd] >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >>     gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase >> diff --git >> a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf >> b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf >> >> index f47692f06a..e677f1d9e7 100644 >> --- >> a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf >> +++ >> b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf >> @@ -28,9 +28,10 @@ >>     MdePkg/MdePkg.dec >>     ArmPlatformPkg/ArmPlatformPkg.dec >>     ArmVirtPkg/ArmVirtPkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [Pcd] >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >>     [FixedPcd] >>     gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate >> diff --git >> a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf >> b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf >> index f201aee50c..78c9d9d764 100644 >> --- a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf >> +++ b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf >> @@ -24,6 +24,7 @@ >>     EmbeddedPkg/EmbeddedPkg.dec >>     MdeModulePkg/MdeModulePkg.dec >>     MdePkg/MdePkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [LibraryClasses] >>     DebugLib >> @@ -34,11 +35,11 @@ >>     [FixedPcd] >>     gArmTokenSpaceGuid.PcdFvSize >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding >>     [Pcd] >>     gArmTokenSpaceGuid.PcdFvBaseAddress >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress > [SAMI] Please reorder in alphabetical order. >> gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase >>     [Guids] >> diff --git a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf >> b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf >> index b867d8bb89..0584a53ee3 100644 >> --- a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf >> +++ b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf >> @@ -41,16 +41,16 @@ >>     [FixedPcd] >>     gArmTokenSpaceGuid.PcdFvSize >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding >>     [Pcd] >>     gArmTokenSpaceGuid.PcdFvBaseAddress >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> -  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress         ## >> SOMETIMES_PRODUCES >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress ## SOMETIMES_PRODUCES > [SAMI] Please reorder in alphabetical order. >>     [Ppis] >> -  gOvmfTpmDiscoveredPpiGuid                               ## >> SOMETIMES_PRODUCES >> -  gPeiTpmInitializationDonePpiGuid                        ## >> SOMETIMES_PRODUCES >> +  gOvmfTpmDiscoveredPpiGuid ## SOMETIMES_PRODUCES >> +  gPeiTpmInitializationDonePpiGuid ## SOMETIMES_PRODUCES >>     [Guids] >>     gEarlyPL011BaseAddressGuid >> diff --git >> a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf >> b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf >> index f045e39a41..76c3c5d3c8 100644 >> --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf >> +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf >> @@ -26,6 +26,7 @@ >>     EmbeddedPkg/EmbeddedPkg.dec >>     MdeModulePkg/MdeModulePkg.dec >>     MdePkg/MdePkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     [LibraryClasses] >>     ArmLib >> @@ -44,4 +45,4 @@ >>     gArmTokenSpaceGuid.PcdSystemMemorySize >>     gArmTokenSpaceGuid.PcdFdSize >>     gArmTokenSpaceGuid.PcdFvSize >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf >> b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf >> index 7edf501808..691fc26350 100755 >> --- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf >> +++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf >> @@ -32,6 +32,7 @@ >>     MdePkg/MdePkg.dec >>     MdeModulePkg/MdeModulePkg.dec >>     EmbeddedPkg/EmbeddedPkg.dec >> +  OvmfPkg/OvmfPkg.dec >>     ArmPkg/ArmPkg.dec >>     ArmPlatformPkg/ArmPlatformPkg.dec >>     ArmVirtPkg/ArmVirtPkg.dec > [SAMI] I understad this section is not ordered correctly. But can you > can place the OvmfPkg/OvmfPkg.dec towards the end of this section, > please? >> @@ -93,6 +94,6 @@ >>   [Pcd] >>     gArmTokenSpaceGuid.PcdSystemMemoryBase >>     gArmTokenSpaceGuid.PcdSystemMemorySize >> -  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >> +  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress >>     gArmTokenSpaceGuid.PcdFdBaseAddress >>     gArmTokenSpaceGuid.PcdFvBaseAddress > [SAMI] Please reorder in alphabetical order. >> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec >> index e3861e5c1b..89091e8bf1 100644 >> --- a/OvmfPkg/OvmfPkg.dec >> +++ b/OvmfPkg/OvmfPkg.dec >> @@ -481,6 +481,21 @@ >>     # >>     gUefiOvmfPkgTokenSpaceGuid.PcdForceNoAcpi|0x0|BOOLEAN|0x69 >>   +[PcdsFixedAtBuild, PcdsPatchableInModule] >> +  # >> +  # This is the physical address where the device tree is expected >> to be stored >> +  # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, >> so that we >> +  # can do a first pass over the device tree in the SEC phase to >> discover the >> +  # UART base address. >> +  # >> + >> gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0|UINT64|0x6e >> + >> +  # >> +  # Padding in bytes to add to the device tree allocation, so that >> the DTB can >> +  # be modified in place (default: 256 bytes) >> +  # >> + >> gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding|256|UINT32|0x6f >> + >>   [PcdsFeatureFlag] >> gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0x1c >> gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN|0x1d > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111185): https://edk2.groups.io/g/devel/message/111185 Mute This Topic: https://groups.io/mt/102413878/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- --------------M0YGjk6tbobzRA9sFrVPNMvL Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Sami,

Ok, I will fix them in V3 and follow your suggestions, thanks for the review.


Thanks,
Chao
On 2023/11/13 19:46, Sami Mujawar wrote:
Hi Chao,

Thank you for this patch.

I have a few suggestions marked inline as [SAMI].

Otherwise this patch looks good to me.

With those fixed,

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 06/11/2023 03:29 am, Chao Li wrote:
Moved PcdDeviceTreeInitialBaseAddress and PcdDeviceTreeAllocationPadding
to OvmfPkg for easier use by other architectures.

Build-tested only (with "ArmVirtQemu.dsc").

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
---
  ArmVirtPkg/ArmVirtCloudHv.dsc                     |  2 +-
  ArmVirtPkg/ArmVirtKvmTool.dsc                     |  2 +-
  ArmVirtPkg/ArmVirtPkg.dec                         | 14 --------------
  ArmVirtPkg/ArmVirtQemu.dsc                        |  2 +-
  ArmVirtPkg/ArmVirtQemuKernel.dsc                  |  2 +-
  ArmVirtPkg/ArmVirtXen.dsc                         |  2 +-
  .../ArmVirtPsciResetSystemPeiLib.inf              |  3 ++-
  .../CloudHvVirtMemInfoPeiLib.inf                  |  3 ++-
  .../DebugLibFdtPL011UartFlash.inf                 |  3 ++-
  .../EarlyFdt16550SerialPortHookLib.inf            |  3 ++-
  .../EarlyFdtPL011SerialPortLib.inf                |  3 ++-
  .../KvmtoolPlatformPeiLib.inf                     |  5 +++--
  .../Library/PlatformPeiLib/PlatformPeiLib.inf     | 10 +++++-----
  .../QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf  |  3 ++-
  .../PrePi/ArmVirtPrePiUniCoreRelocatable.inf      |  3 ++-
  OvmfPkg/OvmfPkg.dec                               | 15 +++++++++++++++
  16 files changed, 42 insertions(+), 33 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc
index 2cb89ce10c..76c0d28544 100644
--- a/ArmVirtPkg/ArmVirtCloudHv.dsc
+++ b/ArmVirtPkg/ArmVirtCloudHv.dsc
@@ -129,7 +129,7 @@
    gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000
      # initial location of the device tree blob passed by Cloud Hypervisor -- base of DRAM
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
      gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc
index f50d53bf15..cac4fe06d3 100644
--- a/ArmVirtPkg/ArmVirtKvmTool.dsc
+++ b/ArmVirtPkg/ArmVirtKvmTool.dsc
@@ -179,7 +179,7 @@
    # We are booting from RAM using the Linux kernel boot protocol,
    # x0 will point to the DTB image in memory.
    #
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
      gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
    gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec
index 0f2d787327..2451644844 100644
--- a/ArmVirtPkg/ArmVirtPkg.dec
+++ b/ArmVirtPkg/ArmVirtPkg.dec
@@ -42,20 +42,6 @@
    gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|FALSE|BOOLEAN|0x00000004
    [PcdsFixedAtBuild, PcdsPatchableInModule]
-  #
-  # This is the physical address where the device tree is expected to be stored
-  # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, so that we
-  # can do a first pass over the device tree in the SEC phase to discover the
-  # UART base address.
-  #
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0|UINT64|0x00000001
-
-  #
-  # Padding in bytes to add to the device tree allocation, so that the DTB can
-  # be modified in place (default: 256 bytes)
-  #
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding|256|UINT32|0x00000002
-
    #
    # Binary representation of the GUID that determines the terminal type. The
    # size must be exactly 16 bytes. The default value corresponds to
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 30e3cfc8b9..cf306cac08 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -201,7 +201,7 @@
    gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000
      # initial location of the device tree blob passed by QEMU -- base of DRAM
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
      gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
    gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index b50f8e84a3..c0d079e28d 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -198,7 +198,7 @@
    # Define a default initial address for the device tree.
    # Ignored if x0 != 0 at entry.
    #
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x40000000
      gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
    gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index f0d15b823b..5809832e66 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -115,7 +115,7 @@
    #
    gArmTokenSpaceGuid.PcdSystemMemoryBase|0x0
    gArmTokenSpaceGuid.PcdSystemMemorySize|0x0
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0
      gArmTokenSpaceGuid.PcdFdBaseAddress|0x0
    gArmTokenSpaceGuid.PcdFvBaseAddress|0x0
diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf
index 3a65706e8d..79217d296d 100644
--- a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf
@@ -26,6 +26,7 @@
    EmbeddedPkg/EmbeddedPkg.dec
    MdeModulePkg/MdeModulePkg.dec
    MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
    [LibraryClasses]
    ArmSmcLib
@@ -36,4 +37,4 @@
    HobLib
    [Pcd]
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
diff --git a/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf b/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf
index 666b5d9711..6df26ccd64 100644
--- a/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf
+++ b/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoPeiLib.inf
@@ -26,6 +26,7 @@
    EmbeddedPkg/EmbeddedPkg.dec
    MdeModulePkg/MdeModulePkg.dec
    MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
    [LibraryClasses]
    ArmLib
@@ -44,4 +45,4 @@
  [FixedPcd]
    gArmTokenSpaceGuid.PcdFdSize
    gArmTokenSpaceGuid.PcdFvSize
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
diff --git a/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf b/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf
index 7870ca2ae4..f35a0913f0 100644
--- a/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf
+++ b/ArmVirtPkg/Library/DebugLibFdtPL011Uart/DebugLibFdtPL011UartFlash.inf
@@ -30,6 +30,7 @@
    ArmPlatformPkg/ArmPlatformPkg.dec
    ArmVirtPkg/ArmVirtPkg.dec
    MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
    [LibraryClasses]
    BaseLib
@@ -41,7 +42,7 @@
    PrintLib
    [Pcd]
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress # Flash.c
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress # Flash.c
[SAMI] Please reorder this section in alphabetical order.
    gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue
    gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask
    gEfiMdePkgTokenSpaceGuid.PcdFixedDebugPrintErrorLevel
diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
index 22aba53d9b..3e2303b7f4 100644
--- a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
+++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.inf
@@ -29,7 +29,8 @@
    ArmVirtPkg/ArmVirtPkg.dec
    MdeModulePkg/MdeModulePkg.dec
    MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
    [Pcd]
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
diff --git a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf
index f47692f06a..e677f1d9e7 100644
--- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf
+++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.inf
@@ -28,9 +28,10 @@
    MdePkg/MdePkg.dec
    ArmPlatformPkg/ArmPlatformPkg.dec
    ArmVirtPkg/ArmVirtPkg.dec
+  OvmfPkg/OvmfPkg.dec
    [Pcd]
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
    [FixedPcd]
    gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate
diff --git a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
index f201aee50c..78c9d9d764 100644
--- a/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
+++ b/ArmVirtPkg/Library/KvmtoolPlatformPeiLib/KvmtoolPlatformPeiLib.inf
@@ -24,6 +24,7 @@
    EmbeddedPkg/EmbeddedPkg.dec
    MdeModulePkg/MdeModulePkg.dec
    MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
    [LibraryClasses]
    DebugLib
@@ -34,11 +35,11 @@
    [FixedPcd]
    gArmTokenSpaceGuid.PcdFvSize
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding
    [Pcd]
    gArmTokenSpaceGuid.PcdFvBaseAddress
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
[SAMI] Please reorder in alphabetical order.
    gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
    [Guids]
diff --git a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf
index b867d8bb89..0584a53ee3 100644
--- a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf
+++ b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf
@@ -41,16 +41,16 @@
    [FixedPcd]
    gArmTokenSpaceGuid.PcdFvSize
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding
    [Pcd]
    gArmTokenSpaceGuid.PcdFvBaseAddress
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
-  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress         ## SOMETIMES_PRODUCES
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress             ## SOMETIMES_PRODUCES
[SAMI] Please reorder in alphabetical order.
    [Ppis]
-  gOvmfTpmDiscoveredPpiGuid                               ## SOMETIMES_PRODUCES
-  gPeiTpmInitializationDonePpiGuid                        ## SOMETIMES_PRODUCES
+  gOvmfTpmDiscoveredPpiGuid                                   ## SOMETIMES_PRODUCES
+  gPeiTpmInitializationDonePpiGuid                            ## SOMETIMES_PRODUCES
    [Guids]
    gEarlyPL011BaseAddressGuid
diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
index f045e39a41..76c3c5d3c8 100644
--- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
+++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
@@ -26,6 +26,7 @@
    EmbeddedPkg/EmbeddedPkg.dec
    MdeModulePkg/MdeModulePkg.dec
    MdePkg/MdePkg.dec
+  OvmfPkg/OvmfPkg.dec
    [LibraryClasses]
    ArmLib
@@ -44,4 +45,4 @@
    gArmTokenSpaceGuid.PcdSystemMemorySize
    gArmTokenSpaceGuid.PcdFdSize
    gArmTokenSpaceGuid.PcdFvSize
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
index 7edf501808..691fc26350 100755
--- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
+++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
@@ -32,6 +32,7 @@
    MdePkg/MdePkg.dec
    MdeModulePkg/MdeModulePkg.dec
    EmbeddedPkg/EmbeddedPkg.dec
+  OvmfPkg/OvmfPkg.dec
    ArmPkg/ArmPkg.dec
    ArmPlatformPkg/ArmPlatformPkg.dec
    ArmVirtPkg/ArmVirtPkg.dec
[SAMI] I understad this section is not ordered correctly. But can you can place the OvmfPkg/OvmfPkg.dec towards the end of this section, please?
@@ -93,6 +94,6 @@
  [Pcd]
    gArmTokenSpaceGuid.PcdSystemMemoryBase
    gArmTokenSpaceGuid.PcdSystemMemorySize
-  gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
    gArmTokenSpaceGuid.PcdFdBaseAddress
    gArmTokenSpaceGuid.PcdFvBaseAddress
[SAMI] Please reorder in alphabetical order.
diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
index e3861e5c1b..89091e8bf1 100644
--- a/OvmfPkg/OvmfPkg.dec
+++ b/OvmfPkg/OvmfPkg.dec
@@ -481,6 +481,21 @@
    #
    gUefiOvmfPkgTokenSpaceGuid.PcdForceNoAcpi|0x0|BOOLEAN|0x69
  +[PcdsFixedAtBuild, PcdsPatchableInModule]
+  #
+  # This is the physical address where the device tree is expected to be stored
+  # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, so that we
+  # can do a first pass over the device tree in the SEC phase to discover the
+  # UART base address.
+  #
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress|0x0|UINT64|0x6e
+
+  #
+  # Padding in bytes to add to the device tree allocation, so that the DTB can
+  # be modified in place (default: 256 bytes)
+  #
+  gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding|256|UINT32|0x6f
+
  [PcdsFeatureFlag]
    gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE|BOOLEAN|0x1c
    gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|FALSE|BOOLEAN|0x1d




_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#111185) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--------------M0YGjk6tbobzRA9sFrVPNMvL--