From nobody Tue Jan 7 02:06:29 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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 1525466515364685.1462406970408; Fri, 4 May 2018 13:41:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 91CB7203BEA3D; Fri, 4 May 2018 13:41:54 -0700 (PDT) Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id A4C56203BEA2B for ; Fri, 4 May 2018 13:41:53 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 83A361435; Fri, 4 May 2018 13:41:53 -0700 (PDT) Received: from u201365.usa.Arm.com (bc-c3-3-14.eu.iaas.arm.com [10.6.43.238]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DCA1D3F487; Fri, 4 May 2018 13:41:51 -0700 (PDT) X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=supreeth.venkatesh@arm.com; receiver=edk2-devel@lists.01.org From: Supreeth Venkatesh To: edk2-devel@lists.01.org Date: Fri, 4 May 2018 21:41:00 +0100 Message-Id: <20180504204109.3354-9-supreeth.venkatesh@arm.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180504204109.3354-1-supreeth.venkatesh@arm.com> References: <20180504204109.3354-1-supreeth.venkatesh@arm.com> Subject: [edk2] [PATCH v2 08/17] StandaloneMmPkg/MemLib: Add Standalone MM instance of memory check library. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, jiewen.yao@intel.com, liming.gao@intel.com, michael.d.kinney@intel.com 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" MM memory check library library implementation. This library consumes MM_ACCESS_PROTOCOL to get MMRAM information. In order to use this library instance, the platform should produce all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware (like MM Core and MM driver) and/or specific dedicated hardware. This patch provides services for MM Memory Operation. The management mode Mem Library provides function for checking if buffer is outside MMRAM and valid. It also provides functions for copy data from MMRAM to non-MMRAM, from non-MMRAM to MMRAM, from non-MMRAM to non-MMRAM, or set data in non-MMRAM. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Supreeth Venkatesh Reviewed-by: Achin Gupta Reviewed-by: Jiewen Yao --- .../Include/Library/StandaloneMmMemLib.h | 140 +++++++++++ .../AArch64/StandaloneMmMemLibInternal.c | 49 ++++ .../StandaloneMmMemLib/StandaloneMmMemLib.c | 265 +++++++++++++++++= ++++ .../StandaloneMmMemLib/StandaloneMmMemLib.inf | 50 ++++ 4 files changed, 504 insertions(+) create mode 100644 StandaloneMmPkg/Include/Library/StandaloneMmMemLib.h create mode 100644 StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/Stan= daloneMmMemLibInternal.c create mode 100644 StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMm= MemLib.c create mode 100644 StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMm= MemLib.inf diff --git a/StandaloneMmPkg/Include/Library/StandaloneMmMemLib.h b/Standal= oneMmPkg/Include/Library/StandaloneMmMemLib.h new file mode 100644 index 0000000000..8e3f2801aa --- /dev/null +++ b/StandaloneMmPkg/Include/Library/StandaloneMmMemLib.h @@ -0,0 +1,140 @@ +/** @file + Provides services for MM Memory Operation. + + The MM Mem Library provides function for checking if buffer is outside M= MRAM and valid. + It also provides functions for copy data from MMRAM to non-MMRAM, from n= on-MMRAM to MMRAM, + from non-MMRAM to non-MMRAM, or set data in non-MMRAM. + + Copyright (c) 2015, 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 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 _MM_MEM_LIB_H_ +#define _MM_MEM_LIB_H_ + +/** + This function check if the buffer is valid per processor architecture an= d not overlap with MMRAM. + + @param Buffer The buffer start address to be checked. + @param Length The buffer length to be checked. + + @retval TRUE This buffer is valid per processor architecture and not ov= erlap with MMRAM. + @retval FALSE This buffer is not valid per processor architecture or ove= rlap with MMRAM. +**/ +BOOLEAN +EFIAPI +MmIsBufferOutsideMmValid ( + IN EFI_PHYSICAL_ADDRESS Buffer, + IN UINT64 Length + ); + +/** + Copies a source buffer (non-MMRAM) to a destination buffer (MMRAM). + + This function copies a source buffer (non-MMRAM) to a destination buffer= (MMRAM). + It checks if source buffer is valid per processor architecture and not o= verlap with MMRAM. + If the check passes, it copies memory and returns EFI_SUCCESS. + If the check fails, it return EFI_SECURITY_VIOLATION. + The implementation must be reentrant. + + @param DestinationBuffer The pointer to the destination buffer of the= memory copy. + @param SourceBuffer The pointer to the source buffer of the memo= ry copy. + @param Length The number of bytes to copy from SourceBuffe= r to DestinationBuffer. + + @retval EFI_SECURITY_VIOLATION The SourceBuffer is invalid per processor= architecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is copied. + +**/ +EFI_STATUS +EFIAPI +MmCopyMemToMmram ( + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length + ); + +/** + Copies a source buffer (MMRAM) to a destination buffer (NON-MMRAM). + + This function copies a source buffer (non-MMRAM) to a destination buffer= (MMRAM). + It checks if destination buffer is valid per processor architecture and = not overlap with MMRAM. + If the check passes, it copies memory and returns EFI_SUCCESS. + If the check fails, it returns EFI_SECURITY_VIOLATION. + The implementation must be reentrant. + + @param DestinationBuffer The pointer to the destination buffer of the= memory copy. + @param SourceBuffer The pointer to the source buffer of the memo= ry copy. + @param Length The number of bytes to copy from SourceBuffe= r to DestinationBuffer. + + @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per proce= ssor architecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is copied. + +**/ +EFI_STATUS +EFIAPI +MmCopyMemFromMmram ( + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length + ); + +/** + Copies a source buffer (NON-MMRAM) to a destination buffer (NON-MMRAM). + + This function copies a source buffer (non-MMRAM) to a destination buffer= (MMRAM). + It checks if source buffer and destination buffer are valid per processo= r architecture and not overlap with MMRAM. + If the check passes, it copies memory and returns EFI_SUCCESS. + If the check fails, it returns EFI_SECURITY_VIOLATION. + The implementation must be reentrant, and it must handle the case where = source buffer overlaps destination buffer. + + @param DestinationBuffer The pointer to the destination buffer of the= memory copy. + @param SourceBuffer The pointer to the source buffer of the memo= ry copy. + @param Length The number of bytes to copy from SourceBuffe= r to DestinationBuffer. + + @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per proce= ssor architecture or overlap with MMRAM. + @retval EFI_SECURITY_VIOLATION The SourceBuffer is invalid per processor= architecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is copied. + +**/ +EFI_STATUS +EFIAPI +MmCopyMem ( + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length + ); + +/** + Fills a target buffer (NON-MMRAM) with a byte value. + + This function fills a target buffer (non-MMRAM) with a byte value. + It checks if target buffer is valid per processor architecture and not o= verlap with MMRAM. + If the check passes, it fills memory and returns EFI_SUCCESS. + If the check fails, it returns EFI_SECURITY_VIOLATION. + + @param Buffer The memory to set. + @param Length The number of bytes to set. + @param Value The value with which to fill Length bytes of Buffer. + + @retval EFI_SECURITY_VIOLATION The Buffer is invalid per processor archi= tecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is set. + +**/ +EFI_STATUS +EFIAPI +MmSetMem ( + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value + ); + +#endif diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/StandaloneM= mMemLibInternal.c b/StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/Stan= daloneMmMemLibInternal.c new file mode 100644 index 0000000000..b3a586142c --- /dev/null +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/AArch64/StandaloneMmMemLib= Internal.c @@ -0,0 +1,49 @@ +/** @file + Internal ARCH Specific file of MM memory check library. + + MM memory check library implementation. This library consumes MM_ACCESS_= PROTOCOL + to get MMRAM information. In order to use this library instance, the pla= tform should produce + all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware= (like MM Core + and MM driver) and/or specific dedicated hardware. + + Copyright (c) 2015, 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 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 +// +// Maximum support address used to check input buffer +// +extern EFI_PHYSICAL_ADDRESS mMmMemLibInternalMaximumSupportAddress; + +/** + Calculate and save the maximum support address. + +**/ +VOID +MmMemLibInternalCalculateMaximumSupportAddress ( + VOID + ) +{ + UINT8 PhysicalAddressBits; + + PhysicalAddressBits =3D 36; + + // + // Save the maximum support address in one global variable + // + mMmMemLibInternalMaximumSupportAddress =3D (EFI_PHYSICAL_ADDRESS)(UINTN)= (LShiftU64 (1, PhysicalAddressBits) - 1); + DEBUG ((DEBUG_INFO, "mMmMemLibInternalMaximumSupportAddress =3D 0x%lx\n"= , mMmMemLibInternalMaximumSupportAddress)); +} + + diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.= c b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c new file mode 100644 index 0000000000..d7de1b4fb6 --- /dev/null +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.c @@ -0,0 +1,265 @@ +/** @file + Instance of MM memory check library. + + MM memory check library library implementation. This library consumes MM= _ACCESS_PROTOCOL + to get MMRAM information. In order to use this library instance, the pla= tform should produce + all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmware= (like MM Core + and MM driver) and/or specific dedicated hardware. + + Copyright (c) 2015, 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 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 + +EFI_MMRAM_DESCRIPTOR *mMmMemLibInternalMmramRanges; +UINTN mMmMemLibInternalMmramCount; + +// +// Maximum support address used to check input buffer +// +EFI_PHYSICAL_ADDRESS mMmMemLibInternalMaximumSupportAddress =3D 0; + +/** + Calculate and save the maximum support address. + +**/ +VOID +MmMemLibInternalCalculateMaximumSupportAddress ( + VOID + ); + +/** + This function check if the buffer is valid per processor architecture an= d not overlap with MMRAM. + + @param Buffer The buffer start address to be checked. + @param Length The buffer length to be checked. + + @retval TRUE This buffer is valid per processor architecture and not ov= erlap with MMRAM. + @retval FALSE This buffer is not valid per processor architecture or ove= rlap with MMRAM. +**/ +BOOLEAN +EFIAPI +MmIsBufferOutsideMmValid ( + IN EFI_PHYSICAL_ADDRESS Buffer, + IN UINT64 Length + ) +{ + UINTN Index; + + // + // 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 > mMmMemLibInternalMaximumSupportAddress) || + (Buffer > mMmMemLibInternalMaximumSupportAddress) || + ((Length !=3D 0) && (Buffer > (mMmMemLibInternalMaximumSupportAddres= s - (Length - 1)))) ) { + // + // Overflow happen + // + DEBUG (( + DEBUG_ERROR, + "MmIsBufferOutsideMmValid: Overflow: Buffer (0x%lx) - Length (0x%lx)= , MaximumSupportAddress (0x%lx)\n", + Buffer, + Length, + mMmMemLibInternalMaximumSupportAddress + )); + return FALSE; + } + + for (Index =3D 0; Index < mMmMemLibInternalMmramCount; Index ++) { + if (((Buffer >=3D mMmMemLibInternalMmramRanges[Index].CpuStart) && (Bu= ffer < mMmMemLibInternalMmramRanges[Index].CpuStart + mMmMemLibInternalMmra= mRanges[Index].PhysicalSize)) || + ((mMmMemLibInternalMmramRanges[Index].CpuStart >=3D Buffer) && (mM= mMemLibInternalMmramRanges[Index].CpuStart < Buffer + Length))) { + DEBUG (( + DEBUG_ERROR, + "MmIsBufferOutsideMmValid: Overlap: Buffer (0x%lx) - Length (0x%lx= ), ", + Buffer, + Length + )); + DEBUG (( + DEBUG_ERROR, + "CpuStart (0x%lx) - PhysicalSize (0x%lx)\n", + mMmMemLibInternalMmramRanges[Index].CpuStart, + mMmMemLibInternalMmramRanges[Index].PhysicalSize + )); + return FALSE; + } + } + + return TRUE; +} + +/** + Copies a source buffer (non-MMRAM) to a destination buffer (MMRAM). + + This function copies a source buffer (non-MMRAM) to a destination buffer= (MMRAM). + It checks if source buffer is valid per processor architecture and not o= verlap with MMRAM. + If the check passes, it copies memory and returns EFI_SUCCESS. + If the check fails, it return EFI_SECURITY_VIOLATION. + The implementation must be reentrant. + + @param DestinationBuffer The pointer to the destination buffer of the= memory copy. + @param SourceBuffer The pointer to the source buffer of the memo= ry copy. + @param Length The number of bytes to copy from SourceBuffe= r to DestinationBuffer. + + @retval EFI_SECURITY_VIOLATION The SourceBuffer is invalid per processor= architecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is copied. + +**/ +EFI_STATUS +EFIAPI +MmCopyMemToMmram ( + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length + ) +{ + if (!MmIsBufferOutsideMmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer= , Length)) { + DEBUG ((DEBUG_ERROR, "MmCopyMemToMmram: Security Violation: Source (0x= %x), Length (0x%x)\n", SourceBuffer, Length)); + return EFI_SECURITY_VIOLATION; + } + CopyMem (DestinationBuffer, SourceBuffer, Length); + return EFI_SUCCESS; +} + +/** + Copies a source buffer (MMRAM) to a destination buffer (NON-MMRAM). + + This function copies a source buffer (non-MMRAM) to a destination buffer= (MMRAM). + It checks if destination buffer is valid per processor architecture and = not overlap with MMRAM. + If the check passes, it copies memory and returns EFI_SUCCESS. + If the check fails, it returns EFI_SECURITY_VIOLATION. + The implementation must be reentrant. + + @param DestinationBuffer The pointer to the destination buffer of the= memory copy. + @param SourceBuffer The pointer to the source buffer of the memo= ry copy. + @param Length The number of bytes to copy from SourceBuffe= r to DestinationBuffer. + + @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per proce= ssor architecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is copied. + +**/ +EFI_STATUS +EFIAPI +MmCopyMemFromMmram ( + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length + ) +{ + if (!MmIsBufferOutsideMmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationB= uffer, Length)) { + DEBUG ((DEBUG_ERROR, "MmCopyMemFromMmram: Security Violation: Destinat= ion (0x%x), Length (0x%x)\n", DestinationBuffer, Length)); + return EFI_SECURITY_VIOLATION; + } + CopyMem (DestinationBuffer, SourceBuffer, Length); + return EFI_SUCCESS; +} + +/** + Copies a source buffer (NON-MMRAM) to a destination buffer (NON-MMRAM). + + This function copies a source buffer (non-MMRAM) to a destination buffer= (MMRAM). + It checks if source buffer and destination buffer are valid per processo= r architecture and not overlap with MMRAM. + If the check passes, it copies memory and returns EFI_SUCCESS. + If the check fails, it returns EFI_SECURITY_VIOLATION. + The implementation must be reentrant, and it must handle the case where = source buffer overlaps destination buffer. + + @param DestinationBuffer The pointer to the destination buffer of the= memory copy. + @param SourceBuffer The pointer to the source buffer of the memo= ry copy. + @param Length The number of bytes to copy from SourceBuffe= r to DestinationBuffer. + + @retval EFI_SECURITY_VIOLATION The DesinationBuffer is invalid per proce= ssor architecture or overlap with MMRAM. + @retval EFI_SECURITY_VIOLATION The SourceBuffer is invalid per processor= architecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is copied. + +**/ +EFI_STATUS +EFIAPI +MmCopyMem ( + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length + ) +{ + if (!MmIsBufferOutsideMmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)DestinationB= uffer, Length)) { + DEBUG ((DEBUG_ERROR, "MmCopyMem: Security Violation: Destination (0x%x= ), Length (0x%x)\n", DestinationBuffer, Length)); + return EFI_SECURITY_VIOLATION; + } + if (!MmIsBufferOutsideMmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer= , Length)) { + DEBUG ((DEBUG_ERROR, "MmCopyMem: Security Violation: Source (0x%x), Le= ngth (0x%x)\n", SourceBuffer, Length)); + return EFI_SECURITY_VIOLATION; + } + CopyMem (DestinationBuffer, SourceBuffer, Length); + return EFI_SUCCESS; +} + +/** + Fills a target buffer (NON-MMRAM) with a byte value. + + This function fills a target buffer (non-MMRAM) with a byte value. + It checks if target buffer is valid per processor architecture and not o= verlap with MMRAM. + If the check passes, it fills memory and returns EFI_SUCCESS. + If the check fails, it returns EFI_SECURITY_VIOLATION. + + @param Buffer The memory to set. + @param Length The number of bytes to set. + @param Value The value with which to fill Length bytes of Buffer. + + @retval EFI_SECURITY_VIOLATION The Buffer is invalid per processor archi= tecture or overlap with MMRAM. + @retval EFI_SUCCESS Memory is set. + +**/ +EFI_STATUS +EFIAPI +MmSetMem ( + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value + ) +{ + if (!MmIsBufferOutsideMmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Leng= th)) { + DEBUG ((DEBUG_ERROR, "MmSetMem: Security Violation: Source (0x%x), Len= gth (0x%x)\n", Buffer, Length)); + return EFI_SECURITY_VIOLATION; + } + SetMem (Buffer, Length, Value); + return EFI_SUCCESS; +} + +/** + The constructor function initializes the Mm Mem 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 +MemLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable + ) +{ + + // + // Calculate and save maximum support address + // + MmMemLibInternalCalculateMaximumSupportAddress (); + + return EFI_SUCCESS; +} diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.= inf b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf new file mode 100644 index 0000000000..db1041c503 --- /dev/null +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf @@ -0,0 +1,50 @@ +## @file +# Instance of MM memory check library. +# +# MM memory check library library implementation. This library consumes M= M_ACCESS_PROTOCOL +# to get MMRAM information. In order to use this library instance, the pl= atform should produce +# all MMRAM range via MM_ACCESS_PROTOCOL, including the range for firmwar= e (like MM Core +# and MM driver) and/or specific dedicated hardware. +# +# Copyright (c) 2015, 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 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 0x0001001A + BASE_NAME =3D MemLib + FILE_GUID =3D EA355F14-6409-4716-829F-37B3BC7C7F26 + MODULE_TYPE =3D MM_STANDALONE + VERSION_STRING =3D 1.0 + PI_SPECIFICATION_VERSION =3D 0x00010032 + LIBRARY_CLASS =3D MemLib|MM_STANDALONE MM_CORE_STANDALO= NE + CONSTRUCTOR =3D MemLibConstructor + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D AARCH64 +# + +[Sources.Common] + StandaloneMmMemLib.c + +[Sources.AARCH64] + AArch64/StandaloneMmMemLibInternal.c + +[Packages] + MdePkg/MdePkg.dec + StandaloneMmPkg/StandaloneMmPkg.dec + +[LibraryClasses] + BaseMemoryLib + DebugLib --=20 2.16.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel