From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Google-Smtp-Source: ALg8bN413aSDwFVLNx/vZKu5FxusRX3sEBzcuT80H/sVHDh+YLL8WubyzM6LUzYyT6b+yBuEutcVvw== 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 Cc: Ard Biesheuvel , Laszlo Ersek , Leif Lindholm , Michael D Kinney , Liming Gao , Jian J Wang , Hao Wu , Jagadeesh Ujja , Achin Gupta , Thomas Panakamattam Abraham , Sami Mujawar 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: [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: , X-List-Received-Date: Thu, 03 Jan 2019 18:28:53 -0000 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(+) 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. ## -- 2.17.1