Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c
r48674 r58459 4 4 (Fault Tolerant Write) protocol. 5 5 6 Copyright (c) 2006 - 201 0, Intel Corporation. All rights reserved.<BR>6 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 7 7 This program and the accompanying materials 8 8 are licensed and made available under the terms and conditions of the BSD License … … 48 48 UINT32 LbaIndex; 49 49 50 Fvb = NULL; 50 51 *Lba = (EFI_LBA) (-1); 51 52 *Offset = 0; … … 100 101 101 102 @param VariableBase Base address of variable to write 102 @param Buffer Point to the data buffer. 103 @param BufferSize The number of bytes of the data Buffer. 103 @param VariableBuffer Point to the variable data buffer. 104 104 105 105 @retval EFI_SUCCESS The function completed successfully. … … 111 111 FtwVariableSpace ( 112 112 IN EFI_PHYSICAL_ADDRESS VariableBase, 113 IN UINT8 *Buffer, 114 IN UINTN BufferSize 113 IN VARIABLE_STORE_HEADER *VariableBuffer 115 114 ) 116 115 { … … 119 118 EFI_LBA VarLba; 120 119 UINTN VarOffset; 121 UINT8 *FtwBuffer;122 120 UINTN FtwBufferSize; 123 121 EFI_FAULT_TOLERANT_WRITE_PROTOCOL *FtwProtocol; … … 144 142 return EFI_ABORTED; 145 143 } 146 // 147 // Prepare for the variable data. 148 // 144 149 145 FtwBufferSize = ((VARIABLE_STORE_HEADER *) ((UINTN) VariableBase))->Size; 150 FtwBuffer = AllocatePool (FtwBufferSize); 151 if (FtwBuffer == NULL) { 152 return EFI_OUT_OF_RESOURCES; 153 } 154 155 SetMem (FtwBuffer, FtwBufferSize, (UINT8) 0xff); 156 CopyMem (FtwBuffer, Buffer, BufferSize); 146 ASSERT (FtwBufferSize == VariableBuffer->Size); 157 147 158 148 // … … 166 156 NULL, // PrivateData NULL 167 157 FvbHandle, // Fvb Handle 168 FtwBuffer// write buffer158 (VOID *) VariableBuffer // write buffer 169 159 ); 170 160 171 FreePool (FtwBuffer);172 161 return Status; 173 162 }
Note:
See TracChangeset
for help on using the changeset viewer.