From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- .../Variable/RuntimeDxe/VariableRuntimeCache.h | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 roms/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.h (limited to 'roms/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.h') diff --git a/roms/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.h b/roms/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.h new file mode 100644 index 000000000..f9804a1d6 --- /dev/null +++ b/roms/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.h @@ -0,0 +1,51 @@ +/** @file + The common variable volatile store routines shared by the DXE_RUNTIME variable + module and the DXE_SMM variable module. + +Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _VARIABLE_RUNTIME_CACHE_H_ +#define _VARIABLE_RUNTIME_CACHE_H_ + +#include "Variable.h" + +/** + Copies any pending updates to runtime variable caches. + + @retval EFI_UNSUPPORTED The volatile store to be updated is not initialized properly. + @retval EFI_SUCCESS The volatile store was updated successfully. + +**/ +EFI_STATUS +FlushPendingRuntimeVariableCacheUpdates ( + VOID + ); + +/** + Synchronizes the runtime variable caches with all pending updates outside runtime. + + Ensures all conditions are met to maintain coherency for runtime cache updates. This function will attempt + to write the given update (and any other pending updates) if the ReadLock is available. Otherwise, the + update is added as a pending update for the given variable store and it will be flushed to the runtime cache + at the next opportunity the ReadLock is available. + + @param[in] VariableRuntimeCache Variable runtime cache structure for the runtime cache being synchronized. + @param[in] Offset Offset in bytes to apply the update. + @param[in] Length Length of data in bytes of the update. + + @retval EFI_SUCCESS The update was added as a pending update successfully. If the variable runtime + cache ReadLock was available, the runtime cache was updated successfully. + @retval EFI_UNSUPPORTED The volatile store to be updated is not initialized properly. + +**/ +EFI_STATUS +SynchronizeRuntimeVariableCache ( + IN VARIABLE_RUNTIME_CACHE *VariableRuntimeCache, + IN UINTN Offset, + IN UINTN Length + ); + +#endif -- cgit