]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Add EFI_LOAD_OPTION definition.
authorRuiyu Ni <ruiyu.ni@intel.com>
Mon, 11 May 2015 02:24:30 +0000 (02:24 +0000)
committerniruiyu <niruiyu@Edk2>
Mon, 11 May 2015 02:24:30 +0000 (02:24 +0000)
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

MdePkg/Include/Uefi/UefiSpec.h

index 93b4b7c766dd1291869dd7e0b897a8388d132310..1c401e8e85186f87d44d54125538e44a3ce583f4 100644 (file)
@@ -2000,6 +2000,55 @@ EFI_STATUS
   IN  EFI_SYSTEM_TABLE             *SystemTable\r
   );\r
 \r
+//\r
+// EFI Load Option. This data structure describes format of UEFI boot option variables.\r
+//\r
+// NOTE: EFI Load Option is a byte packed buffer of variable length fields.\r
+// The first two fields have fixed length. They are declared as members of the\r
+// EFI_LOAD_OPTION structure. All the other fields are variable length fields.\r
+// They are listed in the comment block below for reference purposes.\r
+//\r
+#pragma pack(1)\r
+typedef struct _EFI_LOAD_OPTION {\r
+  ///\r
+  /// The attributes for this load option entry. All unused bits must be zero\r
+  /// and are reserved by the UEFI specification for future growth.\r
+  ///\r
+  UINT32                           Attributes;\r
+  ///\r
+  /// Length in bytes of the FilePathList. OptionalData starts at offset\r
+  /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength\r
+  /// of the EFI_LOAD_OPTION descriptor.\r
+  ///\r
+  UINT16                           FilePathListLength;\r
+  ///\r
+  /// The user readable description for the load option.\r
+  /// This field ends with a Null character.\r
+  ///\r
+  // CHAR16                        Description[];\r
+  ///\r
+  /// A packed array of UEFI device paths. The first element of the array is a\r
+  /// device path that describes the device and location of the Image for this\r
+  /// load option. The FilePathList[0] is specific to the device type. Other\r
+  /// device paths may optionally exist in the FilePathList, but their usage is\r
+  /// OSV specific. Each element in the array is variable length, and ends at\r
+  /// the device path end structure. Because the size of Description is\r
+  /// arbitrary, this data structure is not guaranteed to be aligned on a\r
+  /// natural boundary. This data structure may have to be copied to an aligned\r
+  /// natural boundary before it is used.\r
+  ///\r
+  // EFI_DEVICE_PATH_PROTOCOL      FilePathList[];\r
+  ///\r
+  /// The remaining bytes in the load option descriptor are a binary data buffer\r
+  /// that is passed to the loaded image. If the field is zero bytes long, a\r
+  /// NULL pointer is passed to the loaded image. The number of bytes in\r
+  /// OptionalData can be computed by subtracting the starting offset of\r
+  /// OptionalData from total size in bytes of the EFI_LOAD_OPTION.\r
+  ///\r
+  // UINT8                         OptionalData[];\r
+} EFI_LOAD_OPTION;\r
+#pragma pack()\r
+\r
 //\r
 // EFI Load Options Attributes\r
 //\r