From nobody Sun May 5 11:55:34 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+71738+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+71738+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613570462; cv=none; d=zohomail.com; s=zohoarc; b=kHxeprgNkU3/rZZqG6EqeFnndEexdCe4WiJ1qJTP4MQjFc70t1joh+QmKuQng/cr+VS6HoQMaBSebITj+nEiQRgqFVxu5hDA9PFN7KZv30yOOU/HbJIKSp94vQWrGRI0eRp7JRIqUvckLC5+dtayIC+7Ki8v68aLVADyEu8FpTM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613570462; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=5xhxxQH8SVMs5Ay7qMzggfiNtC/z62EkBDH49r4jobM=; b=PPcm+Q8pJqpaM/OZZiqwxRCC1qug+9SAsdKDmDHzy37ttiCJvBxZyNnON+ZnzBNpTJN+mafTLpq94w9AQlhTduBtwXMO619jlt7T4bAgjcb6nQthzHw3xnc0XYvF9Ryu03UGoA9O94nwPhTIPzmTDa6TtVKUMNx5owvn3g8Dmhc= 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+71738+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1613570462021328.4518862579098; Wed, 17 Feb 2021 06:01:02 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id khvYYY1788612xsY8RWdaTuV; Wed, 17 Feb 2021 06:00:59 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4103.1613542081115683745 for ; Tue, 16 Feb 2021 22:08:01 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5344C31B; Tue, 16 Feb 2021 22:08:00 -0800 (PST) X-Received: from u200856.usa.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 080653F73B; Tue, 16 Feb 2021 22:08:00 -0800 (PST) From: jlinton To: devel@edk2.groups.io Cc: pete@akeo.ie, awarkentin@vmware.com, samer.el-haj-mahmoud@arm.com, leif@nuviainc.com, ardb+tianocore@kernel.org, Jeremy Linton Subject: [edk2-devel] [PATCH v2] Platform/RaspberryPi: Only enable IORT when 3G limit is disabled. Date: Wed, 17 Feb 2021 00:07:44 -0600 Message-Id: <20210217060744.307354-1-lintonrjeremy@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,lintonrjeremy@gmail.com X-Gm-Message-State: wrl6Oewc9vBpRTyh3rDzVhFIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613570459; bh=QDkqWpvHliX4fSaAVo4QSRSycB56YmiJHy5zb92iO7w=; h=Cc:Date:From:Reply-To:Subject:To; b=mNxrdNL0sjXPWiCZe77GMFTKKVcysM6EK9mtxYk9A8x5kp6dpLsphf1+03YAwQJrcyZ JR2HXLTbU2DvtcNedDU9OTUKgGQQKurfs4vSIBxrHBjQPAm2O1XnWQiZy7S8ksczcyObD T0ZKEgoCv6jHiptYA6W23FYYR2H4RoLk2To= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Jeremy Linton The 3G limit, and the 2G IORT are intended to solve the same linux problem. They limit PCI DMA operations to the first 3G of RAM. Older linux kernels, as used with RHEL/Centos, trigger an assertion* when a DMA operation starts at a range that doesn't fit within the 2G range specified by the IORT. The simple solution is to only enable the IORT when the 3G flag is disabled and there is more than 3G installed. * https://github.com/pftf/RPi4/issues/123 Fixes: dac891da5cf3 ("Platform/RaspberryPi/AcpiTables: add a IORT ACPI tabl= e to limit XHCI DMA") Signed-off-by: Jeremy Linton Reviewed-by: Andrei Warkentin --- Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c b/Platform/= RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c index 19ef950f10..578f5ead8f 100644 --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c @@ -755,6 +755,12 @@ HandleDynamicNamespace ( DEBUG ((DEBUG_ERROR, "Found namespace table not in table list.\n")); =20 return FALSE; + case SIGNATURE_32 ('I', 'O', 'R', 'T'): + // only enable the IORT on machines with >3G and no limit + // to avoid problems with rhel/centos and other older OSs + if (PcdGet32 (PcdRamLimitTo3GB) || !PcdGet32 (PcdRamMoreThan3GB)) { + return FALSE; + } } =20 return TRUE; --=20 2.13.7 -=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 (#71738): https://edk2.groups.io/g/devel/message/71738 Mute This Topic: https://groups.io/mt/80698554/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-