Commit | Line | Data |
---|---|---|
aab3b9b9 MK |
1 | /** @file\r |
2 | The common variable volatile store routines shared by the DXE_RUNTIME variable\r | |
3 | module and the DXE_SMM variable module.\r | |
4 | \r | |
5 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
9 | \r | |
10 | #ifndef _VARIABLE_RUNTIME_CACHE_H_\r | |
11 | #define _VARIABLE_RUNTIME_CACHE_H_\r | |
12 | \r | |
13 | #include "Variable.h"\r | |
14 | \r | |
15 | /**\r | |
16 | Copies any pending updates to runtime variable caches.\r | |
17 | \r | |
18 | @retval EFI_UNSUPPORTED The volatile store to be updated is not initialized properly.\r | |
19 | @retval EFI_SUCCESS The volatile store was updated successfully.\r | |
20 | \r | |
21 | **/\r | |
22 | EFI_STATUS\r | |
23 | FlushPendingRuntimeVariableCacheUpdates (\r | |
24 | VOID\r | |
25 | );\r | |
26 | \r | |
27 | /**\r | |
28 | Synchronizes the runtime variable caches with all pending updates outside runtime.\r | |
29 | \r | |
30 | Ensures all conditions are met to maintain coherency for runtime cache updates. This function will attempt\r | |
31 | to write the given update (and any other pending updates) if the ReadLock is available. Otherwise, the\r | |
32 | update is added as a pending update for the given variable store and it will be flushed to the runtime cache\r | |
33 | at the next opportunity the ReadLock is available.\r | |
34 | \r | |
35 | @param[in] VariableRuntimeCache Variable runtime cache structure for the runtime cache being synchronized.\r | |
36 | @param[in] Offset Offset in bytes to apply the update.\r | |
37 | @param[in] Length Length of data in bytes of the update.\r | |
38 | \r | |
39 | @retval EFI_SUCCESS The update was added as a pending update successfully. If the variable runtime\r | |
40 | cache ReadLock was available, the runtime cache was updated successfully.\r | |
41 | @retval EFI_UNSUPPORTED The volatile store to be updated is not initialized properly.\r | |
42 | \r | |
43 | **/\r | |
44 | EFI_STATUS\r | |
45 | SynchronizeRuntimeVariableCache (\r | |
1436aea4 MK |
46 | IN VARIABLE_RUNTIME_CACHE *VariableRuntimeCache,\r |
47 | IN UINTN Offset,\r | |
48 | IN UINTN Length\r | |
aab3b9b9 MK |
49 | );\r |
50 | \r | |
51 | #endif\r |