From nobody Sat May 4 23:34:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+78109+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78109+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1626999799; cv=none; d=zohomail.com; s=zohoarc; b=IttIa4ZPVPnN25QdZJtYqqSFKqTMV5g91lGfnGNXxBs/MKQDEbzWHOhqbaNyULXsAh1dfWyRuChiKhIDZC27vnHpQbvGWRnEGYR7JZ3vcFciz4g0FQFb+2nmLdNI0WPP/3p+HFZNPiyfGFM57jL44ppvLCEuUlB22O2Jz65bNhs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626999799; h=Content-Transfer-Encoding:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=0KvSiWij+kAq0oCJiDQQ5fTxKte4eYyfnzquMB77ugA=; b=GsgAIWilgAsfLOeMUCaslFEhQ9PKZl+WdhSkpcBx4JXp/gpbgrRynJXlFoH2kgYh/qFmN15Yuge43TDAXvXTE/8R53c6K73p6V0scW3XX5EC8pdnek9WeNiETnmEzLCN3S1zlHZlIaHtuuXwBwohazEBmR5LewUmNQJvUUP8ir8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+78109+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626999799817240.49297581302096; Thu, 22 Jul 2021 17:23:19 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id n8lXYY1788612xCdPwUUFWA4; Thu, 22 Jul 2021 17:23:19 -0700 X-Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) by mx.groups.io with SMTP id smtpd.web08.2182.1626999798930645408 for ; Thu, 22 Jul 2021 17:23:19 -0700 X-Received: by mail-qk1-f179.google.com with SMTP id s193so7215247qke.4 for ; Thu, 22 Jul 2021 17:23:18 -0700 (PDT) X-Gm-Message-State: 7FJDOyxS4twQ2Ki6hHa6EXDdx1787277AA= X-Google-Smtp-Source: ABdhPJwlgMmS7pmA1oEtNDEG7xK//vo+jwvGya6y+AetqMm7mrWm0MCIDYlF0AQ905xu+denLjk13w== X-Received: by 2002:a37:bb81:: with SMTP id l123mr2278352qkf.50.1626999797878; Thu, 22 Jul 2021 17:23:17 -0700 (PDT) X-Received: from benjamind-benjamindomain.. ([2607:f2c0:e98c:24:f138:4cef:652:5242]) by smtp.gmail.com with ESMTPSA id u3sm11128443qtg.16.2021.07.22.17.23.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 17:23:17 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1] MinPlatformPkg/PciHostBridgeLibSimple: Fix Mem.Limit assignment Date: Thu, 22 Jul 2021 20:21:55 -0400 Message-Id: <20210723002155.7827-1-benjamin.doron00@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,benjamin.doron00@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626999799; bh=ft/2jU23qULTWow31tpIWktOc4z9e4Q6C/OmwdgmxLo=; h=Date:From:Reply-To:Subject:To; b=dFOMp/Xuv5qnQTery4G2TNy6X1IxQOCSobLjqt7JnyFEKcI1/N/RqdJKiHEYfCxHBBk 1wMK6DygIq7Oy7V/SNwhmr92Gd1TQYlgClchq7Z2zCUbB8NwvgIBXBWH5WckkQLjxC4IM nPMBgV0o8ELHL8PP79QURK3BjC/mbbJULZk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626999801501100001 Content-Type: text/plain; charset="utf-8" In the case where the root bridge's Mem.Limit is the base address of PCIe MMIO, subtract one to make a valid end address. This fixes an issue where CpuDxe returns "Length(0x50000001) is not aligned!" when PciHostBridgeDxe attempts to make this range uncacheable. Signed-off-by: Benjamin Doron --- Platform/Intel/MinPlatformPkg/Pci/Library/PciHostBridgeLibSimple/PciHostBr= idgeLibSimple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/Pci/Library/PciHostBridgeLibSimp= le/PciHostBridgeLibSimple.c b/Platform/Intel/MinPlatformPkg/Pci/Library/Pci= HostBridgeLibSimple/PciHostBridgeLibSimple.c index e231f747019e..0e3fee28b5d1 100644 --- a/Platform/Intel/MinPlatformPkg/Pci/Library/PciHostBridgeLibSimple/PciH= ostBridgeLibSimple.c +++ b/Platform/Intel/MinPlatformPkg/Pci/Library/PciHostBridgeLibSimple/PciH= ostBridgeLibSimple.c @@ -90,7 +90,7 @@ PciHostBridgeGetRootBridges ( if (PcdGet32(PcdPciReservedMemLimit) !=3D 0) { mRootBridgeTemplate.Mem.Limit =3D PcdGet32 (PcdPciReservedMemLimit); } else { - mRootBridgeTemplate.Mem.Limit =3D (UINT32) PcdGet64 (PcdPciExpressBase= Address); + mRootBridgeTemplate.Mem.Limit =3D (UINT32) PcdGet64 (PcdPciExpressBase= Address) - 1; } =20 mRootBridgeTemplate.MemAbove4G.Base =3D PcdGet64 (PcdPciReservedMemAbove= 4GBBase); --=20 2.31.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#78109): https://edk2.groups.io/g/devel/message/78109 Mute This Topic: https://groups.io/mt/84391957/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-