From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::241; helo=mail-lj1-x241.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (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 89FE821A00AE6 for ; Fri, 9 Nov 2018 15:02:00 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id e5-v6so2963777lja.4 for ; Fri, 09 Nov 2018 15:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AW+5oSicKrICwf1VAQsLf1ssDMBrnUpKSNp+4pVErSI=; b=rkxXymJcCMNa/faatbmnDl/4OdkiIjUCC+w2u48/RYQBXFNDQjjy8VYEY2Ha3YlZt0 ma95ir7X7SVJcsGBWaDOJYCDAbwzzGxXFMR/OT0J3IRWG019JnBmKul7A0vgVfXMz5hq yIomY2XGcycB9jGWiW2mwFObast9clFfhGiB8LOL/Tr2UDxId8Cqd6OsnX70JgqXZbcg pTLOKqcZKDECTJxJe0gbPXVE0d7hfyfpcLKzHtwwxCiO02UdIzXXN9c0clAZ5ArVD7v3 OfSTSRr6qkn42+wLRbt8U1o0z77n84Dg+I0Asb+sFXqJ6xdqPCVMEPACt4ob5pWAKjqo /lRg== 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:in-reply-to :references; bh=AW+5oSicKrICwf1VAQsLf1ssDMBrnUpKSNp+4pVErSI=; b=rjlzRKFMvjaW8WdFBCdxDGLDmebXSW6wejqdvshY5gxPcbKKmwurHa5NJ4bcEWbF9M S6W++Koe1m3GmYBDrzMAcJnMVm71m35jdEnxzzN/gVHKe5dAAptd6h+280E1vssFPIpZ X5pscqNWBYM5dQd+AfuO4w6VHlyJISvYnuM09qvmr2ZrgovFwRnzGDxXUZmM5sECyYZe 0ingPMiVACm1HVM+eQuYd6jEwryjg3a6KvM9Ajf6LLSzJLr2pXwQEjBI8ddMv9A/XRbP SDlmOgzNR8nZaR7M0StNo+p2us2TEKJd2aeB6kPB/HDMJ7GHujlVn8hPjH73wOjtPxBU SIeg== X-Gm-Message-State: AGRZ1gKF58SAb/8nWWBe/j6CJ01b8SXB1Dpv6JzB9fPk8FSNLzhE0cqf u0wAd6D/M2dcsQY3Q7A/rUIGoDClE0w= X-Google-Smtp-Source: AJdET5eywLU1wxk+51GXUtguByZqo9Zzp0m3Ko1SElCNUloXhFL+GWNXLgcLzXRU9Hpp5BuvwlHNkw== X-Received: by 2002:a2e:91d1:: with SMTP id u17-v6mr6794383ljg.160.1541804518001; Fri, 09 Nov 2018 15:01:58 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id c22sm1574318lfd.88.2018.11.09.15.01.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 15:01:57 -0800 (PST) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, hao.a.wu@intel.com, michael.d.kinney@intel.com, liming.gao@intel.com, ard.biesheuvel@linaro.org, nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com, tm@semihalf.com, jaz@semihalf.com Date: Sat, 10 Nov 2018 00:01:24 +0100 Message-Id: <1541804487-27458-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541804487-27458-1-git-send-email-mw@semihalf.com> References: <1541804487-27458-1-git-send-email-mw@semihalf.com> Subject: [PATCH v4 1/4] MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhase X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:01 -0000 In order to ensure bigger flexibility in the NotifyPhase routine of the SdMmcOverride protocol, enable using an optional phase-specific data. This will allow to exchange more information between the protocol producer driver and SdMmcPciHcDxe in the newly added callbacks. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas Reviewed-by: Ard Biesheuvel --- MdeModulePkg/Include/Protocol/SdMmcOverride.h | 4 +++- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 12 ++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h b/MdeModulePkg/Include/Protocol/SdMmcOverride.h index 0766252..8a7669e 100644 --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h @@ -63,6 +63,7 @@ EFI_STATUS @param[in] PhaseType The type of operation and whether the hook is invoked right before (pre) or right after (post) + @param[in,out] PhaseData The pointer to a phase-specific data. @retval EFI_SUCCESS The override function completed successfully. @retval EFI_NOT_FOUND The specified controller or slot does not exist. @@ -74,7 +75,8 @@ EFI_STATUS (EFIAPI * EDKII_SD_MMC_NOTIFY_PHASE) ( IN EFI_HANDLE ControllerHandle, IN UINT8 Slot, - IN EDKII_SD_MMC_PHASE_TYPE PhaseType + IN EDKII_SD_MMC_PHASE_TYPE PhaseType, + IN OUT VOID *PhaseData ); struct _EDKII_SD_MMC_OVERRIDE { diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index bedc968..923c55b 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c @@ -444,7 +444,8 @@ SdMmcHcReset ( Status = mOverride->NotifyPhase ( Private->ControllerHandle, Slot, - EdkiiSdMmcResetPre); + EdkiiSdMmcResetPre, + NULL); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "%a: SD/MMC pre reset notifier callback failed - %r\n", @@ -494,7 +495,8 @@ SdMmcHcReset ( Status = mOverride->NotifyPhase ( Private->ControllerHandle, Slot, - EdkiiSdMmcResetPost); + EdkiiSdMmcResetPost, + NULL); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "%a: SD/MMC post reset notifier callback failed - %r\n", @@ -1088,7 +1090,8 @@ SdMmcHcInitHost ( Status = mOverride->NotifyPhase ( Private->ControllerHandle, Slot, - EdkiiSdMmcInitHostPre); + EdkiiSdMmcInitHostPre, + NULL); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "%a: SD/MMC pre init notifier callback failed - %r\n", @@ -1123,7 +1126,8 @@ SdMmcHcInitHost ( Status = mOverride->NotifyPhase ( Private->ControllerHandle, Slot, - EdkiiSdMmcInitHostPost); + EdkiiSdMmcInitHostPost, + NULL); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "%a: SD/MMC post init notifier callback failed - %r\n", -- 2.7.4