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::242; helo=mail-lj1-x242.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (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 6550121A07A82 for ; Wed, 7 Nov 2018 17:58:57 -0800 (PST) Received: by mail-lj1-x242.google.com with SMTP id g26-v6so16555903lja.10 for ; Wed, 07 Nov 2018 17:58:57 -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=XfqakqBPZq5cEO0J17t1Ewe9o92SnZ8nBXr3lfo6r/upMs1JdvnO3MRbyLjC3YNcF+ 8OmznV8s05W6gi9B+GsVrTtY8mY3LqXa6SV6nVOr7gUj2QWG1EnXjko+IWICM4UMd5JH dCP0ugur28DpTjtx2Ll9tD7A+QCM9Aw1fobMAvgaQkbaIIB+j2Z/kZqwI/s9J+QbC6op zL+xLi2D4pLLWbdG3rcLHMgwE2SKWQC1Kj0dRRrlJIZ6RtD3fVUmMbIwhPILUwrPW17B wxK0dQPECvveHsgpYyFLtsijQTI0T8CgXi2m2VIxxLa7qubaQIZ65yeeP8xGbO47KnbB amHw== 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=ql48CRWgP5by+EHe5y+0D0Fz3HF4EWrjOQAY1I2l0uEzDrJ28J3lavvzT6uq7nvRMI S3NT3NgiMvb3npIgrFVh8DVjpvEGyEBPjQcyHKSKFPARA/VNaWaAf6j+NKNluGK10+96 f3LtA2hUKfSjXRx4VQFcMGLLnpt+jmf8mUZpid8cnxzFfxGNHdiJE5uWPh4vTbs2RRjz GZLddSsk/I+VtbjhFi5rHAAgEJaGJX8g6FAKcN9IZbaLrZSiOeSw9R7/isLFuIkVKuyD cHH2Nr87muWSjcdcaO3bfW7aRjRfOUlJPCVAUMpBciMm031BKMnDuVSYxzk9K78tFqcC gCxg== X-Gm-Message-State: AGRZ1gJNzAsOMpn9UCyTO5+QlqEAvX4/TCW7+e2zIt7nolAirieL0wR2 RltPKnya4S3nraCtwzYKL3HaE2UnL/s= X-Google-Smtp-Source: AJdET5efkAG0+VfqKWRUPKh2Zy9sf0+OuG+UO3jVcepYyxkZVgaOCmXgg+84iN3lOFY++UBhWq+PAg== X-Received: by 2002:a2e:9783:: with SMTP id y3-v6mr1558026lji.167.1541642335286; Wed, 07 Nov 2018 17:58:55 -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 r22-v6sm386223ljg.82.2018.11.07.17.58.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Nov 2018 17:58:54 -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: Thu, 8 Nov 2018 02:57:32 +0100 Message-Id: <1541642255-15602-2-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541642255-15602-1-git-send-email-mw@semihalf.com> References: <1541642255-15602-1-git-send-email-mw@semihalf.com> Subject: [PATCH v3 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: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -0000 X-List-Received-Date: Thu, 08 Nov 2018 01:58:57 -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