]>
Commit | Line | Data |
---|---|---|
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 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
9 | **/\r | |
10 | \r | |
11 | #include <Library/DebugLib.h>\r | |
12 | #include <Library/PcdLib.h>\r | |
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 | |
27 | ASSERT (FeaturePcdGet (PcdSmmSmramRequire));\r | |
28 | \r | |
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 ((DEBUG_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 | |
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 | |
77 | \r | |
78 | VOID\r | |
79 | SetPcdFlashNvStorageBaseAddresses (\r | |
80 | VOID\r | |
81 | )\r | |
82 | {\r | |
83 | //\r | |
84 | // Do nothing.\r | |
85 | //\r | |
86 | }\r |