Changeset 108794 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe
- Timestamp:
- Mar 31, 2025 11:31:09 AM (5 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168237
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-164365 /vendor/edk2/current 103735-103757,103769-103776,129194-168232
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c
r99404 r108794 44 44 This driver need to make sure the CommBuffer is not in the SMRAM range. 45 45 46 Copyright (c) 2010 - 20 18, Intel Corporation. All rights reserved.<BR>46 Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.<BR> 47 47 SPDX-License-Identifier: BSD-2-Clause-Patent 48 48 … … 333 333 CommBufferPayloadSize = TempCommBufferSize - SMM_FTW_COMMUNICATE_HEADER_SIZE; 334 334 335 if (!FtwSmmIs BufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) {336 DEBUG ((DEBUG_ERROR, "SmmFtwHandler: SMM communication buffer in SMRAM or overflow!\n"));335 if (!FtwSmmIsPrimaryBufferValid ((UINTN)CommBuffer, TempCommBufferSize)) { 336 DEBUG ((DEBUG_ERROR, "SmmFtwHandler: SMM Primary(communication buffer) is not valid!\n")); 337 337 return EFI_SUCCESS; 338 338 } -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h
r99404 r108794 3 3 The common header file for SMM FTW module and SMM FTW DXE Module. 4 4 5 Copyright (c) 2011 - 20 18, Intel Corporation. All rights reserved. <BR>5 Copyright (c) 2011 - 2024, Intel Corporation. All rights reserved. <BR> 6 6 SPDX-License-Identifier: BSD-2-Clause-Patent 7 7 … … 86 86 87 87 /** 88 This function checks if the buffer is valid per processor architecture and 89 does not overlap with SMRAM. 88 This function checks if the Primary Buffer is valid. 90 89 91 90 @param Buffer The buffer start address to be checked. 92 91 @param Length The buffer length to be checked. 93 92 94 @retval TRUE This buffer is valid per processor architecture and does not 95 overlap with SMRAM. 96 @retval FALSE This buffer is not valid per processor architecture or overlaps 97 with SMRAM. 93 @retval TRUE This buffer is valid. 94 @retval FALSE This buffer is not valid. 98 95 **/ 99 96 BOOLEAN 100 FtwSmmIs BufferOutsideSmmValid (97 FtwSmmIsPrimaryBufferValid ( 101 98 IN EFI_PHYSICAL_ADDRESS Buffer, 102 99 IN UINT64 Length -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneMm.c
r99404 r108794 3 3 Parts of the SMM/MM implementation that are specific to standalone MM 4 4 5 Copyright (c) 2010 - 20 18, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.<BR> 6 6 Copyright (c) 2018, Linaro, Ltd. All rights reserved.<BR> 7 7 SPDX-License-Identifier: BSD-2-Clause-Patent … … 15 15 16 16 /** 17 This function checks if the buffer is valid per processor architecture and 18 does not overlap with SMRAM. 17 This function checks if the Primary Buffer is valid. 19 18 20 19 @param Buffer The buffer start address to be checked. 21 20 @param Length The buffer length to be checked. 22 21 23 @retval TRUE This buffer is valid per processor architecture and does not 24 overlap with SMRAM. 25 @retval FALSE This buffer is not valid per processor architecture or overlaps 26 with SMRAM. 22 @retval TRUE This buffer is valid. 23 @retval FALSE This buffer is not valid. 27 24 **/ 28 25 BOOLEAN 29 FtwSmmIs BufferOutsideSmmValid (26 FtwSmmIsPrimaryBufferValid ( 30 27 IN EFI_PHYSICAL_ADDRESS Buffer, 31 28 IN UINT64 Length -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteTraditionalMm.c
r99404 r108794 3 3 Parts of the SMM/MM implementation that are specific to traditional MM 4 4 5 Copyright (c) 2011 - 20 18, Intel Corporation. All rights reserved. <BR>5 Copyright (c) 2011 - 2024, Intel Corporation. All rights reserved. <BR> 6 6 Copyright (c) 2018, Linaro, Ltd. All rights reserved. <BR> 7 7 SPDX-License-Identifier: BSD-2-Clause-Patent … … 15 15 16 16 /** 17 This function checks if the buffer is valid per processor architecture and17 This function checks if the Primary Buffer is valid per processor architecture and 18 18 does not overlap with SMRAM. 19 19 … … 27 27 **/ 28 28 BOOLEAN 29 FtwSmmIs BufferOutsideSmmValid (29 FtwSmmIsPrimaryBufferValid ( 30 30 IN EFI_PHYSICAL_ADDRESS Buffer, 31 31 IN UINT64 Length -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
r101291 r108794 811 811 Offset = sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER); 812 812 813 if (!CompareGuid (&FtwWorkSpaceHeader->Signature, &gEdkiiWorkingBlockSignatureGuid)) { 814 *FtwWriteHeader = FtwHeader; 815 return EFI_ABORTED; 816 } 817 813 818 while (FtwHeader->Complete == FTW_VALID_STATE) { 814 819 Offset += FTW_WRITE_TOTAL_SIZE (FtwHeader->NumberOfWrites, FtwHeader->PrivateDataSize); … … 816 821 // If Offset exceed the FTW work space boudary, return error. 817 822 // 818 if (Offset >= FtwWorkSpaceSize) { 823 824 if ((Offset + sizeof (EFI_FAULT_TOLERANT_WRITE_HEADER)) >= FtwWorkSpaceSize) { 819 825 *FtwWriteHeader = FtwHeader; 820 826 return EFI_ABORTED;
Note:
See TracChangeset
for help on using the changeset viewer.