From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web10.3911.1574411561454630493 for ; Fri, 22 Nov 2019 00:32:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Js5cb9W8; spf=pass (domain: linaro.org, ip: 209.85.221.48, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f48.google.com with SMTP id b18so7525732wrj.8 for ; Fri, 22 Nov 2019 00:32:41 -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:mime-version :content-transfer-encoding; bh=d3fBDKu5z98l9xWsy9NRLuvMnWZ2D7PG/nPExxpR0NA=; b=Js5cb9W8tr1rB3g9porWeus3xBNdLNecMl7CNHCEkkc58qmBqWIoTpgSPBx8jypPH4 N5OKUvw96FfhFaLseIS1wBNjt7Xjk+wUPCZwI291WsCGK9gGvrhlLvdFBH1EfYogD8GU qEvYOZuR7enFb+3tzvJX6lBgL5nP3r4j+VDkr7fsHHJrmPZF3nlTYQs9jKPbPw9qYLN7 fsKM1gs5T+tgjMUIvgEmAVzEh12SFA2hhkka5J9iQ1/NHH2hqk2RUHACKxpXWgrRP2Z1 8HTfR+FqVL7pl8pabPmhNFqRxcpJ/iN9ipbmDklyp9vnxymN/sibF+e9N9IIR1u0/vqy 8mGw== 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:mime-version :content-transfer-encoding; bh=d3fBDKu5z98l9xWsy9NRLuvMnWZ2D7PG/nPExxpR0NA=; b=L1LLFXmZ+aNoE68AqeCBziqLhR+xvlrWaIn4ipboaeezGPINCu1BUDB3+tNMOgxH5B d1b+tz26BSRQeM78nbreFKMo1YGAR1qEBujmHaMD4XI6r5T+5XnqQPVTNe1V0KeE9m7G +4S062ao4jvwIB4OprFWq01ioRSF2xkFh4NpRcXknq7zFt3lKDNMfh4tD+SKYNgSgFUQ pEhYp+FnNWx/yOqd/ewC/vPCdDcXC/l0XZduZJCcumB2TKRNYV31DIKSvdoveF5xuax+ LL9dLZyHiJOcJK46OUDrfgBeDgglvuJ/6KNEhXFS4v4EXJcy1LJEwazRnFMUBy9T8b8R yrlA== X-Gm-Message-State: APjAAAUoQz2rpjWmX9Q0tVsj9u6Cf91He46T0UXKCXq08S942M09iCeZ oNfWq2J06/tsQIK0EUYV22t4GfDJ/jGoLBvT X-Google-Smtp-Source: APXvYqz6JpLVIVsXOYdlsLxMWJUiH0lOKA2vmVOC+4oym3YhrH/A0l0o8/fCsBRRJQtdVE/lgg20Vw== X-Received: by 2002:adf:f5c6:: with SMTP id k6mr15812785wrp.245.1574411559702; Fri, 22 Nov 2019 00:32:39 -0800 (PST) Return-Path: Received: from sudo.home ([2a01:cb1d:112:6f00:ac04:254:3863:fdeb]) by smtp.gmail.com with ESMTPSA id c15sm7225845wrx.78.2019.11.22.00.32.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Nov 2019 00:32:38 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, Ard Biesheuvel , piwg@uefi.org, kimon.berlin@hp.com, eugene@hp.com Subject: [PATCH 0/6] PIWG M1993 - implement EFI_MM_COMMUNICATE2_PROTOCOL Date: Fri, 22 Nov 2019 09:32:28 +0100 Message-Id: <20191122083234.12756-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit As discussed in the PIWG call on 21 November, I am sending out my implementation of the MM communicate 2 protocol for review. It is intended to work around the impedance mismatch between traditional SMM (which uses physical addresses in the communication between DXE components) and standalone MM (which uses virtual addresses) The solution presented here is to introduce a new protocol that takes both addresses, forcing the clients to pass both, but freeing them from the responsibility to reason about which kind of address to pass: this becomes the responsibility of the MM_COMMUNICATE implementation, which is where it belongs. Cc: piwg@uefi.org Cc: kimon.berlin@hp.com Cc: eugene@hp.com Ard Biesheuvel (6): MdePkg: introduce MM communicate 2 protocol MdeModulePkg/SmmIpl: expose MM communicate 2 protocol ArmPkg/MmCommunicationDxe: expose MM Communicate 2 protocol MdeModulePkg/VariableInfo: switch to MM communicate 2 protocol MdeModulePkg/FaultTolerantWriteSmmDxe: switch to MM communicate 2 protocol MdeModulePkg/VariableSmmRuntimeDxe: switch to MM communicate 2 protocol ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c | 83 +++++++++----------- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf | 6 +- MdeModulePkg/Application/VariableInfo/VariableInfo.c | 19 +++-- MdeModulePkg/Application/VariableInfo/VariableInfo.inf | 2 +- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 79 +++++++++++++++++++ MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf | 1 + MdeModulePkg/Include/Guid/SmmVariableCommon.h | 6 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h | 2 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c | 25 +++--- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h | 2 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf | 4 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | 39 ++++----- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf | 4 +- MdePkg/Include/Protocol/MmCommunication2.h | 69 ++++++++++++++++ MdePkg/MdePkg.dec | 7 ++ 15 files changed, 254 insertions(+), 94 deletions(-) create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h -- 2.20.1