Deleted Added
full compact
efifs.h (77943) efifs.h (96893)
1/* $FreeBSD: head/sys/boot/efi/include/efifs.h 77943 2001-06-09 16:49:51Z dfr $ */
1/* $FreeBSD: head/sys/boot/efi/include/efifs.h 96893 2002-05-19 03:17:22Z marcel $ */
2#ifndef _EFI_FS_H
3#define _EFI_FS_H
4
5/*++
6
7Copyright (c) 1998 Intel Corporation
8
9Module Name:

--- 6 unchanged lines hidden (view full) ---

16
17
18
19Revision History
20
21--*/
22
23
2#ifndef _EFI_FS_H
3#define _EFI_FS_H
4
5/*++
6
7Copyright (c) 1998 Intel Corporation
8
9Module Name:

--- 6 unchanged lines hidden (view full) ---

16
17
18
19Revision History
20
21--*/
22
23
24//
25// EFI Partition header (normaly starts in LBA 1)
26//
24/*
25 * EFI Partition header (normaly starts in LBA 1)
26 */
27
28#define EFI_PARTITION_SIGNATURE 0x5053595320494249
29#define EFI_PARTITION_REVISION 0x00010001
30#define MIN_EFI_PARTITION_BLOCK_SIZE 512
31#define EFI_PARTITION_LBA 1
32
33typedef struct _EFI_PARTITION_HEADER {
34 EFI_TABLE_HEADER Hdr;
35 UINT32 DirectoryAllocationNumber;
36 UINT32 BlockSize;
37 EFI_LBA FirstUsableLba;
38 EFI_LBA LastUsableLba;
39 EFI_LBA UnusableSpace;
40 EFI_LBA FreeSpace;
41 EFI_LBA RootFile;
42 EFI_LBA SecutiryFile;
43} EFI_PARTITION_HEADER;
44
45
27
28#define EFI_PARTITION_SIGNATURE 0x5053595320494249
29#define EFI_PARTITION_REVISION 0x00010001
30#define MIN_EFI_PARTITION_BLOCK_SIZE 512
31#define EFI_PARTITION_LBA 1
32
33typedef struct _EFI_PARTITION_HEADER {
34 EFI_TABLE_HEADER Hdr;
35 UINT32 DirectoryAllocationNumber;
36 UINT32 BlockSize;
37 EFI_LBA FirstUsableLba;
38 EFI_LBA LastUsableLba;
39 EFI_LBA UnusableSpace;
40 EFI_LBA FreeSpace;
41 EFI_LBA RootFile;
42 EFI_LBA SecutiryFile;
43} EFI_PARTITION_HEADER;
44
45
46//
47// File header
48//
46/*
47 * File header
48 */
49
50#define EFI_FILE_HEADER_SIGNATURE 0x454c494620494249
51#define EFI_FILE_HEADER_REVISION 0x00010000
52#define EFI_FILE_STRING_SIZE 260
53
54typedef struct _EFI_FILE_HEADER {
55 EFI_TABLE_HEADER Hdr;
56 UINT32 Class;
57 UINT32 LBALOffset;
58 EFI_LBA Parent;
59 UINT64 FileSize;
60 UINT64 FileAttributes;
61 EFI_TIME FileCreateTime;
62 EFI_TIME FileModificationTime;
63 EFI_GUID VendorGuid;
64 CHAR16 FileString[EFI_FILE_STRING_SIZE];
65} EFI_FILE_HEADER;
66
67
49
50#define EFI_FILE_HEADER_SIGNATURE 0x454c494620494249
51#define EFI_FILE_HEADER_REVISION 0x00010000
52#define EFI_FILE_STRING_SIZE 260
53
54typedef struct _EFI_FILE_HEADER {
55 EFI_TABLE_HEADER Hdr;
56 UINT32 Class;
57 UINT32 LBALOffset;
58 EFI_LBA Parent;
59 UINT64 FileSize;
60 UINT64 FileAttributes;
61 EFI_TIME FileCreateTime;
62 EFI_TIME FileModificationTime;
63 EFI_GUID VendorGuid;
64 CHAR16 FileString[EFI_FILE_STRING_SIZE];
65} EFI_FILE_HEADER;
66
67
68//
69// Return the file's first LBAL which is in the same
70// logical block as the file header
71//
68/*
69 * Return the file's first LBAL which is in the same
70 * logical block as the file header
71 */
72
73#define EFI_FILE_LBAL(a) ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
74
75#define EFI_FILE_CLASS_FREE_SPACE 1
76#define EFI_FILE_CLASS_EMPTY 2
77#define EFI_FILE_CLASS_NORMAL 3
78
79
72
73#define EFI_FILE_LBAL(a) ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
74
75#define EFI_FILE_CLASS_FREE_SPACE 1
76#define EFI_FILE_CLASS_EMPTY 2
77#define EFI_FILE_CLASS_NORMAL 3
78
79
80//
81// Logical Block Address List - the fundemental block
82// description structure
83//
80/*
81 * Logical Block Address List - the fundemental block
82 * description structure
83 */
84
85#define EFI_LBAL_SIGNATURE 0x4c41424c20494249
86#define EFI_LBAL_REVISION 0x00010000
87
88typedef struct _EFI_LBAL {
89 EFI_TABLE_HEADER Hdr;
90 UINT32 Class;
91 EFI_LBA Parent;
92 EFI_LBA Next;
93 UINT32 ArraySize;
94 UINT32 ArrayCount;
95} EFI_LBAL;
96
84
85#define EFI_LBAL_SIGNATURE 0x4c41424c20494249
86#define EFI_LBAL_REVISION 0x00010000
87
88typedef struct _EFI_LBAL {
89 EFI_TABLE_HEADER Hdr;
90 UINT32 Class;
91 EFI_LBA Parent;
92 EFI_LBA Next;
93 UINT32 ArraySize;
94 UINT32 ArrayCount;
95} EFI_LBAL;
96
97// Array size
97/* Array size */
98#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
99 (((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
100
98#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
99 (((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
100
101//
102// Logical Block run-length
103//
101/*
102 * Logical Block run-length
103 */
104
105typedef struct {
106 EFI_LBA Start;
107 UINT64 Length;
108} EFI_RL;
109
104
105typedef struct {
106 EFI_LBA Start;
107 UINT64 Length;
108} EFI_RL;
109
110//
111// Return the run-length structure from an LBAL header
112//
110/*
111 * Return the run-length structure from an LBAL header
112 */
113
114#define EFI_LBAL_RL(a) ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))
115
116#endif
113
114#define EFI_LBAL_RL(a) ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))
115
116#endif