]>
Commit | Line | Data |
---|---|---|
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 | |
b26f0cf9 | 8 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
79397dbd LE |
9 | **/\r |
10 | \r | |
11 | #include <Library/DebugLib.h>\r | |
b963ec49 | 12 | #include <Library/PcdLib.h>\r |
79397dbd LE |
13 | #include <Library/SmmServicesTableLib.h>\r |
14 | #include <Protocol/DevicePath.h>\r | |
15 | #include <Protocol/SmmFirmwareVolumeBlock.h>\r | |
16 | \r | |
17 | #include "FwBlockService.h"\r | |
18 | \r | |
19 | VOID\r | |
20 | InstallProtocolInterfaces (\r | |
21 | IN EFI_FW_VOL_BLOCK_DEVICE *FvbDevice\r | |
22 | )\r | |
23 | {\r | |
24 | EFI_HANDLE FvbHandle;\r | |
25 | EFI_STATUS Status;\r | |
26 | \r | |
b963ec49 LE |
27 | ASSERT (FeaturePcdGet (PcdSmmSmramRequire));\r |
28 | \r | |
79397dbd LE |
29 | //\r |
30 | // There is no SMM service that can install multiple protocols in the SMM\r | |
31 | // protocol database in one go.\r | |
32 | //\r | |
33 | // The SMM Firmware Volume Block protocol structure is the same as the\r | |
34 | // Firmware Volume Block protocol structure.\r | |
35 | //\r | |
36 | FvbHandle = NULL;\r | |
37 | DEBUG ((EFI_D_INFO, "Installing QEMU flash SMM FVB\n"));\r | |
38 | Status = gSmst->SmmInstallProtocolInterface (\r | |
39 | &FvbHandle,\r | |
40 | &gEfiSmmFirmwareVolumeBlockProtocolGuid,\r | |
41 | EFI_NATIVE_INTERFACE,\r | |
42 | &FvbDevice->FwVolBlockInstance\r | |
43 | );\r | |
44 | ASSERT_EFI_ERROR (Status);\r | |
45 | \r | |
46 | Status = gSmst->SmmInstallProtocolInterface (\r | |
47 | &FvbHandle,\r | |
48 | &gEfiDevicePathProtocolGuid,\r | |
49 | EFI_NATIVE_INTERFACE,\r | |
50 | FvbDevice->DevicePath\r | |
51 | );\r | |
52 | ASSERT_EFI_ERROR (Status);\r | |
53 | }\r | |
54 | \r | |
55 | VOID\r | |
56 | InstallVirtualAddressChangeHandler (\r | |
57 | VOID\r | |
58 | )\r | |
59 | {\r | |
60 | //\r | |
61 | // Nothing.\r | |
62 | //\r | |
63 | }\r | |
3b3d016b BS |
64 | \r |
65 | EFI_STATUS\r | |
66 | MarkIoMemoryRangeForRuntimeAccess (\r | |
67 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
68 | IN UINTN Length\r | |
69 | )\r | |
70 | {\r | |
71 | //\r | |
72 | // Nothing\r | |
73 | //\r | |
74 | \r | |
75 | return EFI_SUCCESS;\r | |
76 | }\r |