From patchwork Thu Jan 3 18:28:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 154737 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp950299ljp; Thu, 3 Jan 2019 10:28:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN7sHrJUgi4Fup9dcoDLpMG5IzdBB25F5evd98sTt928LifJafGmhojom4RnYH7vSwO1UVWy X-Received: by 2002:a17:902:6f09:: with SMTP id w9mr49136515plk.309.1546540138698; Thu, 03 Jan 2019 10:28:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546540138; cv=none; d=google.com; s=arc-20160816; b=R5aMKzoWaKm13WsHugv4ftH38zUD+GVOZqxsNbFst72J0f0rYcB23vSBU49xCQROI3 ELK7ZuHGJNxe67chnhq5RsNQmYn5HUwyCy3yczQOFNRiqxqjIvMsNd7GPmDkei6eqnmf qKuMmVYodxD43zyNhhjt+5qCIqi2edXApQZo5qiGy933QuPrzeeqJRSjRYUep6dPCvY0 zzEIxlcmOq9VWKZ3C/K6liKB4VMuOS3FxSMCMGh2fbOqRB9OCQBRd0hhe0rl9JBKJRoz EGAIcmozb0jsxO5152yNTtHkylrc8CzzWgKRy8+aI2xhYVvrDpuYTnnXA/1bzqR1+7/9 bDmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=53n3BDtUt6mswajtHqipV72LLQ7amyCGK7tzD+VHrqo=; b=01t0s5rQ3bAq/IoInbEl8WI5Ip1Ptaj87QdEcGgUkbQJIuPDjQ7Cj9X2USv3sh9emH 8Ul0F0mHGKW9sDtoKBBLr+V9v1o3w1JiKGcZY7cIZs9bWZjuCQ5mHH4ySuDpE9Iwcg5E bI48e4NWE9+8NrqPAQDlL+vB0ca5cjZr8iJsqYe7FrqtXucYlMDAoNGsFiuj2lZrRdlb CZxurYWjhmI9XDz02HodROoVCjuqrve9FjXJkHxNJZ9yxqAQ+Jsl4eLsz1K24FowbwiO 7uDE8/Y/SVR9FMycE4xTjMHB/buGAqCDGXvuzGxw0uV1bmknS8rg/Vs3uqs8sRMJJxqu eUKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=QpDuhalC; 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 133si4628319pfw.64.2019.01.03.10.28.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jan 2019 10:28:58 -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=QpDuhalC; 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 0BC86211ADA45; Thu, 3 Jan 2019 10:28:54 -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::543; helo=mail-ed1-x543.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (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 B1777211ADA3B for ; Thu, 3 Jan 2019 10:28:52 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id h15so29799208edb.4 for ; Thu, 03 Jan 2019 10:28:52 -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; bh=xJoQURgxYEJ3pzhOVyuRI2bfPOf00NGpGGG3zUqfqBs=; b=QpDuhalCP29yqQCElOcrAU35OMcMf3jVZwyLPz7rgDKDCihVzs3fVNz4Dbl4PfGccA ia03ShM5r209fEEgF+wTy0qf68REv0h7hGGkRvrLF1el15rndBZGCk+7b8VXGTu60VyH 0tej9BBchIkLOgewULinbV4eANG5OODNj7kBg= 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=xJoQURgxYEJ3pzhOVyuRI2bfPOf00NGpGGG3zUqfqBs=; b=Tpw129SMjp+wp0X1k9asmlqZZlzu4KEz43QG1Tsu9SW0yfgYrrMzWjkwmMGg72l47B pIYemQ/e/n1SbMIFgCCBumMa+RwS4m15lftEyAl0rwCF7btZoaGRlLwtk4UWN05lu8dq idKzcoD6e2XxVLPON2SRn3LsTvdPG3kKk/VscqujftvmjqN0UfNkqn/WTtNbQseqOVet OQ7ppJRG40zQoCiuj46aM88zostA4P3OoqjC6fEgJ2ubUNJGRDdJQVmjev9Se9koPJPz zXl954EjGGF6Y4Rdn3eBcHSoKinAd3/hUO2srNFi32Pt1w3vl4XzEHm6MYaHxtgjXEhc gYpQ== X-Gm-Message-State: AJcUukcEtSDfMES/vzXQiyvV4ZC1KcJv+67L89u3Bow3Zi8S/1oOhm15 dXm4NnvCqTLw8BzBgOz80ATXpIK1bxPalw== X-Received: by 2002:a50:d753:: with SMTP id i19mr3260270edj.75.1546540130869; Thu, 03 Jan 2019 10:28:50 -0800 (PST) Received: from dogfood.home ([2a01:cb1d:112:6f00:704e:c241:dc88:597d]) by smtp.gmail.com with ESMTPSA id a11sm25707206edc.28.2019.01.03.10.28.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jan 2019 10:28:50 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 3 Jan 2019 19:28:20 +0100 Message-Id: <20190103182825.32231-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190103182825.32231-1-ard.biesheuvel@linaro.org> References: <20190103182825.32231-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 1/6] MdePkg/Include: add MmServicesTableLib header file 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: Hao Wu , Liming Gao , Michael D Kinney , Laszlo Ersek MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" From: Jagadeesh Ujja SMM has been rebranded as MM, and can be implemented in traditional mode or standalone mode, using the same prototype for the services table. Expose this table via MmServicesTableLib, permitting the respective implementations to expose a traditional or standalone version. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jagadeesh Ujja Signed-off-by: Ard Biesheuvel --- MdePkg/Include/Library/MmServicesTableLib.h | 25 ++++++++++++++++++++ MdePkg/MdePkg.dec | 4 ++++ 2 files changed, 29 insertions(+) -- 2.17.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdePkg/Include/Library/MmServicesTableLib.h b/MdePkg/Include/Library/MmServicesTableLib.h new file mode 100644 index 000000000000..12bd01e98641 --- /dev/null +++ b/MdePkg/Include/Library/MmServicesTableLib.h @@ -0,0 +1,25 @@ +/** @file + Provides a service to retrieve a pointer to the Standalone MM Services Table. + Only available to Standalone MM module types. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
+ +This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __MM_SERVICES_TABLE_LIB_H__ +#define __MM_SERVICES_TABLE_LIB_H__ + +#include + +extern EFI_MM_SYSTEM_TABLE *gMmst; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 712bd46dd3d3..a7383b6daafb 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -243,6 +243,10 @@ [LibraryClasses] ## SafeIntLib|Include/Library/SafeIntLib.h + ## @libraryclass Provides a service to retrieve a pointer to the Standalone MM Services Table. + # Only available to MM_STANDALONE, SMM/DXE Combined and SMM module types. + MmServicesTableLib|Include/Library/MmServicesTableLib.h + [LibraryClasses.IA32, LibraryClasses.X64] ## @libraryclass Abstracts both S/W SMI generation and detection. ##