From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::229; helo=mail-it0-x229.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org 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 9AB5120945B6A for ; Mon, 11 Dec 2017 22:55:31 -0800 (PST) Received: by mail-it0-x229.google.com with SMTP id t1so22004035ite.5 for ; Mon, 11 Dec 2017 23:00:09 -0800 (PST) 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=fHGUSF1/rdGXHMcteHts8+baDtuU2UgQPOhuXR1gKxM=; b=P3kwKwZyCtt/dvjY7hBKfWzGFvZhWdfVwaa21HzSt4uUuoUz6mxOZ00+wrqcFn8cyA vSSre6yxJJrOxsmp1AzhqCP7mTUdxPmFpiMs2WTcxDrMYBQV+ZkfYDMKuIp+6gm+DK7L PIn+S/NYavSzqc328TvR5jdiG4nHSVESosAfQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=fHGUSF1/rdGXHMcteHts8+baDtuU2UgQPOhuXR1gKxM=; b=YeYbXIOn93G+j2oxmCIHEd1U6uoXjdch2cgyPZzu7cNqQabuQnm2O/llpojjvdQucZ Fp3fkjy+a20pGS9lNru0uJQRTh16iVjYJwYzKLVJKZeFBE68rgx9Y3w8Q8c2oIzJYE7A UUX/n5EstfVnilfpEOq3/sT694w+fvVbOpyZBZ7cw3DGHyakcbBxvPuwZ9gqEjtfYJUC E+b2yQYJY0pABcIhoPl5c9qkizl8XcakYIUV/dXgAAyuYUnbz/rdfuoH662cPXmc6ZwA 1agJg2cFACZBPhreCPxmAe9wVH/S0YD74asWQe/+Bh+Z6BbF4Z/nLThll3GKjcPTOe4P kFuw== X-Gm-Message-State: AKGB3mIauuY4D4q4C1ctWIyt0/b3p++H+9AB67VKxYqbHBzohWsz/sdI LKeVuLcbXo24sKpa4u47XwPq14Ez+4JfiqxjM4yfQEee X-Google-Smtp-Source: ACJfBotnHmru3XLWz0QnJa3n+rrPyv/9zM9c6yHCiGXmRueKHt2AnkkwJszu2ELGXqst44mheo8OPxvlnceXF83GfyE= X-Received: by 10.107.170.90 with SMTP id t87mr3823508ioe.253.1513062008388; Mon, 11 Dec 2017 23:00:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.16 with HTTP; Mon, 11 Dec 2017 23:00:07 -0800 (PST) In-Reply-To: <20171207224322.20362-1-ard.biesheuvel@linaro.org> References: <20171207224322.20362-1-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Tue, 12 Dec 2017 07:00:07 +0000 Message-ID: To: "edk2-devel@lists.01.org" Cc: Leif Lindholm , "Kinney, Michael D" , "Zeng, Star" , "Tian, Feng" , Ruiyu Ni , "Wu, Hao A" , Ard Biesheuvel Subject: Re: [PATCH v4 0/2] quirks handling for SDHCI controllers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 06:55:31 -0000 Content-Type: text/plain; charset="UTF-8" On 7 December 2017 at 22:43, Ard Biesheuvel wrote: > Many SDHCI implementations exist that are almost spec complicant, and > could be driven by the generic SD/MMC host controller driver except > for some minimal necessary init time tweaks. > > Adding such tweaks to the generic driver is undesirable. On the other > hand, forking the driver for every platform that has such a SDHCI > controller is problematic when it comes to upstreaming and ongoing > maintenance (which is arguably the point of upstreaming in the first > place). > > So these patches propose a workaround that is minimally invasive on the > EDK2 side, but gives platforms a lot of leeway when it comes to applying > SDHCI quirks. > > Changes since v3: > - remove PassThru argument from protocol members: it is unclear whether the > protocol is available when the override protocol is invoked, and my > example use case does not need it > - replace incorrect HandleProtocol with LocateProtocol, given that the override > protocol is now a singleton instance > - merge notifier calls into SdMmcHcReset() and SdMmcHcInitHost (), this > required changing the prototype to take a SD_MMC_HC_PRIVATE_DATA* argument > and so the prototypes no longer belong in SdMmcPciHci.h and have been moved > to SdMmcPciHcDxe.h > - use VOID* type for capability not UINT64* since we don't know its alignment > > Changes since v2: > - use a singleton instance of the SD/MMC protocol rather than one per > controller; this is needed to support 'reconnect -r', as pointed out > by Ray > - use EDKII prefixes for all types defined by the protocol > - replace 'hook' with 'notify', and tweak some other identifiers > - add missing function comment headers for factored out functions > > Changes since RFC/v1: > - add EFI_SD_MMC_PASS_THRU_PROTOCOL* member to override methods > - use UINT64* not VOID* to pass capability structure (which is always 64 bits > in size) > > Ard Biesheuvel (2): > MdeModulePkg: introduce SD/MMC override protocol > MdeModulePkg/SdMmcPciHcDxe: allow HC capabilities to be overridden > OK, so I did send my v4 but I couldn't find it in my mail folders :-) Comments anyone?