From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 7BB9581CE2 for ; Wed, 2 Nov 2016 06:29:06 -0700 (PDT) Received: by mail-it0-x229.google.com with SMTP id u205so36535975itc.0 for ; Wed, 02 Nov 2016 06:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=osFf0KnmfjDtJ4lphc9Ukr6sa03XoH/1yDbzeFZ2I0Q=; b=NJEn11Lo4LBlqJTSpgTua3hwGlBVnsy5SPfp6ZeVyDPk/vkDjSl+acu3tjP6LPGvqm 3IM8Lp0bLva34bX5wv4j7Z1yF/0s5D/zsS4FQ93qyPFeTwgzfj9oRo9Ya16/CZNxtkid K+A0skd1bqaK3x5+Kr4gySI8vshHzcZddupDo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=osFf0KnmfjDtJ4lphc9Ukr6sa03XoH/1yDbzeFZ2I0Q=; b=P79IOT/Ab/Upk/RecwvD3B3nZJZKjIMJjlXub7fBjtUBF3rr66sdOsWmC8+4hBYEbY PECQ2EQp6D+ZTTH3RtcBfahQYqLChFsm+62YrZtYPKse2PyaKtgMLmfd5tcgY31cLq7v WIIbbYelxVIgvkFOjnXRQHlqFLcTJedUapvL6HoDwxB02Xy8/nJNlBOnVDUys1U0k1hq dhTPwsedEr/zMGEK8L6QoFyz7embXGqVdTjSpoiJlDU0xLMlAExmpMzW+/2qOCLPAPeE C/hk1INAm6RbaOv1T2NPkMVVDEoDlpfFSH9OKfsem/srgMs+jcoe5EVVC8LVR2N0XflB W+mg== X-Gm-Message-State: ABUngvdMv96FnObwCLeDJA6cpvlsbFIiGuChUv+/lukN8D8rG5SE02c62bO7zj+gXAtlSc9+VjtDGDn6U7Zhi1wR X-Received: by 10.107.25.11 with SMTP id 11mr4151682ioz.138.1478093347248; Wed, 02 Nov 2016 06:29:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.59.147 with HTTP; Wed, 2 Nov 2016 06:29:06 -0700 (PDT) In-Reply-To: <20161101215422.GM1161@bivouac.eciton.net> References: <1477937590-10361-1-git-send-email-ard.biesheuvel@linaro.org> <1477937590-10361-2-git-send-email-ard.biesheuvel@linaro.org> <20161101215422.GM1161@bivouac.eciton.net> From: Ard Biesheuvel Date: Wed, 2 Nov 2016 13:29:06 +0000 Message-ID: To: Leif Lindholm Cc: edk2-devel-01 Subject: Re: [PATCH 1/5] EmbeddedPkg: introduce platform PCI I/O protocol 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: Wed, 02 Nov 2016 13:29:06 -0000 Content-Type: text/plain; charset=UTF-8 On 1 November 2016 at 21:54, Leif Lindholm wrote: > On Mon, Oct 31, 2016 at 06:13:06PM +0000, Ard Biesheuvel wrote: >> Introduce a protocol that can be exposed by a platform for devices that >> can be driven by a PCI driver, (e.g., AHCI, XHCI), but do not live on a >> PCI bus. This used to be called 'PCI emulation' but given that we only >> emulate the PCI config space and nothing else, it tends to be a bit >> confusing so this introduces the term 'platform PCI I/O' instead. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel >> --- >> EmbeddedPkg/EmbeddedPkg.dec | 1 + >> EmbeddedPkg/Include/Protocol/PlatformPciIo.h | 74 ++++++++++++++++++++ > > OK, so perhaps I should have commented on this already on 0/5, but I > think this belongs in MdeModulePkg. The closest thing to an "embedded" > user of this code is Juno. > >> 2 files changed, 75 insertions(+) >> >> diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec >> index 2c2cf41103c2..84a6f4d01077 100644 >> --- a/EmbeddedPkg/EmbeddedPkg.dec >> +++ b/EmbeddedPkg/EmbeddedPkg.dec >> @@ -69,6 +69,7 @@ [Protocols.common] >> gAndroidFastbootPlatformProtocolGuid = { 0x524685a0, 0x89a0, 0x11e3, {0x9d, 0x4d, 0xbf, 0xa9, 0xf6, 0xa4, 0x03, 0x08}} >> gUsbDeviceProtocolGuid = { 0x021bd2ca, 0x51d2, 0x11e3, {0x8e, 0x56, 0xb7, 0x54, 0x17, 0xc7, 0x0b, 0x44 }} >> gPlatformGpioProtocolGuid = { 0x52ce9845, 0x5af4, 0x43e2, {0xba, 0xfd, 0x23, 0x08, 0x12, 0x54, 0x7a, 0xc2 }} >> + gPlatformPciIoProtocolGuid = { 0x0d51905b, 0xb77e, 0x452a, {0xa2, 0xc0, 0xec, 0xa0, 0xcc, 0x8d, 0x51, 0x4a }} >> >> [PcdsFeatureFlag.common] >> gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|FALSE|BOOLEAN|0x00000001 >> diff --git a/EmbeddedPkg/Include/Protocol/PlatformPciIo.h b/EmbeddedPkg/Include/Protocol/PlatformPciIo.h >> new file mode 100644 >> index 000000000000..a7bd584049ac >> --- /dev/null >> +++ b/EmbeddedPkg/Include/Protocol/PlatformPciIo.h >> @@ -0,0 +1,74 @@ >> +/** @file >> + >> + Copyright (c) 2016, Linaro, Ltd. All rights reserved.
>> + >> + This program and the accompanying materials >> + are licensed and made available under the terms and conditions of the BSD License >> + which accompanies this distribution. The full text of the license may be found at >> + http://opensource.org/licenses/bsd-license.php >> + >> + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. >> + >> +**/ >> + >> +#ifndef __PLATFORM_PCI_IO_H__ >> +#define __PLATFORM_PCI_IO_H__ >> + >> +#define PLATFORM_PCI_IO_PROTOCOL_GUID \ >> + { 0x0d51905b, 0xb77e, 0x452a, {0xa2, 0xc0, 0xec, 0xa0, 0xcc, 0x8d, 0x51, 0x4a } } >> + >> +// >> +// Protocol interface structure >> +// >> +typedef struct _PLATFORM_PCI_IO PLATFORM_PCI_IO; >> + >> +// >> +// Data Types >> +// >> +typedef enum { >> + PlatformPciIoDeviceOhci, >> + PlatformPciIoDeviceUhci, >> + PlatformPciIoDeviceEhci, >> + PlatformPciIoDeviceXhci, >> + PlatformPciIoDeviceAhci, > > SdMmc and Ufs? > Indeed. I have added both: SDHCI works in QEMU but I can't really test UFS.