summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2015-05-11 02:24:30 +0000
committerniruiyu <niruiyu@Edk2>2015-05-11 02:24:30 +0000
commitfaa32beb2396ebb70a248df85e2f6fa165f63c0e (patch)
tree784a59ebc00a9f7852f025f1e8bf63b85c94a6d3
parent672473eaeaf9c1987158993baf03606a972c4607 (diff)
downloadedk2-platforms-faa32beb2396ebb70a248df85e2f6fa165f63c0e.tar.xz
MdePkg: Add EFI_LOAD_OPTION definition.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Felix Poludov <Felixp@ami.com> Reviewed-by: Kinney Michael <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17390 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Include/Uefi/UefiSpec.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h
index 93b4b7c766..1c401e8e85 100644
--- a/MdePkg/Include/Uefi/UefiSpec.h
+++ b/MdePkg/Include/Uefi/UefiSpec.h
@@ -2001,6 +2001,55 @@ EFI_STATUS
);
//
+// EFI Load Option. This data structure describes format of UEFI boot option variables.
+//
+// NOTE: EFI Load Option is a byte packed buffer of variable length fields.
+// The first two fields have fixed length. They are declared as members of the
+// EFI_LOAD_OPTION structure. All the other fields are variable length fields.
+// They are listed in the comment block below for reference purposes.
+//
+#pragma pack(1)
+typedef struct _EFI_LOAD_OPTION {
+ ///
+ /// The attributes for this load option entry. All unused bits must be zero
+ /// and are reserved by the UEFI specification for future growth.
+ ///
+ UINT32 Attributes;
+ ///
+ /// Length in bytes of the FilePathList. OptionalData starts at offset
+ /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength
+ /// of the EFI_LOAD_OPTION descriptor.
+ ///
+ UINT16 FilePathListLength;
+ ///
+ /// The user readable description for the load option.
+ /// This field ends with a Null character.
+ ///
+ // CHAR16 Description[];
+ ///
+ /// A packed array of UEFI device paths. The first element of the array is a
+ /// device path that describes the device and location of the Image for this
+ /// load option. The FilePathList[0] is specific to the device type. Other
+ /// device paths may optionally exist in the FilePathList, but their usage is
+ /// OSV specific. Each element in the array is variable length, and ends at
+ /// the device path end structure. Because the size of Description is
+ /// arbitrary, this data structure is not guaranteed to be aligned on a
+ /// natural boundary. This data structure may have to be copied to an aligned
+ /// natural boundary before it is used.
+ ///
+ // EFI_DEVICE_PATH_PROTOCOL FilePathList[];
+ ///
+ /// The remaining bytes in the load option descriptor are a binary data buffer
+ /// that is passed to the loaded image. If the field is zero bytes long, a
+ /// NULL pointer is passed to the loaded image. The number of bytes in
+ /// OptionalData can be computed by subtracting the starting offset of
+ /// OptionalData from total size in bytes of the EFI_LOAD_OPTION.
+ ///
+ // UINT8 OptionalData[];
+} EFI_LOAD_OPTION;
+#pragma pack()
+
+//
// EFI Load Options Attributes
//
#define LOAD_OPTION_ACTIVE 0x00000001