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.133.124]) by mx.groups.io with SMTP id smtpd.web12.8719.1639648249608716433 for ; Thu, 16 Dec 2021 01:50:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UdIpEFwU; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639648248; 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=imNeI0O51cOiJ3EE05qHaSXJ9nOOFBMH+KleK6tRxOI=; b=UdIpEFwUHly6SUPzMiMh+rtH1HEXYBYoWeuhKXLyIfGFvg4Jg7tdrL/4OkfD54qyAzejMJ h0mlmQuen+UIMP7K3lQWQ4Z09MhZN8mpt3R9I5H23s7/PPV847OWgzPRTi9FkHmcRA06zN fLy0cj1g+ETB0DJT4k/p2UpFPu4zT7s= 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-494-njESkJJIMVG05SBdPdcpcg-1; Thu, 16 Dec 2021 04:50:45 -0500 X-MC-Unique: njESkJJIMVG05SBdPdcpcg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 03CC11934100; Thu, 16 Dec 2021 09:50:44 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A77777A40A; Thu, 16 Dec 2021 09:50:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9BADB18003B6; Thu, 16 Dec 2021 10:50:37 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Liming Gao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiewen Yao , Abner Chang , Ard Biesheuvel , Ray Ni , Gerd Hoffmann , Hao A Wu , Jian J Wang , Jordan Justen , Leif Lindholm Subject: [PATCH 3/6] OvmfPkg/PlatformPei: unfix PcdPciExpressBaseAddress Date: Thu, 16 Dec 2021 10:50:34 +0100 Message-Id: <20211216095037.1843149-4-kraxel@redhat.com> In-Reply-To: <20211216095037.1843149-1-kraxel@redhat.com> References: <20211216095037.1843149-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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 fb38e3c39d8e..81378eaf9b4c 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -154,8 +154,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.33.1