2 Functions related to the Firmware Volume Block service whose
3 implementation is specific to the SMM driver build.
5 Copyright (C) 2015, Red Hat, Inc.
6 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials are licensed and made available
9 under the terms and conditions of the BSD License which accompanies this
10 distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/DebugLib.h>
18 #include <Library/PcdLib.h>
19 #include <Library/SmmServicesTableLib.h>
20 #include <Protocol/DevicePath.h>
21 #include <Protocol/SmmFirmwareVolumeBlock.h>
23 #include "FwBlockService.h"
26 InstallProtocolInterfaces (
27 IN EFI_FW_VOL_BLOCK_DEVICE
*FvbDevice
33 ASSERT (FeaturePcdGet (PcdSmmSmramRequire
));
36 // There is no SMM service that can install multiple protocols in the SMM
37 // protocol database in one go.
39 // The SMM Firmware Volume Block protocol structure is the same as the
40 // Firmware Volume Block protocol structure.
43 DEBUG ((EFI_D_INFO
, "Installing QEMU flash SMM FVB\n"));
44 Status
= gSmst
->SmmInstallProtocolInterface (
46 &gEfiSmmFirmwareVolumeBlockProtocolGuid
,
48 &FvbDevice
->FwVolBlockInstance
50 ASSERT_EFI_ERROR (Status
);
52 Status
= gSmst
->SmmInstallProtocolInterface (
54 &gEfiDevicePathProtocolGuid
,
58 ASSERT_EFI_ERROR (Status
);
62 InstallVirtualAddressChangeHandler (