]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
MdeModulePkg/UefiBootManagerLib: Expose *GetLoadOptionBuffer() API
[mirror_edk2.git] / MdeModulePkg / Library / UefiBootManagerLib / InternalBm.h
index b261d769d24eb9baab5a96135db39c185ca1aaeb..e1c5a96947178023eb59bfc3cd480a11fc65bfe2 100644 (file)
@@ -43,6 +43,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/DriverHealth.h>\r
 #include <Protocol/FormBrowser2.h>\r
 #include <Protocol/VariableLock.h>\r
+#include <Protocol/RamDisk.h>\r
 \r
 #include <Guid/ZeroGuid.h>\r
 #include <Guid/MemoryTypeInformation.h>\r
@@ -201,14 +202,18 @@ BmWriteBootToOsPerformanceData (
   This routine adjust the memory information for different memory type and \r
   save them into the variables for next boot. It resets the system when\r
   memory information is updated and the current boot option belongs to\r
-  boot category instead of application category.\r
+  boot category instead of application category. It doesn't count the\r
+  reserved memory occupied by RAM Disk.\r
 \r
-  @param Boot  TRUE if current boot option belongs to boot category instead of\r
-               application category.\r
+  @param Boot               TRUE if current boot option belongs to boot\r
+                            category instead of application category.\r
+  @param RamDiskSizeInPages Reserved memory size in pages occupied by\r
+                            RAM Disk.\r
 **/\r
 VOID\r
 BmSetMemoryTypeInformationVariable (\r
-  IN BOOLEAN                    Boot\r
+  IN BOOLEAN                    Boot,\r
+  IN UINTN                      RamDiskSizeInPages\r
   );\r
 \r
 /**\r
@@ -305,25 +310,6 @@ BmSetVariableAndReportStatusCodeOnError (
   IN VOID       *Data\r
   );\r
 \r
-/**\r
-  Get the load option by its device path.\r
-\r
-  @param FilePath  The device path pointing to a load option.\r
-                   It could be a short-form device path.\r
-  @param FullPath  Return the full device path of the load option after\r
-                   short-form device path expanding.\r
-                   Caller is responsible to free it.\r
-  @param FileSize  Return the load option size.\r
-\r
-  @return The load option buffer. Caller is responsible to free the memory.\r
-**/\r
-VOID *\r
-BmGetLoadOptionBuffer (\r
-  IN  EFI_DEVICE_PATH_PROTOCOL          *FilePath,\r
-  OUT EFI_DEVICE_PATH_PROTOCOL          **FullPath,\r
-  OUT UINTN                             *FileSize\r
-  );\r
-\r
 /**\r
   Return whether the PE header of the load option is valid or not.\r
 \r
@@ -410,23 +396,6 @@ BmCharToUint (
   IN CHAR16                           Char\r
   );\r
 \r
-\r
-/**\r
-  Get the file buffer from the file system produced by Load File instance.\r
-\r
-  @param LoadFileHandle The handle of LoadFile instance.\r
-  @param FullPath       Return the full device path pointing to the load option.\r
-  @param FileSize       Return the size of the load option.\r
-\r
-  @return  The load option buffer.\r
-**/\r
-VOID *\r
-BmGetFileBufferFromLoadFileFileSystem (\r
-  IN  EFI_HANDLE                      LoadFileHandle,\r
-  OUT EFI_DEVICE_PATH_PROTOCOL        **FullPath,\r
-  OUT UINTN                           *FileSize\r
-  );\r
-\r
 /**\r
   Return the boot description for the controller.\r
 \r
@@ -451,4 +420,22 @@ BmMakeBootOptionDescriptionUnique (
   EFI_BOOT_MANAGER_LOAD_OPTION         *BootOptions,\r
   UINTN                                BootOptionCount\r
   );\r
+\r
+/**\r
+  Get the file buffer from the specified Load File instance.\r
+\r
+  @param LoadFileHandle The specified Load File instance.\r
+  @param FilePath       The file path which will pass to LoadFile().\r
+  @param FullPath       Return the full device path pointing to the load option.\r
+  @param FileSize       Return the size of the load option.\r
+\r
+  @return  The load option buffer or NULL if fails.\r
+**/\r
+VOID *\r
+BmGetFileBufferFromLoadFile (\r
+  EFI_HANDLE                          LoadFileHandle,\r
+  IN  EFI_DEVICE_PATH_PROTOCOL        *FilePath,\r
+  OUT EFI_DEVICE_PATH_PROTOCOL        **FullPath,\r
+  OUT UINTN                           *FileSize\r
+  );\r
 #endif // _INTERNAL_BM_H_\r