X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FQemuFlashFvbServicesRuntimeDxe%2FFvbInfo.c;h=6edbeed82f4b1ae4d505aab5f5b8e006027d4430;hb=e1fb441624cdb50bdf7b45afdb8071534e2cdbc3;hp=72845f955527219559b1298f1972382f40b9d6e7;hpb=a4ce9ffd470dbbab07ad1a9caeab5049b5a4bb6a;p=mirror_edk2.git diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbInfo.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbInfo.c index 72845f9555..6edbeed82f 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbInfo.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbInfo.c @@ -1,50 +1,39 @@ /**@file -Copyright (c) 2006, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006, Intel Corporation. All rights reserved.
-Module Name: + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - FvbInfo.c + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -Abstract: + Module Name: - Defines data structure that is the volume header found.These data is intent - to decouple FVB driver with FV header. + FvbInfo.c + + Abstract: + + Defines data structure that is the volume header found.These data is intent + to decouple FVB driver with FV header. **/ // // The package level header files this module uses // -#include +#include + // // The protocols, PPI and GUID defintions for this module // -#include -#include #include -#include -#include // // The Library classes this module consumes // -#include -#include #include -#include -#include -#include -#include -#include -#include -#include #include typedef struct { @@ -75,7 +64,7 @@ EFI_FVB_MEDIA_INFO mPlatformFvbMediaInfo[] = { FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) + FixedPcdGet32 (PcdOvmfFlashNvStorageEventLogSize), EFI_FVH_SIGNATURE, - EFI_FVB2_MEMORY_MAPPED | + EFI_FVB2_MEMORY_MAPPED | EFI_FVB2_READ_ENABLED_CAP | EFI_FVB2_READ_STATUS | EFI_FVB2_WRITE_ENABLED_CAP | @@ -90,17 +79,22 @@ EFI_FVB_MEDIA_INFO mPlatformFvbMediaInfo[] = { }, // Reserved[1] 2, // Revision { - (FixedPcdGet32 (PcdFlashNvStorageVariableSize) + - FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) + - FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) + - FixedPcdGet32 (PcdOvmfFlashNvStorageEventLogSize)) / FixedPcdGet32 (PcdOvmfFirmwareBlockSize), - FixedPcdGet32 (PcdOvmfFirmwareBlockSize), - } + { + (FixedPcdGet32 (PcdFlashNvStorageVariableSize) + + FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) + + FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) + + FixedPcdGet32 (PcdOvmfFlashNvStorageEventLogSize)) / + FixedPcdGet32 (PcdOvmfFirmwareBlockSize), + FixedPcdGet32 (PcdOvmfFirmwareBlockSize), + } + } // BlockMap[1] }, { - 0, - 0 - } + { + 0, + 0 + } + } // End[1] } }; @@ -114,7 +108,9 @@ GetFvbInfo ( UINTN Index; if (!Checksummed) { - for (Index = 0; Index < sizeof (mPlatformFvbMediaInfo) / sizeof (EFI_FVB_MEDIA_INFO); Index += 1) { + for (Index = 0; + Index < sizeof (mPlatformFvbMediaInfo) / sizeof (EFI_FVB_MEDIA_INFO); + Index += 1) { UINT16 Checksum; mPlatformFvbMediaInfo[Index].FvbInfo.Checksum = 0; Checksum = CalculateCheckSum16 ( @@ -126,7 +122,9 @@ GetFvbInfo ( Checksummed = TRUE; } - for (Index = 0; Index < sizeof (mPlatformFvbMediaInfo) / sizeof (EFI_FVB_MEDIA_INFO); Index += 1) { + for (Index = 0; + Index < sizeof (mPlatformFvbMediaInfo) / sizeof (EFI_FVB_MEDIA_INFO); + Index += 1) { if (mPlatformFvbMediaInfo[Index].FvLength == FvLength) { *FvbInfo = &mPlatformFvbMediaInfo[Index].FvbInfo; return EFI_SUCCESS;