From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::d43; helo=mail-io1-xd43.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (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 0DA822117B552 for ; Fri, 21 Dec 2018 03:07:58 -0800 (PST) Received: by mail-io1-xd43.google.com with SMTP id l14so3268063ioj.5 for ; Fri, 21 Dec 2018 03:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G//6YUtlz+EvkBbX2LsqRqFlUr/V/NvgLXYeqBJ0xvI=; b=Ef+p9kVqx9SDDwS8fe4+Eo4FcDRxO+eEQQNwfa7zxp5VYnWIVP6zEN5mxBAz2wvB1p NwujhkJA3fv9mP4tNiU+2QKMMIdKa2FFpS0YqVn1Xd1uclwpUAsSKZlAkbNlp1OsVUd8 SU1nxTRZdAK9xXTh2n+o/mIipNNl7P6oSZ4Ig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G//6YUtlz+EvkBbX2LsqRqFlUr/V/NvgLXYeqBJ0xvI=; b=HcoUbnGi7hcXL9dDuYZElZjv1jIQQnZfKGigTzGxX+EIv+zL4N6Qafdp5PjTMdfcUK oWwW2uQvI4uNmfSnvX9JNnRxrubdrbK0EeE8RB39e4vEbu5tsvix4UMRW1NoQyY25IPJ o6G5AzUMv5DoLIAuurx6ugs3ie07p+2PqYoSPZNBo9hjWOnDyozVv2AjpvSwgwbC5dj1 gJU9v8Cv5T8naX1zlH+XdoC2GtIMlAca39GValDnQkbsnw3iaA6tyJKZ29OjoqLk7in5 eF+1IVIxF39/nEyT94GANU8Lz21Kgon2lTuRnZ3o+eEmTuiojjj3BY6GcBp2fUWvIU8A MOug== X-Gm-Message-State: AJcUukeUb4jMuiMWxlyErowyv4aLCXWK2mm6Nf8SD+D4bgk0WDOFC6cF tLBVc6QCmtiRAHZeCjC9mGJvmN2UAu9IdW5fcDNKPA== X-Google-Smtp-Source: ALg8bN4NDvxQC/Qbde+xL1Hr93gCFhXb3IUxIybW1k3gYercGrokGmsSPOntTgG4zGQXgWZcs+z8L0JyXv3/+UvltjQ= X-Received: by 2002:a6b:5d01:: with SMTP id r1mr1187419iob.170.1545390477863; Fri, 21 Dec 2018 03:07:57 -0800 (PST) MIME-Version: 1.0 References: <1544789607-11316-1-git-send-email-jagadeesh.ujja@arm.com> <1544789607-11316-12-git-send-email-jagadeesh.ujja@arm.com> In-Reply-To: <1544789607-11316-12-git-send-email-jagadeesh.ujja@arm.com> From: Ard Biesheuvel Date: Fri, 21 Dec 2018 12:07:46 +0100 Message-ID: To: Jagadeesh Ujja Cc: "edk2-devel@lists.01.org" , "Gao, Liming" , "Zhang, Chao B" , Leif Lindholm Subject: Re: [PATCH 11/13] ArmPlatformPkg/NorFlashDxe: allow reusability as a MM driver 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: Fri, 21 Dec 2018 11:07:59 -0000 Content-Type: text/plain; charset="UTF-8" On Fri, 14 Dec 2018 at 13:14, Jagadeesh Ujja wrote: > > Adapt the NorFlashDxe driver to be used as a MM_STANDALONE driver to > allow access to NOR flash for code executing in MM_STANDALONE mode. > This allows storing of EFI variables on NOR flash which is accessible > only via the MM STANDALONE mode software. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jagadeesh Ujja > --- > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c | 2 +- > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c | 210 ++++++++++++++++---- > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h | 5 +- > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf | 2 + > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c | 96 ++++----- > ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf | 76 +++++++ > 6 files changed, 302 insertions(+), 89 deletions(-) > Instead of these huge if() blocks, could you please factor out the functionality for each, and put two different versions in NorFlashDxeBase.c and NorFlashDxeSmm.c, and include the appropriate one in the .inf files. > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c > index 279b77c..4c002c7 100644 > --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashBlockIoDxe.c > @@ -1,6 +1,6 @@ > /** @file NorFlashBlockIoDxe.c > > - Copyright (c) 2011-2013, ARM Ltd. All rights reserved.
> + Copyright (c) 2011-2018, ARM Ltd. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c > index af40a4c..9c56010 100644 > --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c > @@ -1,6 +1,6 @@ > /** @file NorFlashDxe.c > > - Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
> + Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -138,29 +138,102 @@ NorFlashCreateInstance ( > > if (SupportFvb) { > NorFlashFvbInitialize (Instance); > + if (!InMm ()) { > + Status = gBS->InstallMultipleProtocolInterfaces ( > + &Instance->Handle, > + &gEfiDevicePathProtocolGuid, &Instance->DevicePath, > + &gEfiBlockIoProtocolGuid, &Instance->BlockIoProtocol, > + &gEfiFirmwareVolumeBlockProtocolGuid, &Instance->FvbProtocol, > + NULL > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > + } else { > + //Install DevicePath Protocol > + Status = gMmst->MmInstallProtocolInterface ( > + &Instance->Handle, > + &gEfiDevicePathProtocolGuid, > + EFI_NATIVE_INTERFACE, > + &Instance->DevicePath > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > + //Install BlockIo Protocol > + Status = gMmst->MmInstallProtocolInterface ( > + &Instance->Handle, > + &gEfiBlockIoProtocolGuid, > + EFI_NATIVE_INTERFACE, > + &Instance->BlockIoProtocol > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > > - Status = gBS->InstallMultipleProtocolInterfaces ( > - &Instance->Handle, > - &gEfiDevicePathProtocolGuid, &Instance->DevicePath, > - &gEfiBlockIoProtocolGuid, &Instance->BlockIoProtocol, > - &gEfiFirmwareVolumeBlockProtocolGuid, &Instance->FvbProtocol, > - NULL > - ); > - if (EFI_ERROR(Status)) { > - FreePool (Instance); > - return Status; > + //Install FirmwareVolumeBlock Protocol > + Status = gMmst->MmInstallProtocolInterface ( > + &Instance->Handle, > + &gEfiSmmFirmwareVolumeBlockProtocolGuid, > + EFI_NATIVE_INTERFACE, > + &Instance->FvbProtocol > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > } > } else { > - Status = gBS->InstallMultipleProtocolInterfaces ( > - &Instance->Handle, > - &gEfiDevicePathProtocolGuid, &Instance->DevicePath, > - &gEfiBlockIoProtocolGuid, &Instance->BlockIoProtocol, > - &gEfiDiskIoProtocolGuid, &Instance->DiskIoProtocol, > - NULL > - ); > - if (EFI_ERROR(Status)) { > - FreePool (Instance); > - return Status; > + if (!InMm ()) { > + Status = gBS->InstallMultipleProtocolInterfaces ( > + &Instance->Handle, > + &gEfiDevicePathProtocolGuid, &Instance->DevicePath, > + &gEfiBlockIoProtocolGuid, &Instance->BlockIoProtocol, > + &gEfiDiskIoProtocolGuid, &Instance->DiskIoProtocol, > + NULL > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > + } else { > + //Install DevicePath Protocol > + Status = gMmst->MmInstallProtocolInterface ( > + &Instance->Handle, > + &gEfiDevicePathProtocolGuid, > + EFI_NATIVE_INTERFACE, > + &Instance->DevicePath > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > + //Install BlockIo Protocol > + Status = gMmst->MmInstallProtocolInterface ( > + &Instance->Handle, > + &gEfiBlockIoProtocolGuid, > + EFI_NATIVE_INTERFACE, > + &Instance->BlockIoProtocol > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > + > + //Install DiskIO Protocol > + Status = gMmst->MmInstallProtocolInterface ( > + &Instance->Handle, > + &gEfiDiskIoProtocolGuid, > + EFI_NATIVE_INTERFACE, > + &Instance->DiskIoProtocol > + ); > + if (EFI_ERROR(Status)) { > + FreePool (Instance); > + return Status; > + } > } > } > > @@ -342,13 +415,15 @@ NorFlashUnlockAndEraseSingleBlock ( > UINTN Index; > EFI_TPL OriginalTPL; > > - if (!EfiAtRuntime ()) { > - // Raise TPL to TPL_HIGH to stop anyone from interrupting us. > - OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL); > - } else { > - // This initialization is only to prevent the compiler to complain about the > - // use of uninitialized variables > - OriginalTPL = TPL_HIGH_LEVEL; > + if (!InMm ()) { > + if (!EfiAtRuntime ()) { > + // Raise TPL to TPL_HIGH to stop anyone from interrupting us. > + OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL); > + } else { > + // This initialization is only to prevent the compiler to complain about the > + // use of uninitialized variables > + OriginalTPL = TPL_HIGH_LEVEL; > + } > } > > Index = 0; > @@ -367,9 +442,11 @@ NorFlashUnlockAndEraseSingleBlock ( > DEBUG((EFI_D_ERROR,"EraseSingleBlock(BlockAddress=0x%08x: Block Locked Error (try to erase %d times)\n", BlockAddress,Index)); > } > > - if (!EfiAtRuntime ()) { > - // Interruptions can resume. > - gBS->RestoreTPL (OriginalTPL); > + if (!InMm ()) { > + if (!EfiAtRuntime ()) { > + // Interruptions can resume. > + gBS->RestoreTPL (OriginalTPL); > + } > } > > return Status; > @@ -595,13 +672,15 @@ NorFlashWriteFullBlock ( > // Start writing from the first address at the start of the block > WordAddress = BlockAddress; > > - if (!EfiAtRuntime ()) { > - // Raise TPL to TPL_HIGH to stop anyone from interrupting us. > - OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL); > - } else { > - // This initialization is only to prevent the compiler to complain about the > - // use of uninitialized variables > - OriginalTPL = TPL_HIGH_LEVEL; > + if (!InMm ()) { > + if (!EfiAtRuntime ()) { > + // Raise TPL to TPL_HIGH to stop anyone from interrupting us. > + OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL); > + } else { > + // This initialization is only to prevent the compiler to complain about the > + // use of uninitialized variables > + OriginalTPL = TPL_HIGH_LEVEL; > + } > } > > Status = NorFlashUnlockAndEraseSingleBlock (Instance, BlockAddress); > @@ -661,9 +740,11 @@ NorFlashWriteFullBlock ( > } > > EXIT: > - if (!EfiAtRuntime ()) { > - // Interruptions can resume. > - gBS->RestoreTPL (OriginalTPL); > + if (!InMm ()) { > + if (!EfiAtRuntime ()) { > + // Interruptions can resume. > + gBS->RestoreTPL (OriginalTPL); > + } > } > > if (EFI_ERROR(Status)) { > @@ -1334,6 +1415,53 @@ NorFlashInitialise ( > &mNorFlashVirtualAddrChangeEvent > ); > ASSERT_EFI_ERROR (Status); > + return Status; > +} > + > +EFI_STATUS > +EFIAPI > +StandaloneMmNorFlashInitialise ( > + IN EFI_HANDLE ImageHandle, > + IN EFI_MM_SYSTEM_TABLE *SystemTable > + ) > +{ > + EFI_STATUS Status; > + UINT32 Index; > + NOR_FLASH_DESCRIPTION* NorFlashDevices; > + BOOLEAN ContainVariableStorage; > + > + Status = NorFlashPlatformInitialization (); > + if (EFI_ERROR(Status)) { > + DEBUG((EFI_D_ERROR,"NorFlashInitialise: Fail to initialize Nor Flash devices\n")); > + return Status; > + } > + > + Status = NorFlashPlatformGetDevices (&NorFlashDevices, &mNorFlashDeviceCount); > + if (EFI_ERROR(Status)) { > + DEBUG((EFI_D_ERROR,"NorFlashInitialise: Fail to get Nor Flash devices\n")); > + return Status; > + } > + > + mNorFlashInstances = AllocateRuntimePool (sizeof(NOR_FLASH_INSTANCE*) * mNorFlashDeviceCount); > > + for (Index = 0; Index < mNorFlashDeviceCount; Index++) { > + // Check if this NOR Flash device contain the variable storage region > + ContainVariableStorage = > + (NorFlashDevices[Index].RegionBaseAddress <= PcdGet32 (PcdFlashNvStorageVariableBase)) && > + (PcdGet32 (PcdFlashNvStorageVariableBase) + PcdGet32 (PcdFlashNvStorageVariableSize) <= NorFlashDevices[Index].RegionBaseAddress + NorFlashDevices[Index].Size); > + > + Status = NorFlashCreateInstance ( > + NorFlashDevices[Index].DeviceBaseAddress, > + NorFlashDevices[Index].RegionBaseAddress, > + NorFlashDevices[Index].Size, > + Index, > + NorFlashDevices[Index].BlockSize, > + ContainVariableStorage, > + &mNorFlashInstances[Index] > + ); > + if (EFI_ERROR(Status)) { > + DEBUG((EFI_D_ERROR,"NorFlashInitialise: Fail to create instance for NorFlash[%d]\n",Index)); > + } > + } > return Status; > } > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h > index c0563f6..90929d3 100644 > --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h > @@ -1,6 +1,6 @@ > /** @file NorFlashDxe.h > > - Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
> + Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -19,6 +19,7 @@ > #include > #include > > +#include > #include > > #include > @@ -30,6 +31,8 @@ > #include > #include > #include > +#include > +#include > > #define NOR_FLASH_ERASE_RETRY 10 > > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf > index a59a21a..cbe740e 100644 > --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf > @@ -44,6 +44,7 @@ > UefiBootServicesTableLib > UefiRuntimeLib > DxeServicesTableLib > + StandaloneMmRuntimeDxe > > [Guids] > gEfiSystemNvDataFvGuid > @@ -57,6 +58,7 @@ > gEfiDevicePathProtocolGuid > gEfiFirmwareVolumeBlockProtocolGuid > gEfiDiskIoProtocolGuid > + gEfiSmmFirmwareVolumeBlockProtocolGuid > > [Pcd.common] > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c > index e62ffbb..e4d7100 100644 > --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c > @@ -1,6 +1,6 @@ > /*++ @file NorFlashFvbDxe.c > > - Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
> + Copyright (c) 2011 - 2018, ARM Ltd. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -720,27 +720,29 @@ NorFlashFvbInitialize ( > DEBUG((DEBUG_BLKIO,"NorFlashFvbInitialize\n")); > ASSERT((Instance != NULL)); > > - // > - // Declare the Non-Volatile storage as EFI_MEMORY_RUNTIME > - // > - > - // Note: all the NOR Flash region needs to be reserved into the UEFI Runtime memory; > - // even if we only use the small block region at the top of the NOR Flash. > - // The reason is when the NOR Flash memory is set into program mode, the command > - // is written as the base of the flash region (ie: Instance->DeviceBaseAddress) > - RuntimeMmioRegionSize = (Instance->RegionBaseAddress - Instance->DeviceBaseAddress) + Instance->Size; > - > - Status = gDS->AddMemorySpace ( > - EfiGcdMemoryTypeMemoryMappedIo, > - Instance->DeviceBaseAddress, RuntimeMmioRegionSize, > - EFI_MEMORY_UC | EFI_MEMORY_RUNTIME > - ); > - ASSERT_EFI_ERROR (Status); > - > - Status = gDS->SetMemorySpaceAttributes ( > - Instance->DeviceBaseAddress, RuntimeMmioRegionSize, > - EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); > - ASSERT_EFI_ERROR (Status); > + if (!InMm ()) { > + // > + // Declare the Non-Volatile storage as EFI_MEMORY_RUNTIME > + // > + > + // Note: all the NOR Flash region needs to be reserved into the UEFI Runtime memory; > + // even if we only use the small block region at the top of the NOR Flash. > + // The reason is when the NOR Flash memory is set into program mode, the command > + // is written as the base of the flash region (ie: Instance->DeviceBaseAddress) > + RuntimeMmioRegionSize = (Instance->RegionBaseAddress - Instance->DeviceBaseAddress) + Instance->Size; > + > + Status = gDS->AddMemorySpace ( > + EfiGcdMemoryTypeMemoryMappedIo, > + Instance->DeviceBaseAddress, RuntimeMmioRegionSize, > + EFI_MEMORY_UC | EFI_MEMORY_RUNTIME > + ); > + ASSERT_EFI_ERROR (Status); > + > + Status = gDS->SetMemorySpaceAttributes ( > + Instance->DeviceBaseAddress, RuntimeMmioRegionSize, > + EFI_MEMORY_UC | EFI_MEMORY_RUNTIME); > + ASSERT_EFI_ERROR (Status); > + } > > mFlashNvStorageVariableBase = FixedPcdGet32 (PcdFlashNvStorageVariableBase); > > @@ -777,30 +779,32 @@ NorFlashFvbInitialize ( > } > } > > - // > - // The driver implementing the variable read service can now be dispatched; > - // the varstore headers are in place. > - // > - Status = gBS->InstallProtocolInterface ( > - &gImageHandle, > - &gEdkiiNvVarStoreFormattedGuid, > - EFI_NATIVE_INTERFACE, > - NULL > - ); > - ASSERT_EFI_ERROR (Status); > - > - // > - // Register for the virtual address change event > - // > - Status = gBS->CreateEventEx ( > - EVT_NOTIFY_SIGNAL, > - TPL_NOTIFY, > - FvbVirtualNotifyEvent, > - NULL, > - &gEfiEventVirtualAddressChangeGuid, > - &mFvbVirtualAddrChangeEvent > - ); > - ASSERT_EFI_ERROR (Status); > + if (!InMm ()) { > + // > + // The driver implementing the variable read service can now be dispatched; > + // the varstore headers are in place. > + // > + Status = gBS->InstallProtocolInterface ( > + &gImageHandle, > + &gEdkiiNvVarStoreFormattedGuid, > + EFI_NATIVE_INTERFACE, > + NULL > + ); > + ASSERT_EFI_ERROR (Status); > + > + // > + // Register for the virtual address change event > + // > + Status = gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_NOTIFY, > + FvbVirtualNotifyEvent, > + NULL, > + &gEfiEventVirtualAddressChangeGuid, > + &mFvbVirtualAddrChangeEvent > + ); > + ASSERT_EFI_ERROR (Status); > + } > > return Status; > } > diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf > new file mode 100644 > index 0000000..a6d0581 > --- /dev/null > +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf > @@ -0,0 +1,76 @@ > +#/** @file > +# > +# Component description file for NorFlashDxe module > +# > +# Copyright (c) 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. > +# > +#**/ > + > +[Defines] > + INF_VERSION = 0x00010005 > + BASE_NAME = StandaloneMmNorFlash > + FILE_GUID = 166F677B-DAC9-4AE4-AD34-2FF2504B0637 > + MODULE_TYPE = MM_STANDALONE > + VERSION_STRING = 1.0 > + PI_SPECIFICATION_VERSION = 0x00010032 > + ENTRY_POINT = StandaloneMmNorFlashInitialise > + > +[Sources.common] > + NorFlashDxe.c > + NorFlashFvbDxe.c > + NorFlashBlockIoDxe.c > + > +[Packages] > + MdePkg/MdePkg.dec > + MdeModulePkg/MdeModulePkg.dec > + ArmPlatformPkg/ArmPlatformPkg.dec > + EmbeddedPkg/EmbeddedPkg.dec > + ArmPkg/ArmPkg.dec > + StandaloneMmPkg/StandaloneMmPkg.dec > + > +[LibraryClasses] > + StandaloneMmDriverEntryPoint > + BaseMemoryLib > + ArmSvcLib > + ArmLib > + IoLib > + BaseLib > + DebugLib > + HobLib > + MemoryAllocationLib > + NorFlashPlatformLib > + MmServicesTableLib > + > +[Guids] > + gEfiSystemNvDataFvGuid > + gEfiVariableGuid > + gEfiAuthenticatedVariableGuid > + gEfiEventVirtualAddressChangeGuid > + gEdkiiNvVarStoreFormattedGuid ## PRODUCES ## PROTOCOL > + > +[Protocols] > + gEfiBlockIoProtocolGuid > + gEfiDevicePathProtocolGuid > + gEfiSmmFirmwareVolumeBlockProtocolGuid > + gEfiDiskIoProtocolGuid > + > +[Pcd.common] > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase > + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize > + > + gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked > + > +[Depex] > + TRUE > -- > 2.7.4 >