X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=IntelFrameworkPkg%2FInclude%2FFramework%2FFirmwareVolumeHeader.h;h=e2b5a28b8bcb1b95882f85be68040987234509b8;hb=aa7fc1c11c3d57d82842dbede50d064639671a98;hp=9a3f330c59b5cd3c51d03cc30a86ea15b230df8d;hpb=27134a44c53cdde976516d2c37ee0bd680017307;p=mirror_edk2.git
diff --git a/IntelFrameworkPkg/Include/Framework/FirmwareVolumeHeader.h b/IntelFrameworkPkg/Include/Framework/FirmwareVolumeHeader.h
index 9a3f330c59..e2b5a28b8b 100644
--- a/IntelFrameworkPkg/Include/Framework/FirmwareVolumeHeader.h
+++ b/IntelFrameworkPkg/Include/Framework/FirmwareVolumeHeader.h
@@ -1,32 +1,22 @@
/** @file
- Defines data structure that is the volume header found at the beginning of
- all firmware volumes that are either memory mapped, or have an
+ Defines the data structure that is the volume header found at the beginning of
+ all firmware volumes that are either memory mapped or have an
associated FirmwareVolumeBlock protocol.
- 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.
-
- Module Name: FirmwareVolumeHeader.h
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
- These definitions are from Firmware Volume Block Spec 0.9.
+ These definitions are from the Firmware Volume Block Spec 0.9.
**/
#ifndef __EFI_FIRMWARE_VOLUME_HEADER_H__
#define __EFI_FIRMWARE_VOLUME_HEADER_H__
-#include
-
-//
-// Firmware Volume Block Attributes bit definitions
-//
+///
+/// Firmware Volume Block Attributes bit definitions.
+///@{
#define EFI_FVB_READ_DISABLED_CAP 0x00000001
#define EFI_FVB_READ_ENABLED_CAP 0x00000002
#define EFI_FVB_READ_STATUS 0x00000004
@@ -59,21 +49,31 @@
#define EFI_FVB_ALIGNMENT_16K 0x20000000
#define EFI_FVB_ALIGNMENT_32K 0x40000000
#define EFI_FVB_ALIGNMENT_64K 0x80000000
-
-#define EFI_FVB_CAPABILITIES (EFI_FVB_READ_DISABLED_CAP | \
- EFI_FVB_READ_ENABLED_CAP | \
- EFI_FVB_WRITE_DISABLED_CAP | \
- EFI_FVB_WRITE_ENABLED_CAP | \
- EFI_FVB_LOCK_CAP \
+///@}
+
+/// This is a simple macro defined as the set of all FV Block Attributes signifying capabilities.
+#define EFI_FVB_CAPABILITIES ( EFI_FVB_READ_DISABLED_CAP | \
+ EFI_FVB_READ_ENABLED_CAP | \
+ EFI_FVB_WRITE_DISABLED_CAP | \
+ EFI_FVB_WRITE_ENABLED_CAP | \
+ EFI_FVB_LOCK_CAP \
)
-#define EFI_TEST_FFS_ATTRIBUTES_BIT(FvbAttributes, TestAttributes, Bit) \
- ( \
- (BOOLEAN) ( \
- (FvbAttributes & EFI_FVB_ERASE_POLARITY) ? (((~TestAttributes) & Bit) == Bit) : ((TestAttributes & Bit) == Bit) \
- ) \
+/** A parameterized macro defining a boolean expression that tests the state of a particular bit.
+ *
+ * @param FvbAttributes Indicates a test for CLEAR if EFI_FVB_ERASE_POLARITY is 1, else test for SET.
+ *
+ * @param TestAttributes The set of bits to test.
+ *
+ * @param Bit A value indicating the bit(s) to test.
+ * If multiple bits are set, the logical OR of their tests is the expression's value.
+**/
+#define EFI_TEST_FFS_ATTRIBUTES_BIT( FvbAttributes, TestAttributes, Bit) \
+ ((BOOLEAN) \
+ ((FvbAttributes & EFI_FVB_ERASE_POLARITY) ? (((~TestAttributes) & Bit) == Bit) : ((TestAttributes & Bit) == Bit)) \
)
+/// A simple macro defined as the set of all FV Block Attribute bits that indicate status.
#define EFI_FVB_STATUS (EFI_FVB_READ_STATUS | EFI_FVB_WRITE_STATUS | EFI_FVB_LOCK_STATUS)
-#endif
+#endif /* __EFI_FIRMWARE_VOLUME_HEADER_H__ */