]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkNt32Pkg/Library/EdkGenericBdsLib/BdsBoot.c
Add PciBus Module
[mirror_edk2.git] / EdkNt32Pkg / Library / EdkGenericBdsLib / BdsBoot.c
index 0c744db224cba44eaa2ce6f8c5a11965b4108ac2..05c8e7d1e3de2ed879a5e7e00b1e5bd28e0b6c9c 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, 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
+Copyright (c) 2006 - 2007, 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
 Module Name:\r
 \r
@@ -30,7 +30,7 @@ BdsLibDoLegacyBoot (
 /*++\r
 \r
 Routine Description:\r
\r
+\r
   Boot the legacy system with the boot option\r
 \r
 Arguments:\r
@@ -41,7 +41,7 @@ Returns:
 \r
   EFI_UNSUPPORTED  - There is no legacybios protocol, do not support\r
                      legacy boot.\r
-                         \r
+\r
   EFI_STATUS       - Return the status of LegacyBios->LegacyBoot ().\r
 \r
 --*/\r
@@ -89,15 +89,15 @@ BdsLibBootViaBootOption (
 \r
 Routine Description:\r
 \r
-  Process the boot option follow the EFI 1.1 specification and \r
+  Process the boot option follow the EFI 1.1 specification and\r
   special treat the legacy boot option with BBS_DEVICE_PATH.\r
 \r
 Arguments:\r
 \r
   Option       - The boot option need to be processed\r
-  \r
-  DevicePath   - The device path which describe where to load \r
-                 the boot image or the legcy BBS device path \r
+\r
+  DevicePath   - The device path which describe where to load\r
+                 the boot image or the legcy BBS device path\r
                  to boot the legacy OS\r
 \r
   ExitDataSize - Returned directly from gBS->StartImage ()\r
@@ -167,7 +167,7 @@ Returns:
   // Signal the EFI_EVENT_SIGNAL_READY_TO_BOOT event\r
   //\r
   EfiSignalEventReadyToBoot ();\r
-  \r
+\r
   //\r
   // Set Boot Current\r
   //\r
@@ -240,7 +240,7 @@ Returns:
                      BlkIo->Media->BlockSize,\r
                      Buffer\r
                      );\r
-            gBS->FreePool (Buffer);\r
+            FreePool (Buffer);\r
           }\r
         }\r
 \r
@@ -324,8 +324,8 @@ BdsBootByDiskSignatureAndPartition (
 Routine Description:\r
 \r
   Check to see if a hard ware device path was passed in. If it was then search\r
-  all the block IO devices for the passed in hard drive device path. \r
-  \r
+  all the block IO devices for the passed in hard drive device path.\r
+\r
 Arguments:\r
 \r
   Option - The current processing boot option.\r
@@ -347,7 +347,7 @@ Returns:
 \r
   EFI_SUCCESS   - Status from gBS->StartImage (),\r
                   or BootByDiskSignatureAndPartition ()\r
-                  \r
+\r
   EFI_NOT_FOUND - If the Device Path is not found in the system\r
 \r
 --*/\r
@@ -406,7 +406,7 @@ Returns:
     // find HardDriver device path node\r
     //\r
     while (!IsDevicePathEnd (DevicePath)) {\r
-      if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) && \r
+      if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) &&\r
           (DevicePathSubType (DevicePath) == MEDIA_HARDDRIVE_DP)\r
           ) {\r
         BlockIoHdDevicePath = DevicePath;\r
@@ -460,7 +460,7 @@ Returns:
     }\r
   }\r
 \r
-  gBS->FreePool (BlockIoBuffer);\r
+  FreePool (BlockIoBuffer);\r
   return Status;\r
 }\r
 \r
@@ -532,7 +532,7 @@ Returns:
                       &BootOptionSize\r
                       );\r
     if (NULL == BootOptionVar) {\r
-      gBS->FreePool (BootOrder);\r
+      FreePool (BootOrder);\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
@@ -549,11 +549,11 @@ Returns:
     if ((OptionDevicePathSize == DevicePathSize) &&\r
         (CompareMem (DevicePath, OptionDevicePath, DevicePathSize) == 0)) {\r
       BdsDeleteBootOption (BootOrder[Index], BootOrder, &BootOrderSize);\r
-      gBS->FreePool (BootOptionVar);\r
+      FreePool (BootOptionVar);\r
       break;\r
     }\r
 \r
-    gBS->FreePool (BootOptionVar);\r
+    FreePool (BootOptionVar);\r
     Index++;\r
   }\r
 \r
@@ -565,7 +565,7 @@ Returns:
                   BootOrder\r
                   );\r
 \r
-  gBS->FreePool (BootOrder);\r
+  FreePool (BootOrder);\r
 \r
   return Status;\r
 }\r
@@ -636,7 +636,7 @@ Returns:
                       &BootOptionSize\r
                       );\r
     if (NULL == BootOptionVar) {\r
-      gBS->FreePool (BootOrder);\r
+      FreePool (BootOrder);\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
@@ -652,7 +652,7 @@ Returns:
     //\r
     if ((DevicePathType (OptionDevicePath) == BBS_DEVICE_PATH) &&\r
         (DevicePathSubType (OptionDevicePath) == BBS_BBS_DP)) {\r
-      gBS->FreePool (BootOptionVar);\r
+      FreePool (BootOptionVar);\r
       Index++;\r
       continue;\r
     }\r
@@ -664,7 +664,7 @@ Returns:
       TempDevicePath = EfiNextDevicePathNode (TempDevicePath);\r
     }\r
     //\r
-    // Skip the boot option that point to a file, since the device path in \r
+    // Skip the boot option that point to a file, since the device path in\r
     // removable media boot option doesn't contains a file name.\r
     //\r
     if (((DevicePathType (LastDeviceNode) == MEDIA_DEVICE_PATH) &&\r
@@ -673,7 +673,7 @@ Returns:
         // Skip boot option for internal Shell, it's always valid\r
         //\r
         (EfiGetNameGuidFromFwVolDevicePathNode ((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) LastDeviceNode) != NULL)) {\r
-      gBS->FreePool (BootOptionVar);\r
+      FreePool (BootOptionVar);\r
       Index++;\r
       continue;\r
     }\r
@@ -721,7 +721,7 @@ Returns:
       BootOrder[Index] = 0xffff;\r
     }\r
 \r
-    gBS->FreePool (BootOptionVar);\r
+    FreePool (BootOptionVar);\r
     Index++;\r
   }\r
 \r
@@ -743,7 +743,7 @@ Returns:
                   BootOrder\r
                   );\r
 \r
-  gBS->FreePool (BootOrder);\r
+  FreePool (BootOrder);\r
 \r
   return Status;\r
 }\r
@@ -877,7 +877,7 @@ Returns:
   }\r
 \r
   if (NumberFileSystemHandles) {\r
-    gBS->FreePool (FileSystemHandles);\r
+    FreePool (FileSystemHandles);\r
   }\r
   //\r
   // Parse Network Boot Device\r
@@ -904,7 +904,7 @@ Returns:
   }\r
 \r
   if (NumberLoadFileHandles) {\r
-    gBS->FreePool (LoadFileHandles);\r
+    FreePool (LoadFileHandles);\r
   }\r
   //\r
   // Check if we have on flash shell\r
@@ -946,7 +946,7 @@ Returns:
   }\r
 \r
   if (FvHandleCount) {\r
-    gBS->FreePool (FvHandleBuffer);\r
+   FreePool (FvHandleBuffer);\r
   }\r
   //\r
   // Make sure every boot only have one time\r
@@ -966,13 +966,13 @@ BdsLibBuildOptionFromHandle (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Build the boot option with the handle parsed in\r
-  \r
+\r
 Arguments:\r
 \r
   Handle - The handle which present the device path to create boot option\r
-  \r
+\r
   BdsBootOptionList - The header of the link list which indexed all current\r
                       boot options\r
 \r
@@ -1002,14 +1002,14 @@ BdsLibBuildOptionFromShell (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Build the on flash shell boot option with the handle parsed in\r
-  \r
+\r
 Arguments:\r
 \r
   Handle - The handle which present the device path to create on flash shell\r
            boot option\r
-  \r
+\r
   BdsBootOptionList - The header of the link list which indexed all current\r
                       boot options\r
 \r
@@ -1044,13 +1044,13 @@ BdsLibBootNext (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   Boot from the EFI1.1 spec defined "BootNext" variable\r
-  \r
+\r
 Arguments:\r
 \r
   None\r
-  \r
+\r
 Returns:\r
 \r
   None\r