From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web12.4805.1576148117433060477 for ; Thu, 12 Dec 2019 02:55:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=1JvbkBq3; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.65, mailfrom: pete@akeo.ie) Received: by mail-wr1-f65.google.com with SMTP id t2so2250198wrr.1 for ; Thu, 12 Dec 2019 02:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KOU7Woeyd58q56rtkCdpvy/1bgWm5altBN47rvIWNV0=; b=1JvbkBq3VeCNRu+vNVftxVAip7CwUr4RJLA5BVLvliNB50wxbeRJmZmQiiLNcZZrBE Sj2mBnFn1bDZa6ocNF33dVWkwglvoObPXJw/19RJeeDZ37Fq0uu57xxG4G87LHHtXmY8 famxEWzSXqi05LoxGfft79dEvAJ2YldTP0a/sKokD4MEpSRmqRRi4dFDD5GGz6kfOfM8 UGnwU1p5HJ2p8gCC4Uw9uzK7PngXe76aoh87jHiJyYW67wb6YfO967fIiah/lccAi6pO /6YTBRGI+aJvKIXouHNiqAJrH0oIFv3obANT55ZTed5RQ6Kvs5XiJI5sgsDxZCKKnT0A pZeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KOU7Woeyd58q56rtkCdpvy/1bgWm5altBN47rvIWNV0=; b=lFLtXCMjXln/jKEVhWE1e9lQB+RNtUIm3RRXXdDQzAPk33wv7ni2UQaSTdMqgPKjnG DHsrOQeob1VT8zGkglzK+KpBvK3u6yzsSzK4gTRGwvc4EyRHurMzQjBkm26qAu8XSUhU ea830dcfvgO0ZnOclULjRM76gwdCYgRwWCcdhBzGsQq1gk86pnl3LBH1mJ0Ag6jyumzD A574Ates+55SodL7HN3+kWfz2CRQap3MBdOjN4mfSGbs14p2weWd42HbWab8VPNu92oW A3/LJlO53c9KiMN/6DAYuo8mSgeVENRrR0PI+zYBD+auND1yOgLl8VGbIiVk4RJh8cS4 33yA== X-Gm-Message-State: APjAAAVGjvGKfqcNBOW9JJT8VxKD1TqpgJ+5+V1tlp2V/+dXFB5oFMkC BSpXwakQCYffRZ/62mzUiBy/+d21S4v88w== X-Google-Smtp-Source: APXvYqz5OvGoNtM9yUOGw5XlXQFz9rt3a2EXbYZG18nXecvnqFTuAgqPqLRWuxU+wDiWcCxjZhoY4Q== X-Received: by 2002:adf:dfd2:: with SMTP id q18mr5533522wrn.152.1576148115713; Thu, 12 Dec 2019 02:55:15 -0800 (PST) Return-Path: Received: from localhost.localdomain ([84.203.45.230]) by smtp.gmail.com with ESMTPSA id o66sm1710595wmo.20.2019.12.12.02.55.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2019 02:55:15 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com, lintonrjeremy@gmail.com Subject: [edk2-platforms][PATCH 0/4] Platform/RPi4: Add PCIe and xHCI support Date: Thu, 12 Dec 2019 10:54:58 +0000 Message-Id: <20191212105502.8492-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The following patch series adds xHCI support for the Broadcom 2711 SoC used on the Raspberry Pi 4 by: * Adding the relevant constants to the Silicon header files * Adding the segment library required to handle the nonstandrd ECAM that the SoC uses. Basically, in the Bcm2711, root port is the first bytes of the register space (offset 0) and individual devices are selected by computing their BDF index and writing that into the CFG_INDEX register before ECAM data can then be read/written at CFG_DATA. * Adding the Host Bridge Library * Adding PCIe and xHCI support into the platform using the recently introduced NonCoherentIoMmuDxe. Once this series has been applied, the 4 USB ports of the platform can be used within the UEFI environment. Jeremy Linton (4): Silicon/Bcm27xx: Add PCIe constants to Bcm2711.h Silicon/Bcm27xx: Add segment library to handle nonstandard ECAM Silicon/Bcm27xx: Add PCIe host bridge config library Platform/RPi4: Build the PCIe and xHCI drivers into the firmware Platform/RaspberryPi/RPi4/RPi4.dsc | 29 +- Platform/RaspberryPi/RPi4/RPi4.fdf | 10 +- Platform/RaspberryPi/RPi4/Readme.md | 23 +- Silicon/Broadcom/Bcm27xx/Bcm27xx.dec | 4 + Silicon/Broadcom/Bcm27xx/Include/IndustryStandard/Bcm2711.h | 71 + Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciHostBridgeLib/Bcm2711PciHostBridgeLib.c | 193 +++ Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciHostBridgeLib/Bcm2711PciHostBridgeLib.inf | 51 + Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciHostBridgeLib/Bcm2711PciHostBridgeLibConstructor.c | 235 ++++ Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciSegmentLib/PciSegmentLib.c | 1432 ++++++++++++++++++++ Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciSegmentLib/PciSegmentLib.inf | 34 + 10 files changed, 2064 insertions(+), 18 deletions(-) create mode 100644 Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciHostBridgeLib/Bcm2711PciHostBridgeLib.c create mode 100644 Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciHostBridgeLib/Bcm2711PciHostBridgeLib.inf create mode 100644 Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciHostBridgeLib/Bcm2711PciHostBridgeLibConstructor.c create mode 100644 Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciSegmentLib/PciSegmentLib.c create mode 100644 Silicon/Broadcom/Bcm27xx/Library/Bcm2711PciSegmentLib/PciSegmentLib.inf -- 2.21.0.windows.1