From nobody Tue May 7 16:59:19 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+78112+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+78112+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1627007261; cv=none; d=zohomail.com; s=zohoarc; b=YXS7Cc43UKgeucsUYKMqCeFkbs0OhQuSabn0N6sziVdu/uKOrHaaNESYZ5UeCtfGidzUyFu45xda3SJVxzKWN37stw3SR7k9QUvksPxKETx7QiPrPhjIwNL60yd43hAueRxz2uASQm/pcq1LRS5c9Qgt3sNj64CVDxdkD2OgAFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1627007261; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=kgkoj7M/n4Fn1G5DYdP5b0GMQBzMQpziox8tFAxwyUQ=; b=NsDMqfTmfqPXv4npO/WJG/LsvKHGL4Ng65KWu5aXyYoq2rWYT/McBmZ1pvI8BABUIQMTSggcQ6M39aBVxhMZbYrQfAKK9r+698Rmxrl7lOyWcdIfO3L/LiF9c1c5O/uIXcLQsLeBqDjMOS9rIS8loPf7Y6rD+4cz4Zu1JHFeMI0= 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+78112+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 1627007261862452.6003703775258; Thu, 22 Jul 2021 19:27:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LLUiYY1788612xfetdlEuSOd; Thu, 22 Jul 2021 19:27:41 -0700 X-Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by mx.groups.io with SMTP id smtpd.web10.3299.1627007260772443408 for ; Thu, 22 Jul 2021 19:27:40 -0700 X-Received: by mail-qk1-f170.google.com with SMTP id k7so92622qki.11 for ; Thu, 22 Jul 2021 19:27:40 -0700 (PDT) X-Gm-Message-State: ZHoOdYee41i8zMQMkZEbduvBx1787277AA= X-Google-Smtp-Source: ABdhPJwiHL1btJRvqhU6iJlIzu7jopCMoUEZLBdp7VnUwoysGSY31PqGotkvUvvgsRjHC/tFcsJvaw== X-Received: by 2002:a05:620a:4d5:: with SMTP id 21mr2671024qks.397.1627007259747; Thu, 22 Jul 2021 19:27:39 -0700 (PDT) X-Received: from benjamind-benjamindomain.. ([2607:f2c0:e98c:24:f138:4cef:652:5242]) by smtp.gmail.com with ESMTPSA id 75sm13652721qkl.31.2021.07.22.19.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 19:27:39 -0700 (PDT) From: "Benjamin Doron" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-devel] [PATCH v2] MinPlatformPkg/PciHostBridgeLibSimple: Fix Mem.Limit assignment Date: Thu, 22 Jul 2021 22:27:23 -0400 Message-Id: <20210723022723.13074-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=1627007261; bh=Ykj2NsX7kOgdbQC4qGhtFoyQ0gEbvfmT6+PFh2q3xJ8=; h=Cc:Date:From:Reply-To:Subject:To; b=VYSJEKH5X4WR85ufm1pnXqkS3ZcnBaB06dNQuuTV/hJ4ubcjeSauAWCQNLTZQS9Qrct Ximlny+0oEt16qRvCkh5Vf2uqwnHs4prgY+pWduCIdCipJdV1MByypciclwAFa/cAZViB momfL1FjSDWhYfw0RnaeRuhHz5f/j5HFQ9c= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1627007262691100001 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. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Benjamin Doron Reviewed-by: Nate DeSimone --- 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 (#78112): https://edk2.groups.io/g/devel/message/78112 Mute This Topic: https://groups.io/mt/84393639/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-