/*++\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
/*++\r
\r
Routine Description:\r
- \r
+\r
Boot the legacy system with the boot option\r
\r
Arguments:\r
\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
\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
EFI_BLOCK_IO_PROTOCOL *BlkIo;\r
VOID *Buffer;\r
\r
+ //\r
+ // Record the performance data for End of BDS\r
+ //\r
+ PERF_END (0, BDS_TOK, NULL, 0);\r
+\r
*ExitDataSize = 0;\r
*ExitData = NULL;\r
\r
// Signal the EFI_EVENT_SIGNAL_READY_TO_BOOT event\r
//\r
EfiSignalEventReadyToBoot ();\r
- \r
+\r
//\r
// Set Boot Current\r
//\r
BlkIo->Media->BlockSize,\r
Buffer\r
);\r
- gBS->FreePool (Buffer);\r
+ FreePool (Buffer);\r
}\r
}\r
\r
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
\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
// 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
}\r
}\r
\r
- gBS->FreePool (BlockIoBuffer);\r
+ FreePool (BlockIoBuffer);\r
return Status;\r
}\r
\r
&BootOptionSize\r
);\r
if (NULL == BootOptionVar) {\r
- gBS->FreePool (BootOrder);\r
+ FreePool (BootOrder);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
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
BootOrder\r
);\r
\r
- gBS->FreePool (BootOrder);\r
+ FreePool (BootOrder);\r
\r
return Status;\r
}\r
&BootOptionSize\r
);\r
if (NULL == BootOptionVar) {\r
- gBS->FreePool (BootOrder);\r
+ FreePool (BootOrder);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
//\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
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
// 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
BootOrder[Index] = 0xffff;\r
}\r
\r
- gBS->FreePool (BootOptionVar);\r
+ FreePool (BootOptionVar);\r
Index++;\r
}\r
\r
BootOrder\r
);\r
\r
- gBS->FreePool (BootOrder);\r
+ FreePool (BootOrder);\r
\r
return Status;\r
}\r
}\r
\r
if (NumberFileSystemHandles) {\r
- gBS->FreePool (FileSystemHandles);\r
+ FreePool (FileSystemHandles);\r
}\r
//\r
// Parse Network Boot Device\r
}\r
\r
if (NumberLoadFileHandles) {\r
- gBS->FreePool (LoadFileHandles);\r
+ FreePool (LoadFileHandles);\r
}\r
//\r
// Check if we have on flash shell\r
}\r
\r
if (FvHandleCount) {\r
- gBS->FreePool (FvHandleBuffer);\r
+ FreePool (FvHandleBuffer);\r
}\r
//\r
// Make sure every boot only have one time\r
/*++\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
/*++\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
/*++\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