From patchwork Tue Mar 5 13:32:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 159660 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4975227jad; Tue, 5 Mar 2019 05:33:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwSdcBwCBQHjdPULGcCwOT0R+F0lXxIh1yNHPtFw2dtezG1RXgNVfXJrjRz364bVUUU7LJ2 X-Received: by 2002:a63:20a:: with SMTP id 10mr1430275pgc.346.1551792807532; Tue, 05 Mar 2019 05:33:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551792807; cv=none; d=google.com; s=arc-20160816; b=P8paH5KFeEpD30srOMnC+XYNEqVY/B/q0XiMQ5a0rOIHaNCptOMDCs8bqrs9Uus2D2 C+ZVlDG1vaZEBv0PgwEIGwKI9DSfzXOReWS7YJZfOs0MBMUCG/qmGJL1gUdf0A3qWtae yBzLsE2UrQNaRGOW9fhddILtZg64vYy68oo3LrljUHQuLO2z5cMYVCZVQtIVCJBI8nKk Q+c7YwDxRTE1cTrYD693kkuYolN8hI2C7obRs8JLfZUpQ92UHPBI/rE1seVjf2fFmiQO PQhVigdr1GRIOyl/BfPXUVGjjr+Q9reYDB8DWrQ/XZmbd7YW9PhGwDeR6eUpWvSlkDj8 GHbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=t3TDzyLKH4mZFg+mgQIEBqcd6RZuADTQi2PhzXU/zxs=; b=EWDNlqyP0Kv26CtGc2NzhvlYfu100jm3uPN49BH29bso3oxPStSJO6b/V/fR7rQvGs WouaNMeX4Wj+u1D5hBQx6XhyhGWfeW8mX4p8qyA62GAc76lS2GDP/WgYF0+37W+IBx2v 2GvJn5Dx6PfV+veIvboQkPPK6Jij6E7+Bia8ErCs01fmth5l1hHxF2mBSKzjQ2vXmAXN IaHGZ8kAx9MXCJ99qZmNL6ao8S2QWFv7VD4LA1D4geeJb9z0OLvqpIUG3CkQunroLYCI N9HCYgxIF5Fv9+fVgTpQzpmeqAPJ2hgolF27aNLCr+Tp2dWYLMkkhDhE5dG/3JQKbc8J I1lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T60RokXD; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id z2si8226209pfl.179.2019.03.05.05.33.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T60RokXD; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7CEE4211D506E; Tue, 5 Mar 2019 05:33:10 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 3F076211D5051 for ; Tue, 5 Mar 2019 05:33:08 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id n2so9471365wrw.8 for ; Tue, 05 Mar 2019 05:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0U8Xn18rCjtxSoCUCM8BxLk5E+iUxYvLGNfa0yD0XIo=; b=T60RokXD9wBfTG0VRD2Ufb5RVnOncsndoRICMJEBU0Ta92zt9K8Wt6aHDXx197Q2gZ l/RpHEEV7xuRAA+x875OHlBWHFnWubguSm4Mx4jnwknYK1xsN5Bo1UdaId4oRiMyCeI5 kxbK2sy6cCIHyKCU/pz/kSFXYugANpRx+0ju1FGQ/pLD7+9oGErkqJuTrpfLV9ZnGwIi g0vvaOX3KeJzNRSlyMJ5zpp49Aw992s+2uyiaOyhUL6IT6E1T9NMaJd2iZE39piC3b+f J/BpYHZX62REa5FjjgOYA34xq6y9eg1A1lkzX84NY1JUMcnyBeFmZo3hnLr5nVnfMytt BeOg== 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:mime-version:content-transfer-encoding; bh=0U8Xn18rCjtxSoCUCM8BxLk5E+iUxYvLGNfa0yD0XIo=; b=rZDeHl1nIhodvGr/HLLe9qwHCuoSuctCzLTyjA5WhIO/ZSmkngG/4nlvkeUdJEm3fB vElN6FwvMSDk+eJmCMLhF0Mhix0LMKDhO82s7TNFQcMyR2dOWW1rLD8R7VORjbZkn55z +He3UF8zZKOuTWfFp1x5xuMEWoskQbAAxHb6XD27mcqbTYrG+yMD8oSdrSA7xmZjfvIA 3kJqSZ0SZN8fOQqzWrrbX8nVKvOxPW1/gpZC5FPGUcy+6YPt21mVWpAhf5/dizZW1Bw+ 0hGDKTEe1mACQp4vjZxlQ6FsrjlKJiNPRM0bdVr94aH6DNaw9qNPGjLlhzpxGjKJkxUE ZE9g== X-Gm-Message-State: APjAAAULg7briUMiApvZSKSgbfG72VCgxn5KtbrhFxIbgvAfXYc15PNW a5ineV22HojoFU6vKZWlpe9UveRt+40= X-Received: by 2002:a05:6000:1110:: with SMTP id z16mr16642716wrw.28.1551792786086; Tue, 05 Mar 2019 05:33:06 -0800 (PST) Received: from localhost.localdomain (aputeaux-684-1-18-114.w90-86.abo.wanadoo.fr. [90.86.221.114]) by smtp.gmail.com with ESMTPSA id i4sm8370097wrw.19.2019.03.05.05.33.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Mar 2019 05:33:05 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 5 Mar 2019 14:32:46 +0100 Message-Id: <20190305133248.4828-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190305133248.4828-1-ard.biesheuvel@linaro.org> References: <20190305133248.4828-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 08/10] StandaloneMmPkg/Core: drop support for dispatching FVs into MM 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: , Cc: Jiewen Yao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Remove the support that permits calls into the MM context to dispatch firmware volumes that are not part of the initial standalone MM firmware volume. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- StandaloneMmPkg/Core/StandaloneMmCore.h | 22 ---------- StandaloneMmPkg/Core/Dispatcher.c | 46 -------------------- StandaloneMmPkg/Core/StandaloneMmCore.c | 1 - 3 files changed, 69 deletions(-) -- 2.20.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: jiewen.yao@intel.com Reviewed-by: achin.gupta@arm.com diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.h b/StandaloneMmPkg/Core/StandaloneMmCore.h index 0d20bcaa6be5..74338dc9da0d 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.h +++ b/StandaloneMmPkg/Core/StandaloneMmCore.h @@ -635,28 +635,6 @@ MmDriverDispatchHandler ( @return Status Code -**/ -EFI_STATUS -EFIAPI -MmFvDispatchHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ); - -/** - This function is the main entry point for an MM handler dispatch - or communicate-based callback. - - @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - **/ EFI_STATUS EFIAPI diff --git a/StandaloneMmPkg/Core/Dispatcher.c b/StandaloneMmPkg/Core/Dispatcher.c index bede4832cfb7..4b2f38f700a0 100644 --- a/StandaloneMmPkg/Core/Dispatcher.c +++ b/StandaloneMmPkg/Core/Dispatcher.c @@ -883,52 +883,6 @@ MmAddToDriverList ( return EFI_SUCCESS; } -/** - This function is the main entry point for an MM handler dispatch - or communicate-based callback. - - @param DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister(). - @param Context Points to an optional handler context which was specified when the handler was registered. - @param CommBuffer A pointer to a collection of data in memory that will - be conveyed from a non-MM environment into an MM environment. - @param CommBufferSize The size of the CommBuffer. - - @return Status Code - -**/ -EFI_STATUS -EFIAPI -MmFvDispatchHandler ( - IN EFI_HANDLE DispatchHandle, - IN CONST VOID *Context, OPTIONAL - IN OUT VOID *CommBuffer, OPTIONAL - IN OUT UINTN *CommBufferSize OPTIONAL - ) -{ - EFI_STATUS Status; - EFI_MM_COMMUNICATE_FV_DISPATCH_DATA *CommunicationFvDispatchData; - EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; - - DEBUG ((DEBUG_INFO, "MmFvDispatchHandler\n")); - - CommunicationFvDispatchData = CommBuffer; - - DEBUG ((DEBUG_INFO, " Dispatch - 0x%016lx - 0x%016lx\n", CommunicationFvDispatchData->Address, - CommunicationFvDispatchData->Size)); - - FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)CommunicationFvDispatchData->Address; - - MmCoreFfsFindMmDriver (FwVolHeader); - - // - // Execute the MM Dispatcher on any newly discovered FVs and previously - // discovered MM drivers that have been discovered but not dispatched. - // - Status = MmDispatcher (); - - return Status; -} - /** Traverse the discovered list for any drivers that were discovered but not loaded because the dependency experessions evaluated to false. diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.c b/StandaloneMmPkg/Core/StandaloneMmCore.c index ec53b8d8bec4..766cdb5c848c 100644 --- a/StandaloneMmPkg/Core/StandaloneMmCore.c +++ b/StandaloneMmPkg/Core/StandaloneMmCore.c @@ -99,7 +99,6 @@ BOOLEAN mInLegacyBoot = FALSE; // Table of MMI Handlers that are registered by the MM Core when it is initialized // MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] = { - { MmFvDispatchHandler, &gMmFvDispatchGuid, NULL, TRUE }, { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL, TRUE }, { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, FALSE }, { MmLegacyBootHandler, &gEfiEventLegacyBootGuid, NULL, FALSE },