]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockServiceSmm.c
OvmfPkg: QemuFlashFvbServicesRuntimeDxe: add DXE_SMM_DRIVER build
[mirror_edk2.git] / OvmfPkg / QemuFlashFvbServicesRuntimeDxe / FwBlockServiceSmm.c
CommitLineData
79397dbd
LE
1/**@file\r
2 Functions related to the Firmware Volume Block service whose\r
3 implementation is specific to the SMM driver build.\r
4\r
5 Copyright (C) 2015, Red Hat, Inc.\r
6 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
7\r
8 This program and the accompanying materials are licensed and made available\r
9 under the terms and conditions of the BSD License which accompanies this\r
10 distribution. The full text of the license may be found at\r
11 http://opensource.org/licenses/bsd-license.php\r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
15**/\r
16\r
17#include <Library/DebugLib.h>\r
18#include <Library/SmmServicesTableLib.h>\r
19#include <Protocol/DevicePath.h>\r
20#include <Protocol/SmmFirmwareVolumeBlock.h>\r
21\r
22#include "FwBlockService.h"\r
23\r
24VOID\r
25InstallProtocolInterfaces (\r
26 IN EFI_FW_VOL_BLOCK_DEVICE *FvbDevice\r
27 )\r
28{\r
29 EFI_HANDLE FvbHandle;\r
30 EFI_STATUS Status;\r
31\r
32 //\r
33 // There is no SMM service that can install multiple protocols in the SMM\r
34 // protocol database in one go.\r
35 //\r
36 // The SMM Firmware Volume Block protocol structure is the same as the\r
37 // Firmware Volume Block protocol structure.\r
38 //\r
39 FvbHandle = NULL;\r
40 DEBUG ((EFI_D_INFO, "Installing QEMU flash SMM FVB\n"));\r
41 Status = gSmst->SmmInstallProtocolInterface (\r
42 &FvbHandle,\r
43 &gEfiSmmFirmwareVolumeBlockProtocolGuid,\r
44 EFI_NATIVE_INTERFACE,\r
45 &FvbDevice->FwVolBlockInstance\r
46 );\r
47 ASSERT_EFI_ERROR (Status);\r
48\r
49 Status = gSmst->SmmInstallProtocolInterface (\r
50 &FvbHandle,\r
51 &gEfiDevicePathProtocolGuid,\r
52 EFI_NATIVE_INTERFACE,\r
53 FvbDevice->DevicePath\r
54 );\r
55 ASSERT_EFI_ERROR (Status);\r
56}\r
57\r
58VOID\r
59InstallVirtualAddressChangeHandler (\r
60 VOID\r
61 )\r
62{\r
63 //\r
64 // Nothing.\r
65 //\r
66}\r