X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EmulatorPkg%2FFvbServicesRuntimeDxe%2FFWBlockService.c;h=9513d05bed594774c9c89948efc5999e6b19460e;hp=a95b180adb068a5c96f6d8ead0ac85595b4d6553;hb=d18d8a1d0e370f8ce6ccc2725f4170586d457e53;hpb=bb89ec1a7ec2f8d35033df9e47b3604925da3bd3 diff --git a/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c b/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c index a95b180adb..9513d05bed 100644 --- a/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c +++ b/EmulatorPkg/FvbServicesRuntimeDxe/FWBlockService.c @@ -2,13 +2,13 @@ Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
Portions copyright (c) 2011, Apple Inc. 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. +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. **/ @@ -90,14 +90,14 @@ Routine Description: date items to there virtual address. mFvbModuleGlobal->FvInstance[FVB_PHYSICAL] - Physical copy of instance data - mFvbModuleGlobal->FvInstance[FVB_VIRTUAL] - Virtual pointer to common + mFvbModuleGlobal->FvInstance[FVB_VIRTUAL] - Virtual pointer to common instance data. Arguments: (Standard EFI notify event - EFI_EVENT_NOTIFY) -Returns: +Returns: None @@ -146,7 +146,7 @@ Arguments: FwhInstance - The EFI_FW_VOL_INSTANCE fimrware instance structure Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - Successfully returns EFI_INVALID_PARAMETER - Instance not found @@ -190,14 +190,14 @@ Routine Description: Arguments: Instance - The FV instance whose base address is going to be returned - Address - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS + Address - Pointer to a caller allocated EFI_PHYSICAL_ADDRESS that on successful return, contains the base address - of the firmware volume. + of the firmware volume. Global - Pointer to ESAL_FWB_GLOBAL that contains all instance data Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - Successfully returns EFI_INVALID_PARAMETER - Instance not found @@ -230,14 +230,14 @@ Routine Description: resulting attributes in output parameter Arguments: - Instance - The FV instance whose attributes is going to be + Instance - The FV instance whose attributes is going to be returned Attributes - Output buffer which contains attributes Global - Pointer to ESAL_FWB_GLOBAL that contains all instance data Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - Successfully returns EFI_INVALID_PARAMETER - Instance not found @@ -274,7 +274,7 @@ Routine Description: Arguments: Instance - The FV instance which the Lba belongs to Lba - The logical block address - LbaAddress - On output, contains the physical starting address + LbaAddress - On output, contains the physical starting address of the Lba LbaLength - On output, contains the length of the block NumOfBlocks - A pointer to a caller allocated UINTN in which the @@ -285,7 +285,7 @@ Arguments: instance data Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - Successfully returns EFI_INVALID_PARAMETER - Instance not found @@ -377,14 +377,14 @@ Arguments: instance data Virtual - Whether CPU is in virtual or physical mode -Returns: - EFI_SUCCESS - The firmware volume was read successfully and +Returns: + EFI_SUCCESS - The firmware volume was read successfully and contents are in Buffer EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output, NumBytes contains the total number of bytes returned in Buffer EFI_ACCESS_DENIED - The firmware volume is in the ReadDisabled state - EFI_DEVICE_ERROR - The block device is not functioning correctly and + EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be read EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL @@ -463,13 +463,13 @@ Arguments: instance data Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - The firmware volume was written successfully EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output, NumBytes contains the total number of bytes actually written EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state - EFI_DEVICE_ERROR - The block device is not functioning correctly and + EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be written EFI_INVALID_PARAMETER - Instance not found, or NumBytes, Buffer are NULL @@ -541,10 +541,10 @@ Arguments: instance data Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - The erase request was successfully completed EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state - EFI_DEVICE_ERROR - The block device is not functioning correctly and + EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be written. Firmware device may have been partially erased EFI_INVALID_PARAMETER - Instance not found @@ -596,13 +596,13 @@ FvbSetVolumeAttributes ( /*++ Routine Description: - Modifies the current settings of the firmware volume according to the + Modifies the current settings of the firmware volume according to the input parameter, and returns the new setting of the volume Arguments: - Instance - The FV instance whose attributes is going to be + Instance - The FV instance whose attributes is going to be modified - Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES_2 + Attributes - On input, it is a pointer to EFI_FVB_ATTRIBUTES_2 containing the desired firmware volume settings. On successful return, it contains the new settings of the firmware volume @@ -610,7 +610,7 @@ Arguments: instance data Virtual - Whether CPU is in virtual or physical mode -Returns: +Returns: EFI_SUCCESS - Successfully returns EFI_ACCESS_DENIED - The volume setting is locked and cannot be modified EFI_INVALID_PARAMETER - Instance not found, or The attributes requested are @@ -742,7 +742,7 @@ Arguments: Returns: -Returns: +Returns: EFI_SUCCESS - Successfully returns **/ @@ -777,8 +777,8 @@ Arguments: returned. All blocks in this range have a size of BlockSize -Returns: - EFI_SUCCESS - The firmware volume was read successfully and +Returns: + EFI_SUCCESS - The firmware volume was read successfully and contents are in Buffer **/ @@ -813,7 +813,7 @@ Arguments: This - Calling context Attributes - output buffer which contains attributes -Returns: +Returns: EFI_SUCCESS - Successfully returns **/ @@ -840,7 +840,7 @@ Arguments: This - Calling context Attributes - output buffer which contains attributes -Returns: +Returns: EFI_SUCCESS - Successfully returns **/ @@ -856,28 +856,28 @@ EFI_STATUS EFIAPI FvbProtocolEraseBlocks ( IN CONST EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *This, - ... + ... ) /*++ Routine Description: - The EraseBlock() function erases one or more blocks as denoted by the + The EraseBlock() function erases one or more blocks as denoted by the variable argument list. The entire parameter list of blocks must be verified - prior to erasing any blocks. If a block is requested that does not exist - within the associated firmware volume (it has a larger index than the last + prior to erasing any blocks. If a block is requested that does not exist + within the associated firmware volume (it has a larger index than the last block of the firmware volume), the EraseBlock() function must return EFI_INVALID_PARAMETER without modifying the contents of the firmware volume. Arguments: This - Calling context - ... - Starting LBA followed by Number of Lba to erase. + ... - Starting LBA followed by Number of Lba to erase. a -1 to terminate the list. -Returns: +Returns: EFI_SUCCESS - The erase request was successfully completed EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state - EFI_DEVICE_ERROR - The block device is not functioning correctly and + EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be written. Firmware device may have been partially erased @@ -978,13 +978,13 @@ Arguments: output, indicates the actual number of bytes written Buffer - Buffer containing source data for the write. -Returns: +Returns: EFI_SUCCESS - The firmware volume was written successfully EFI_BAD_BUFFER_SIZE - Write attempted across a LBA boundary. On output, NumBytes contains the total number of bytes actually written EFI_ACCESS_DENIED - The firmware volume is in the WriteDisabled state - EFI_DEVICE_ERROR - The block device is not functioning correctly and + EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be written EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL @@ -1026,14 +1026,14 @@ Arguments: output, indicates the actual number of bytes Read Buffer - Buffer containing source data for the Read. -Returns: - EFI_SUCCESS - The firmware volume was read successfully and +Returns: + EFI_SUCCESS - The firmware volume was read successfully and contents are in Buffer EFI_BAD_BUFFER_SIZE - Read attempted across a LBA boundary. On output, NumBytes contains the total number of bytes returned in Buffer EFI_ACCESS_DENIED - The firmware volume is in the ReadDisabled state - EFI_DEVICE_ERROR - The block device is not functioning correctly and + EFI_DEVICE_ERROR - The block device is not functioning correctly and could not be read EFI_INVALID_PARAMETER - NumBytes or Buffer are NULL @@ -1058,7 +1058,7 @@ Routine Description: Arguments: FwVolHeader - A pointer to a firmware volume header -Returns: +Returns: EFI_SUCCESS - The firmware volume is consistent EFI_NOT_FOUND - The firmware volume has corrupted. So it is not an FV