IpfBootSupport.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Assign drive number to legacy HDD drives prior to booting an EFI aware OS so the OS can access drives without an EFI driver. Note: BBS compliant drives ARE NOT available until this call by @param This Protocol instance pointer. @param BbsCount Number of BBS_TABLE structures @param BbsTable List BBS entries @retval EFI_SUCCESS Drive numbers assigned To boot from an unconventional device like parties and/or execute @param This Protocol instance pointer. @param Attributes How to interpret the other input parameters @param BbsEntry The 0-based index into the BbsTable for the @param BeerData Pointer to the 128 bytes of ram BEER data. @param ServiceAreaData Pointer to the 64 bytes of raw Service Area data. The caller must provide a pointer to the specific Service Area and not the start all Service Areas. EFI_INVALID_PARAMETER if error. Does NOT return if no error. Attempt to legacy boot the BootOption. If the EFI contexted has been compromised this function will not return. @param This Protocol instance pointer. @param BbsDevicePath EFI Device Path from BootXXXX variable. @param LoadOptionsSize Size of LoadOption in size. @param LoadOptions LoadOption from BootXXXX variable @retval EFI_SUCCESS Removable media not present @param Private Legacy BIOS Instance data @param Size Size of E820 Table @retval EFI_SUCCESS It should always work. @param This Protocol instance pointer. @param HddCount Number of HDD_INFO structures @param HddInfo Onboard IDE controller information @param BbsCount Number of BBS_TABLE structures @param BbsTable List BBS entries @retval EFI_SUCCESS Tables returned @retval EFI_NOT_FOUND resource not found @retval EFI_DEVICE_ERROR can not get BBS table Fill in the standard BDA for Keyboard LEDs @param This Protocol instance pointer. @param Leds Current LED status @retval EFI_SUCCESS It should always work. Relocate this image under 4G memory for IPF. @param ImageHandle Handle of driver image. @param SystemTable Pointer to system table. @retval EFI_SUCCESS Image successfully relocated. @retval EFI_ABORTED Failed to relocate image. // Allocate buffer below 4GB here // Get information about the image being loaded // Align buffer on section boundry // Load the image to our new buffer // Relocate the image in our new buffer // Create a new handle with gEfiCallerIdGuid to be used as the ImageHandle fore the reloaded image // Flush the instruction cache so the image data is written before we execute it // return error directly the BS will unload this image