From nobody Sun May 5 17:26:16 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1492789804421474.6447451937082; Fri, 21 Apr 2017 08:50:04 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E70EF2195407E; Fri, 21 Apr 2017 08:50:01 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7C0AF21A04817 for ; Fri, 21 Apr 2017 08:49:59 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 08:49:58 -0700 Received: from jyao1-mobl.ccr.corp.intel.com ([10.254.208.87]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2017 08:49:58 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,230,1488873600"; d="scan'208";a="77273797" From: Jiewen Yao To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 23:49:50 +0800 Message-Id: <1492789793-22624-2-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> References: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> Subject: [edk2] [PATCH 1/4] MdePkg/SmmIoLib: Add header file. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Fan , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This SmmIoLib is used to check if an IO resource is valid in SMM. Cc: Jeff Fan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdePkg/Include/Library/SmmIoLib.h | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/MdePkg/Include/Library/SmmIoLib.h b/MdePkg/Include/Library/Smm= IoLib.h new file mode 100644 index 0000000..7820f1e --- /dev/null +++ b/MdePkg/Include/Library/SmmIoLib.h @@ -0,0 +1,42 @@ +/** @file + Provides services for SMM IO Operation. + + The SMM IO Library provides function for checking if IO resource is acce= ssible inside of SMM. + + Copyright (c) 2017, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e 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 IMP= LIED. + +**/ + +#ifndef _SMM_IO_LIB_H_ +#define _SMM_IO_LIB_H_ + +/** + This function check if the MMIO resource is valid per processor architec= ture and + valid per platform design. + + @param BaseAddress The MMIO start address to be checked. + @param Length The MMIO length to be checked. + @param Owner A GUID representing the owner of the resource. + This GUID may be used by producer to correlate the d= evice ownership of the resource. + NULL means no specific owner. + + @retval TRUE This MMIO resource is valid per processor architecture and= valid per platform design. + @retval FALSE This MMIO resource is not valid per processor architecture= or valid per platform design. +**/ +BOOLEAN +EFIAPI +SmmIsMmioValid ( + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_GUID *Owner OPTIONAL + ); + +#endif + --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 17:26:16 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1492789807139557.2710189832759; Fri, 21 Apr 2017 08:50:07 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 305CD21954088; Fri, 21 Apr 2017 08:50:02 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BDE8521A04817 for ; Fri, 21 Apr 2017 08:50:00 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 08:50:00 -0700 Received: from jyao1-mobl.ccr.corp.intel.com ([10.254.208.87]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2017 08:49:59 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,230,1488873600"; d="scan'208";a="77273816" From: Jiewen Yao To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 23:49:51 +0800 Message-Id: <1492789793-22624-3-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> References: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> Subject: [edk2] [PATCH 2/4] MdePkg/SmmIoLib: Add sample instance. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Fan , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The sample instance check if IO resource is valid one defined in GCD. A platform may choose add more check to exclude some other IO resource. Cc: Jeff Fan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdePkg/Library/SmmIoLib/SmmIoLib.c | 331 ++++++++++++++++++++ MdePkg/Library/SmmIoLib/SmmIoLib.inf | 53 ++++ MdePkg/Library/SmmIoLib/SmmIoLib.uni | 23 ++ 3 files changed, 407 insertions(+) diff --git a/MdePkg/Library/SmmIoLib/SmmIoLib.c b/MdePkg/Library/SmmIoLib/S= mmIoLib.c new file mode 100644 index 0000000..995adac --- /dev/null +++ b/MdePkg/Library/SmmIoLib/SmmIoLib.c @@ -0,0 +1,331 @@ +/** @file + Instance of SMM IO check library. + + SMM IO check library library implementation. This library consumes GCD t= o collect all valid + IO space defined by a platform. + A platform may have its own SmmIoLib instance to exclude more IO space. + + Copyright (c) 2017, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e 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 IMP= LIED. + +**/ + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +EFI_GCD_MEMORY_SPACE_DESCRIPTOR *mSmmIoLibGcdMemSpace =3D NULL; +UINTN mSmmIoLibGcdMemNumberOfDesc =3D 0; + +EFI_PHYSICAL_ADDRESS mSmmIoLibInternalMaximumSupportMemAddress =3D 0; + +VOID *mSmmIoLibRegistrationEndOfDxe; +VOID *mSmmIoLibRegistrationReadyToLock; + +BOOLEAN mSmmIoLibReadyToLock =3D FALSE; + +/** + Calculate and save the maximum support address. + +**/ +VOID +SmmIoLibInternalCalculateMaximumSupportAddress ( + VOID + ) +{ + VOID *Hob; + UINT32 RegEax; + UINT8 MemPhysicalAddressBits; + + // + // Get physical address bits supported. + // + Hob =3D GetFirstHob (EFI_HOB_TYPE_CPU); + if (Hob !=3D NULL) { + MemPhysicalAddressBits =3D ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace; + } else { + AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); + if (RegEax >=3D 0x80000008) { + AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); + MemPhysicalAddressBits =3D (UINT8) RegEax; + } else { + MemPhysicalAddressBits =3D 36; + } + } + // + // IA-32e paging translates 48-bit linear addresses to 52-bit physical a= ddresses. + // + ASSERT (MemPhysicalAddressBits <=3D 52); + if (MemPhysicalAddressBits > 48) { + MemPhysicalAddressBits =3D 48; + } + + // + // Save the maximum support address in one global variable + // + mSmmIoLibInternalMaximumSupportMemAddress =3D (EFI_PHYSICAL_ADDRESS)(UIN= TN)(LShiftU64 (1, MemPhysicalAddressBits) - 1); + DEBUG ((DEBUG_INFO, "mSmmIoLibInternalMaximumSupportMemAddress =3D 0x%lx= \n", mSmmIoLibInternalMaximumSupportMemAddress)); +} + +/** + This function check if the MMIO resource is valid per processor architec= ture and + valid per platform design. + + @param BaseAddress The MMIO start address to be checked. + @param Length The MMIO length to be checked. + @param Owner A GUID representing the owner of the resource. + This GUID may be used by producer to correlate the d= evice ownership of the resource. + NULL means no specific owner. + + @retval TRUE This MMIO resource is valid per processor architecture and= valid per platform design. + @retval FALSE This MMIO resource is not valid per processor architecture= or valid per platform design. +**/ +BOOLEAN +EFIAPI +SmmIsMmioValid ( + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_GUID *Owner OPTIONAL + ) +{ + UINTN Index; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Desc; + BOOLEAN InValidRegion; + + // + // Check override. + // NOTE: (B:0->L:4G) is invalid for IA32, but (B:1->L:4G-1)/(B:4G-1->L:1= ) is valid. + // + if ((Length > mSmmIoLibInternalMaximumSupportMemAddress) || + (BaseAddress > mSmmIoLibInternalMaximumSupportMemAddress) || + ((Length !=3D 0) && (BaseAddress > (mSmmIoLibInternalMaximumSupportM= emAddress - (Length - 1)))) ) { + // + // Overflow happen + // + DEBUG (( + DEBUG_ERROR, + "SmmIsMmioValid: Overflow: BaseAddress (0x%lx) - Length (0x%lx), Max= imumSupportMemAddress (0x%lx)\n", + BaseAddress, + Length, + mSmmIoLibInternalMaximumSupportMemAddress + )); + return FALSE; + } + + // + // Check override for valid MMIO region + // + if (mSmmIoLibReadyToLock) { + InValidRegion =3D FALSE; + for (Index =3D 0; Index < mSmmIoLibGcdMemNumberOfDesc; Index ++) { + Desc =3D &mSmmIoLibGcdMemSpace[Index]; + if ((Desc->GcdMemoryType =3D=3D EfiGcdMemoryTypeMemoryMappedIo) && + (BaseAddress >=3D Desc->BaseAddress) && + ((BaseAddress + Length) <=3D (Desc->BaseAddress + Desc->Length))= ) { + InValidRegion =3D TRUE; + } + } + + if (!InValidRegion) { + DEBUG (( + DEBUG_ERROR, + "SmmIsMmioValid: Not in valid MMIO region: BaseAddress (0x%lx) - L= ength (0x%lx)\n", + BaseAddress, + Length + )); + ASSERT (FALSE); + return FALSE; + } + } + return TRUE; +} + +/** + Merge continous entries whose type is EfiGcdMemoryTypeMemoryMappedIo. + + @param[in, out] GcdMemoryMap A pointer to the buffer in which= firmware places + the current GCD memory map. + @param[in, out] NumberOfDescriptors A pointer to the number of the + GcdMemoryMap buffer. On input, t= his is the number of + the current GCD memory map. On = output, + it is the number of new GCD memo= ry map after merge. +**/ +STATIC +VOID +MergeGcdMmioEntry ( + IN OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMap, + IN OUT UINTN *NumberOfDescriptors + ) +{ + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMapEntry; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMapEnd; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *NewGcdMemoryMapEntry; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *NextGcdMemoryMapEntry; + + GcdMemoryMapEntry =3D GcdMemoryMap; + NewGcdMemoryMapEntry =3D GcdMemoryMap; + GcdMemoryMapEnd =3D (EFI_GCD_MEMORY_SPACE_DESCRIPTOR *) ((UINT8 *) GcdMe= moryMap + (*NumberOfDescriptors) * sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR)); + while ((UINTN)GcdMemoryMapEntry < (UINTN)GcdMemoryMapEnd) { + CopyMem (NewGcdMemoryMapEntry, GcdMemoryMapEntry, sizeof(EFI_GCD_MEMOR= Y_SPACE_DESCRIPTOR)); + NextGcdMemoryMapEntry =3D GcdMemoryMapEntry + 1; + + do { + if (((UINTN)NextGcdMemoryMapEntry < (UINTN)GcdMemoryMapEnd) && + (GcdMemoryMapEntry->GcdMemoryType =3D=3D EfiGcdMemoryTypeMemoryM= appedIo) && (NextGcdMemoryMapEntry->GcdMemoryType =3D=3D EfiGcdMemoryTypeMe= moryMappedIo) && + ((GcdMemoryMapEntry->BaseAddress + GcdMemoryMapEntry->Length) = =3D=3D NextGcdMemoryMapEntry->BaseAddress)) { + GcdMemoryMapEntry->Length +=3D NextGcdMemoryMapEntry->Length; + if (NewGcdMemoryMapEntry !=3D GcdMemoryMapEntry) { + NewGcdMemoryMapEntry->Length +=3D NextGcdMemoryMapEntry->Length; + } + + NextGcdMemoryMapEntry =3D NextGcdMemoryMapEntry + 1; + continue; + } else { + GcdMemoryMapEntry =3D NextGcdMemoryMapEntry - 1; + break; + } + } while (TRUE); + + GcdMemoryMapEntry =3D GcdMemoryMapEntry + 1; + NewGcdMemoryMapEntry =3D NewGcdMemoryMapEntry + 1; + } + + *NumberOfDescriptors =3D ((UINTN)NewGcdMemoryMapEntry - (UINTN)GcdMemory= Map) / sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR); + + return ; +} + +/** + Notification for SMM EndOfDxe protocol. + + @param[in] Protocol Points to the protocol's unique identifier. + @param[in] Interface Points to the interface instance. + @param[in] Handle The handle on which the interface was installed. + + @retval EFI_SUCCESS Notification runs successfully. +**/ +EFI_STATUS +EFIAPI +SmmIoLibInternalEndOfDxeNotify ( + IN CONST EFI_GUID *Protocol, + IN VOID *Interface, + IN EFI_HANDLE Handle + ) +{ + UINTN NumberOfDescriptors; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemSpaceMap; + EFI_STATUS Status; + + Status =3D gDS->GetMemorySpaceMap (&NumberOfDescriptors, &MemSpaceMap); + if (!EFI_ERROR (Status)) { + + MergeGcdMmioEntry (MemSpaceMap, &NumberOfDescriptors); + + mSmmIoLibGcdMemSpace =3D AllocateCopyPool (NumberOfDescriptors * sizeo= f (EFI_GCD_MEMORY_SPACE_DESCRIPTOR), MemSpaceMap); + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + gBS->FreePool (MemSpaceMap); + return Status; + } + + mSmmIoLibGcdMemNumberOfDesc =3D NumberOfDescriptors; + gBS->FreePool (MemSpaceMap); + } + + return EFI_SUCCESS; +} + +/** + Notification for SMM ReadyToLock protocol. + + @param[in] Protocol Points to the protocol's unique identifier. + @param[in] Interface Points to the interface instance. + @param[in] Handle The handle on which the interface was installed. + + @retval EFI_SUCCESS Notification runs successfully. +**/ +EFI_STATUS +EFIAPI +SmmIoLibInternalReadyToLockNotify ( + IN CONST EFI_GUID *Protocol, + IN VOID *Interface, + IN EFI_HANDLE Handle + ) +{ + mSmmIoLibReadyToLock =3D TRUE; + return EFI_SUCCESS; +} + +/** + The constructor function initializes the Smm IO library + + @param ImageHandle The firmware allocated handle for the EFI image. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. + +**/ +EFI_STATUS +EFIAPI +SmmIoLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + // + // Calculate and save maximum support address + // + SmmIoLibInternalCalculateMaximumSupportAddress (); + + // + // Register EndOfDxe to get GCD resource map + // + Status =3D gSmst->SmmRegisterProtocolNotify (&gEfiSmmEndOfDxeProtocolGui= d, SmmIoLibInternalEndOfDxeNotify, &mSmmIoLibRegistrationEndOfDxe); + ASSERT_EFI_ERROR (Status); + + // + // Register ready to lock so that we can know when to check valid resour= ce region + // + Status =3D gSmst->SmmRegisterProtocolNotify (&gEfiSmmReadyToLockProtocol= Guid, SmmIoLibInternalReadyToLockNotify, &mSmmIoLibRegistrationReadyToLock); + ASSERT_EFI_ERROR (Status); + + return EFI_SUCCESS; +} + +/** + The destructor function frees resource used in the Smm IO library + + @param[in] ImageHandle The firmware allocated handle for the EFI imag= e. + @param[in] SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The deconstructor always returns EFI_SUCCESS. +**/ +EFI_STATUS +EFIAPI +SmmIoLibDestructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + gSmst->SmmRegisterProtocolNotify (&gEfiSmmEndOfDxeProtocolGuid, NULL, &m= SmmIoLibRegistrationEndOfDxe); + gSmst->SmmRegisterProtocolNotify (&gEfiSmmReadyToLockProtocolGuid, NULL,= &mSmmIoLibRegistrationReadyToLock); + return EFI_SUCCESS; +} diff --git a/MdePkg/Library/SmmIoLib/SmmIoLib.inf b/MdePkg/Library/SmmIoLib= /SmmIoLib.inf new file mode 100644 index 0000000..d508408 --- /dev/null +++ b/MdePkg/Library/SmmIoLib/SmmIoLib.inf @@ -0,0 +1,53 @@ +## @file +# Instance of SMM IO check library. +# +# SMM IO check library library implementation. This library consumes GCD = to collect all valid +# IO space defined by a platform. +# A platform may have its own SmmIoLib instance to exclude more IO space. +# +# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD 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 IM= PLIED. +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D SmmIoLib + MODULE_UNI_FILE =3D SmmIoLib.uni + FILE_GUID =3D F0F5A845-E3ED-4C6E-82D6-4ECE85DAC00F + MODULE_TYPE =3D DXE_SMM_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D SmmIoLib|DXE_SMM_DRIVER SMM_CORE + CONSTRUCTOR =3D SmmIoLibConstructor + DESTRUCTOR =3D SmmIoLibDestructor + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources] + SmmIoLib.c + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + SmmServicesTableLib + UefiBootServicesTableLib + DxeServicesTableLib + DebugLib + BaseMemoryLib + MemoryAllocationLib + HobLib + +[Protocols] + gEfiSmmReadyToLockProtocolGuid ## CONSUMES + gEfiSmmEndOfDxeProtocolGuid ## CONSUMES diff --git a/MdePkg/Library/SmmIoLib/SmmIoLib.uni b/MdePkg/Library/SmmIoLib= /SmmIoLib.uni new file mode 100644 index 0000000..5d20b4d --- /dev/null +++ b/MdePkg/Library/SmmIoLib/SmmIoLib.uni @@ -0,0 +1,23 @@ +// /** @file +// Instance of SMM IO check library. +// +// SMM IO check library library implementation. This library consumes GCD= to collect all valid +// IO space defined by a platform. +// A platform may have its own SmmIoLib instance to exclude more IO space. +// +// Copyright (c) 2017, Intel Corporation. All rights reserved.
+// +// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the B= SD License +// which accompanies this distribution. The full text of the license may b= e 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 IM= PLIED. +// +// **/ + + +#string STR_MODULE_ABSTRACT #language en-US "Instance of SMM I= O check library." + +#string STR_MODULE_DESCRIPTION #language en-US "SMM IO check libr= ary library implementation. This library consumes GCD to collect all valid = IO space defined by a platform. A platform may have its own SmmIoLib instan= ce to exclude more IO space." + --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 17:26:16 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1492789810069952.8319557115526; Fri, 21 Apr 2017 08:50:10 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6A45921954084; Fri, 21 Apr 2017 08:50:04 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CCA7621A04817 for ; Fri, 21 Apr 2017 08:50:01 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 08:50:01 -0700 Received: from jyao1-mobl.ccr.corp.intel.com ([10.254.208.87]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2017 08:50:00 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,230,1488873600"; d="scan'208";a="77273834" From: Jiewen Yao To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 23:49:52 +0800 Message-Id: <1492789793-22624-4-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> References: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> Subject: [edk2] [PATCH 3/4] MdePkg/dec: Add SmmIoLib. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Fan , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Jeff Fan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdePkg/MdePkg.dec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 3310029..5774417 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -246,6 +246,10 @@ # SmmMemLib|Include/Library/SmmMemLib.h =20 + ## @libraryclass Provides services for Smm IO Operation. + # + SmmIoLib|Include/Library/SmmIoLib.h + ## @libraryclass Provides services to enable/disable periodic SMI hand= lers. # SmmPeriodicSmiLib|Include/Library/SmmPeriodicSmiLib.h --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sun May 5 17:26:16 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1492789812634616.192910005631; Fri, 21 Apr 2017 08:50:12 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 959B12050B985; Fri, 21 Apr 2017 08:50:04 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0870421A04822 for ; Fri, 21 Apr 2017 08:50:03 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 08:50:02 -0700 Received: from jyao1-mobl.ccr.corp.intel.com ([10.254.208.87]) by orsmga002.jf.intel.com with ESMTP; 21 Apr 2017 08:50:01 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,230,1488873600"; d="scan'208";a="77273868" From: Jiewen Yao To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 23:49:53 +0800 Message-Id: <1492789793-22624-5-git-send-email-jiewen.yao@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 In-Reply-To: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> References: <1492789793-22624-1-git-send-email-jiewen.yao@intel.com> Subject: [edk2] [PATCH 4/4] MdePkg/dsc: add SmmIoLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeff Fan , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Jeff Fan Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao --- MdePkg/MdePkg.dsc | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index 8b69de3..d9c2c32 100644 --- a/MdePkg/MdePkg.dsc +++ b/MdePkg/MdePkg.dsc @@ -154,6 +154,7 @@ MdePkg/Library/BaseS3SmbusLib/BaseS3SmbusLib.inf MdePkg/Library/BaseS3StallLib/BaseS3StallLib.inf MdePkg/Library/SmmMemLib/SmmMemLib.inf + MdePkg/Library/SmmIoLib/SmmIoLib.inf MdePkg/Library/BaseRngLib/BaseRngLib.inf MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.inf --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel