summaryrefslogtreecommitdiff
path: root/Core/EfiFirmwareFileSystem.h
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Core/EfiFirmwareFileSystem.h
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Core/EfiFirmwareFileSystem.h')
-rw-r--r--Core/EfiFirmwareFileSystem.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Core/EfiFirmwareFileSystem.h b/Core/EfiFirmwareFileSystem.h
new file mode 100644
index 0000000..a1bf3ba
--- /dev/null
+++ b/Core/EfiFirmwareFileSystem.h
@@ -0,0 +1,49 @@
+/*++
+
+Copyright (c) 2004, 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:
+
+ EfiFirmwareFileSystem.h
+
+Abstract:
+
+ This file defines the data structures that comprise the FFS file system.
+
+--*/
+
+#ifndef _EFI_FFS_FILE_SYSTEM_H_
+#define _EFI_FFS_FILE_SYSTEM_H_
+
+#include <FFS.h>
+
+//
+// FFS_FIXED_CHECKSUM is the default checksum value used when the
+// FFS_ATTRIB_CHECKSUM attribute bit is clear
+// note this is NOT an architecturally defined value, but is in this file for
+// implementation convenience
+//
+#define FFS_FIXED_CHECKSUM 0x5A
+
+#define EFI_FILE_ALL_STATE_BITS (EFI_FILE_HEADER_CONSTRUCTION | \
+ EFI_FILE_HEADER_VALID | \
+ EFI_FILE_DATA_VALID | \
+ EFI_FILE_MARKED_FOR_UPDATE | \
+ EFI_FILE_DELETED | \
+ EFI_FILE_HEADER_INVALID \
+ )
+
+#define EFI_TEST_FFS_ATTRIBUTES_BIT(FvbAttributes, TestAttributes, Bit) \
+ ( \
+ (BOOLEAN) ( \
+ (FvbAttributes & EFI_FVB_ERASE_POLARITY) ? (((~TestAttributes) & Bit) == Bit) : ((TestAttributes & Bit) == Bit) \
+ ) \
+ )
+#endif