From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.9296.1642413718665484447 for ; Mon, 17 Jan 2022 02:01:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PeyDziSY; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642413717; 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=Fx4nMirC2UmkKaUoHaiP0tG9DlgxvdC93J4VIynm9yY=; b=PeyDziSYzvqqPJ/XwvOGaczkWiwLZ8ArQhbBQtxE2+7ZwFzbqom1SpwuVUJHj7Aq8Oinik N1fL4jIeNnQolGWV2TlLNW9eDxOyCbdbeotGRbIVNmg8dmqVOaAC/AlaueG3OEMflK+paD huT/lG081koPyMpM4FwogIqdPBwRJFE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-5-rpNmZ_tpPr-1jGeBF8jufA-1; Mon, 17 Jan 2022 05:01:54 -0500 X-MC-Unique: rpNmZ_tpPr-1jGeBF8jufA-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 E34CE64083; Mon, 17 Jan 2022 10:01:51 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0F7370391; Mon, 17 Jan 2022 10:01:51 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C66351800618; Mon, 17 Jan 2022 11:01:46 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Gerd Hoffmann , Ray Ni , Liming Gao , Abner Chang , Jiewen Yao , Jordan Justen , Leif Lindholm , Ard Biesheuvel , Jian J Wang , Pawel Polawski , Hao A Wu Subject: [PATCH v2 3/6] OvmfPkg/PlatformPei: unfix PcdPciExpressBaseAddress Date: Mon, 17 Jan 2022 11:01:43 +0100 Message-Id: <20220117100146.1965662-4-kraxel@redhat.com> In-Reply-To: <20220117100146.1965662-1-kraxel@redhat.com> References: <20220117100146.1965662-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Will be set by FdtPciHostBridgeLib, so it can't be an fixed when we want use that library. Signed-off-by: Gerd Hoffmann --- OvmfPkg/PlatformPei/PlatformPei.inf | 2 +- OvmfPkg/PlatformPei/MemDetect.c | 4 ++-- OvmfPkg/PlatformPei/Platform.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf index 8ef404168c45..44bf482e855a 100644 --- a/OvmfPkg/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/PlatformPei/PlatformPei.inf @@ -92,6 +92,7 @@ [Pcd] gUefiOvmfPkgTokenSpaceGuid.PcdQ35TsegMbytes gUefiOvmfPkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved @@ -114,7 +115,6 @@ [Pcd] [FixedPcd] gUefiOvmfPkgTokenSpaceGuid.PcdOvmfCpuidBase gUefiOvmfPkgTokenSpaceGuid.PcdOvmfCpuidSize - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 1bcb5a08bca6..f87a6f48a1bf 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -155,8 +155,8 @@ QemuUc32BaseInitialization ( // [PcdPciExpressBaseAddress, 4GB) range require a very small number of // variable MTRRs (preferably 1 or 2). // - ASSERT (FixedPcdGet64 (PcdPciExpressBaseAddress) <= MAX_UINT32); - mQemuUc32Base = (UINT32)FixedPcdGet64 (PcdPciExpressBaseAddress); + ASSERT (PcdGet64 (PcdPciExpressBaseAddress) <= MAX_UINT32); + mQemuUc32Base = (UINT32)PcdGet64 (PcdPciExpressBaseAddress); return; } diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index d0323c645162..27ada0c17577 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -171,7 +171,7 @@ MemMapInitialization ( // The MMCONFIG area is expected to fall between the top of low RAM and // the base of the 32-bit PCI host aperture. // - PciExBarBase = FixedPcdGet64 (PcdPciExpressBaseAddress); + PciExBarBase = PcdGet64 (PcdPciExpressBaseAddress); ASSERT (TopOfLowRam <= PciExBarBase); ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB); PciBase = (UINT32)(PciExBarBase + SIZE_256MB); @@ -302,7 +302,7 @@ PciExBarInitialization ( // determined in AddressWidthInitialization(), i.e., 36 bits, will suffice // for DXE's page tables to cover the MMCONFIG area. // - PciExBarBase.Uint64 = FixedPcdGet64 (PcdPciExpressBaseAddress); + PciExBarBase.Uint64 = PcdGet64 (PcdPciExpressBaseAddress); ASSERT ((PciExBarBase.Uint32[1] & MCH_PCIEXBAR_HIGHMASK) == 0); ASSERT ((PciExBarBase.Uint32[0] & MCH_PCIEXBAR_LOWMASK) == 0); -- 2.34.1