From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 71DF281CE2 for ; Mon, 31 Oct 2016 11:13:15 -0700 (PDT) Received: by mail-wm0-x22a.google.com with SMTP id n67so244589011wme.1 for ; Mon, 31 Oct 2016 11:13:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+1lebrnryl5AoqMtVHJ32SCR43GBZ/QmFO1Ci95IFqk=; b=WThOYkldMt/UKcQ01nFWVCUW2mZRWMzLPqkPn7gp/jIZ+hjlfXfuTFCSon+98lQo4Y st9XdZNG+l1SkXhbZ0acCxiXBxxjOL0h3/Yg1xJSXh4lVaiNex+XcnBLFdbSyd/SsxCn oEyYHHy1Du+KFFxzFIpkup31UpmHvdr3KG9A0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+1lebrnryl5AoqMtVHJ32SCR43GBZ/QmFO1Ci95IFqk=; b=Qc+yvM5KpIULyajvfvbnTFnGPnvjElt1/9bXSuiztVHdP+pljjvFMJEegk7zfJQ++/ AbfpRqEdid9bc3Yhsd9E+M9mme3naguiK65HRw+d6pVa40InR+vJhCfLF6A4gi198lKh ULLmWD3LC1msWW7lFPJxyeGuCoiA+5kzp2JFPCYz0WeTqXASVAAi/FCO12YbtXE7SLB4 /2bQT5UD/3ZgYpDVe25tps3/rMU3Tl30Uz1mErJhjdH0vvND8ARslIvKcLX2ETO5oOwL 7IEuxRz+R6ltkMnRwchkhEiGe8Vs+WisdgmHBXS6quTA8Xk9+Zigi1d1kBOGf7SAfwUU nAnQ== X-Gm-Message-State: ABUngvfpjcnEBRf+bYo7nISqEwapyJJZs18RW3Fy0pqxaSV7h4SszPtMXwOZ6omzi1m9wj5f X-Received: by 10.194.229.7 with SMTP id sm7mr28646263wjc.150.1477937594464; Mon, 31 Oct 2016 11:13:14 -0700 (PDT) Received: from localhost.localdomain ([105.151.153.127]) by smtp.gmail.com with ESMTPSA id 132sm26054809wmn.16.2016.10.31.11.13.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Oct 2016 11:13:13 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Cc: Ard Biesheuvel Date: Mon, 31 Oct 2016 18:13:05 +0000 Message-Id: <1477937590-10361-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [PATCH 0/5] EmbeddedPkg: generic support for reusing PCI drivers for platform devices X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2016 18:13:15 -0000 After having reviewed PciEmulation.c #6, it is time to implement this in a more generic way, taking into account DMA limitations and DMA coherency. So implement a new platform PCI I/O protocol, and a UEFI_DRIVER module that binds to those protocols to expose the PCI I/O abstraction that generic AHCI/XHCI etc drivers can talk to. Tested with AHCI on QEMU. Ard Biesheuvel (5): EmbeddedPkg: introduce platform PCI I/O protocol EmbeddedPkg: introduce platform PCI I/O registration library EmbeddedPkg: implement generic platform PCI I/O driver ArmPkg/CpuDxe: set DmaBufferAlignment according to CWG EmbeddedPkg/PlatformPciIoDxe: add support for non-coherent DMA ArmPkg/Drivers/CpuDxe/CpuDxe.c | 4 +- EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIo.c | 853 ++++++++++++++++++++ EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIo.h | 72 ++ EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.c | 271 +++++++ EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.inf | 43 + EmbeddedPkg/EmbeddedPkg.dec | 2 + EmbeddedPkg/EmbeddedPkg.dsc | 3 + EmbeddedPkg/Include/Library/PlatformPciIoDeviceRegistrationLib.h | 46 ++ EmbeddedPkg/Include/Protocol/PlatformPciIo.h | 74 ++ EmbeddedPkg/Library/PlatformPciIoDeviceRegistrationLib/PlatformPciIoDeviceRegistrationLib.c | 115 +++ EmbeddedPkg/Library/PlatformPciIoDeviceRegistrationLib/PlatformPciIoDeviceRegistrationLib.inf | 34 + 11 files changed, 1516 insertions(+), 1 deletion(-) create mode 100644 EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIo.c create mode 100644 EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIo.h create mode 100644 EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.c create mode 100644 EmbeddedPkg/Drivers/PlatformPciIoDxe/PlatformPciIoDxe.inf create mode 100644 EmbeddedPkg/Include/Library/PlatformPciIoDeviceRegistrationLib.h create mode 100644 EmbeddedPkg/Include/Protocol/PlatformPciIo.h create mode 100644 EmbeddedPkg/Library/PlatformPciIoDeviceRegistrationLib/PlatformPciIoDeviceRegistrationLib.c create mode 100644 EmbeddedPkg/Library/PlatformPciIoDeviceRegistrationLib/PlatformPciIoDeviceRegistrationLib.inf -- 2.7.4