]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH process added.
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 3 Apr 2009 08:17:25 +0000 (08:17 +0000)
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 3 Apr 2009 08:17:25 +0000 (08:17 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8024 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/DevicePath.h
MdePkg/Include/Protocol/LoadFile2.h [new file with mode: 0644]
MdePkg/MdePkg.dec

index b2b0eec77ed65a06af58ffd1ac18c2c2431e3665..a699eaff803f39d7c26c41a7ce58ce03970e2216 100644 (file)
@@ -908,6 +908,20 @@ typedef struct {
   EFI_GUID                        FvFileName;\r
 } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;\r
 \r
+///\r
+/// Media relative offset range device path\r
+///\r
+#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08\r
+\r
+///\r
+/// Used to describe the offset range of media relative.\r
+///\r
+typedef struct {\r
+  EFI_DEVICE_PATH_PROTOCOL  Header;\r
+  UINT64                    StartingOffset;\r
+  UINT64                    EndingOffset;\r
+} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH;\r
+\r
 ///\r
 /// BIOS Boot Specification Device Path\r
 ///\r
@@ -984,6 +998,7 @@ typedef union {
 \r
   FILEPATH_DEVICE_PATH                 FilePath;\r
   MEDIA_PROTOCOL_DEVICE_PATH           MediaProtocol;\r
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;\r
 \r
   BBS_BBS_DEVICE_PATH                  Bbs;\r
 } EFI_DEV_PATH;\r
@@ -1021,6 +1036,7 @@ typedef union {
 \r
   FILEPATH_DEVICE_PATH                 *FilePath;\r
   MEDIA_PROTOCOL_DEVICE_PATH           *MediaProtocol;\r
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;\r
 \r
   BBS_BBS_DEVICE_PATH                  *Bbs;\r
   UINT8                                *Raw;\r
diff --git a/MdePkg/Include/Protocol/LoadFile2.h b/MdePkg/Include/Protocol/LoadFile2.h
new file mode 100644 (file)
index 0000000..f6b57da
--- /dev/null
@@ -0,0 +1,85 @@
+/** @file\r
+  Load File protocol as defined in the UEFI 2.0 specification.\r
+\r
+  Load file protocol exists to supports the addition of new boot devices, \r
+  and to support booting from devices that do not map well to file system. \r
+  Network boot is done via a LoadFile protocol.\r
+\r
+  UEFI 2.0 can boot from any device that produces a LoadFile protocol.\r
+\r
+  Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+**/\r
+\r
+#ifndef __EFI_LOAD_FILE2_PROTOCOL_H__\r
+#define __EFI_LOAD_FILE2_PROTOCOL_H__\r
+\r
+#define EFI_LOAD_FILE2_PROTOCOL_GUID \\r
+  { \\r
+    0x4006c0c1, 0xfcb3, 0x403e, {0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d } \\r
+  }\r
+\r
+///\r
+/// Protocol Guid defined by UEFI2.1.\r
+///\r
+#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID\r
+\r
+typedef struct _EFI_LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL;\r
+\r
+\r
+/**\r
+  Causes the driver to load a specified file.\r
+\r
+  @param  This       Protocol instance pointer.\r
+  @param  FilePath   The device specific path of the file to load.\r
+  @param  BootPolicy Should always be FALSE.\r
+  @param  BufferSize On input the size of Buffer in bytes. On output with a return\r
+                     code of EFI_SUCCESS, the amount of data transferred to\r
+                     Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,\r
+                     the size of Buffer required to retrieve the requested file.\r
+  @param  Buffer     The memory buffer to transfer the file to. IF Buffer is NULL,\r
+                     then no the size of the requested file is returned in\r
+                     BufferSize.\r
+\r
+  @retval EFI_SUCCESS           The file was loaded.\r
+  @retval EFI_UNSUPPORTED       BootPolicy is TRUE.\r
+  @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or\r
+                                BufferSize is NULL.\r
+  @retval EFI_NO_MEDIA          No medium was present to load the file.\r
+  @retval EFI_DEVICE_ERROR      The file was not loaded due to a device error.\r
+  @retval EFI_NO_RESPONSE       The remote system did not respond.\r
+  @retval EFI_NOT_FOUND         The file was not found\r
+  @retval EFI_ABORTED           The file load process was manually canceled.\r
+  @retval EFI_BUFFER_TOO_SMALL  The BufferSize is too small to read the current \r
+                                directory entry. BufferSize has been updated with\r
+                                the size needed to complete the request.\r
+\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_LOAD_FILE2)(\r
+  IN EFI_LOAD_FILE2_PROTOCOL           *This,\r
+  IN EFI_DEVICE_PATH_PROTOCOL         *FilePath,\r
+  IN BOOLEAN                          BootPolicy,\r
+  IN OUT UINTN                        *BufferSize,\r
+  IN VOID                             *Buffer OPTIONAL\r
+  );\r
+\r
+///\r
+/// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.\r
+///\r
+struct _EFI_LOAD_FILE2_PROTOCOL {\r
+  EFI_LOAD_FILE2 LoadFile;\r
+};\r
+\r
+extern EFI_GUID gEfiLoadFile2ProtocolGuid;\r
+\r
+#endif\r
index 56ff115ec589e3f8c155ce422f9d2a4519c230d3..bdb8f73bc2a13eea8f3498cfe68652f56b0441c7 100644 (file)
   ## Include/Protocol/LoadFile.h\r
   gEfiLoadFileProtocolGuid       = { 0x56EC3091, 0x954C, 0x11D2, { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}\r
   \r
+  ## Include/Protocol/LoadFile2.h\r
+  gEfiLoadFile2ProtocolGuid       = { 0x4006c0c1, 0xfcb3, 0x403e, {0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d }}\r
+  \r
   ## Include/Protocol/SimpleFileSystem.h\r
   gEfiSimpleFileSystemProtocolGuid = { 0x964E5B22, 0x6459, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}\r
   \r