X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=IntelFrameworkPkg%2FInclude%2FProtocol%2FLegacyBios.h;h=78e31bf6ca73b01c94fb6113e2628ae0867c07f9;hb=0e0eeecad42a9aaf17e304fdffabbeed0e8d3a44;hp=5875be265d0a42d401c8bead8b76bf0cbd899a96;hpb=4ebb0d9eb125fe6ba7d58fc547a32f514d8b9546;p=mirror_edk2.git diff --git a/IntelFrameworkPkg/Include/Protocol/LegacyBios.h b/IntelFrameworkPkg/Include/Protocol/LegacyBios.h index 5875be265d..78e31bf6ca 100644 --- a/IntelFrameworkPkg/Include/Protocol/LegacyBios.h +++ b/IntelFrameworkPkg/Include/Protocol/LegacyBios.h @@ -12,7 +12,7 @@ You most likely should not use this protocol! Find the EFI way to solve the problem to make your code portable - Copyright (c) 2007, Intel Corporation + Copyright (c) 2007 - 2009, Intel Corporation All rights reserved. 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 @@ -25,14 +25,14 @@ @par Revision Reference: This protocol is defined in Framework for EFI Compatibility Support Module spec - Version 0.96 + Version 0.97. **/ #ifndef _EFI_LEGACY_BIOS_H_ #define _EFI_LEGACY_BIOS_H_ -#include +#include #define EFI_LEGACY_BIOS_PROTOCOL_GUID \ { \ @@ -41,6 +41,14 @@ typedef struct _EFI_LEGACY_BIOS_PROTOCOL EFI_LEGACY_BIOS_PROTOCOL; +// +// Flags returned by CheckPciRom() +// +#define NO_ROM 0x00 +#define ROM_FOUND 0x01 +#define VALID_LEGACY_ROM 0x02 +#define ROM_WITH_CONFIG 0x04 // Not defined in CSM Specification0.96 + // /// @bug These macros appear in no specifications and are kept for backward // compatibility only. @@ -235,7 +243,10 @@ BOOLEAN @param PciHandle The PCI PC-AT OPROM from this devices ROM BAR will be loaded @param RomImage Return the legacy PCI ROM for this device @param RomSize Size of ROM Image - @param Flags Indicates if ROM found and if PC-AT. + @param Flags Indicates if ROM found and if PC-AT. Multiple bits can be set as follows: + 00 = No ROM + 01 = ROM Found + 02 = ROM is a valid legacy ROM @retval EFI_SUCCESS Legacy Option ROM availible for this device @retval EFI_UNSUPPORTED Legacy Option ROM not supported. @@ -264,7 +275,10 @@ EFI_STATUS no hardware associated with the ROM and thus no PciHandle, otherwise is must be NULL. Example is PXE base code. - @param Flags Return Status if ROM was found and if was Legacy OPROM. + @param Flags The type of ROM discovered. Multiple bits can be set, as follows: + 00 = No ROM. + 01 = ROM found. + 02 = ROM is a valid legacy ROM. @param DiskStart Disk number of first device hooked by the ROM. If DiskStart is the same as DiskEnd no disked were hooked. @param DiskEnd Disk number of the last device hooked by the ROM. @@ -289,15 +303,38 @@ EFI_STATUS ); /** - Attempt to legacy boot the BootOption. If the EFI contexted has been - compromised this function will not return. + This function attempts to traditionally boot the specified BootOption. If the EFI context has + been compromised, this function will not return. This procedure is not used for loading an EFIaware + OS off a traditional device. The following actions occur: + - Get EFI SMBIOS data structures, convert them to a traditional format, and copy to + Compatibility16. + - Get a pointer to ACPI data structures and copy the Compatibility16 RSD PTR to F0000 block. + - Find the traditional SMI handler from a firmware volume and register the traditional SMI + handler with the EFI SMI handler. + - Build onboard IDE information and pass this information to the Compatibility16 code. + - Make sure all PCI Interrupt Line registers are programmed to match 8259. + - Reconfigure SIO devices from EFI mode (polled) into traditional mode (interrupt driven). + - Shadow all PCI ROMs. + - Set up BDA and EBDA standard areas before the legacy boot. + - Construct the Compatibility16 boot memory map and pass it to the Compatibility16 code. + - Invoke the Compatibility16 table function Compatibility16PrepareToBoot(). This + invocation causes a thunk into the Compatibility16 code, which sets all appropriate internal + data structures. The boot device list is a parameter. + - Invoke the Compatibility16 Table function Compatibility16Boot(). This invocation + causes a thunk into the Compatibility16 code, which does an INT19. + - If the Compatibility16Boot() function returns, then the boot failed in a graceful + manner—i.e., EFI code is still valid. An ungraceful boot failure causes a reset because the state + of EFI code is unknown. @param This Protocol instance pointer. @param BootOption EFI Device Path from BootXXXX variable. @param LoadOptionSize Size of LoadOption in size. @param LoadOption LoadOption from BootXXXX variable - @retval EFI_SUCCESS Removable media not present + @retval EFI_DEVICE_ERROR Failed to boot from any boot device and memory is uncorrupted. + Note: This function normally never returns. It will either boot the + OS or reset the system if memory has been "corrupted" by loading + a boot sector and passing control to it. **/ typedef @@ -310,7 +347,11 @@ EFI_STATUS ); /** - Update BDA with current Scroll, Num & Cap lock LEDS + This function takes the Leds input parameter and sets/resets the BDA accordingly. + Leds is also passed to Compatibility16 code, in case any special processing is required. + This function is normally called from EFI Setup drivers that handle userselectable + keyboard options such as boot with NUM LOCK on/off. This function does not + touch the keyboard or keyboard LEDs but only the BDA. @param This Protocol instance pointer. @param Leds Status of current Scroll, Num & Cap lock LEDS @@ -318,7 +359,7 @@ EFI_STATUS Bit 1 is Num Lock Bit 2 is Caps Lock - @retval EFI_SUCCESS Removable media not present + @retval EFI_SUCCESS The BDA was updated successfully. **/ typedef @@ -335,7 +376,7 @@ EFI_STATUS @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 + @param BbsTable Point to List of BBS_TABLE @retval EFI_SUCCESS Tables returned @@ -382,7 +423,7 @@ EFI_STATUS 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. + @retval EFI_INVALID_PARAMETER if error. Does NOT return if no error. **/ typedef @@ -424,6 +465,7 @@ EFI_STATUS @param LegacyMemoryAddress Region Assigned @retval EFI_SUCCESS Region assigned + @retval EFI_ACCESS_DENIED The function was previously invoked. @retval Other Region not assigned **/ @@ -446,7 +488,7 @@ EFI_STATUS Note: must be in region assigned by LegacyBiosGetLegacyRegion @param LegacyMemorySourceAddress - Source of data + Source of the data to copy. @retval EFI_SUCCESS Region assigned @retval EFI_ACCESS_DENIED Destination outside assigned region @@ -462,62 +504,71 @@ EFI_STATUS ); /** - @par Protocol Description: Abstracts the traditional BIOS from the rest of EFI. The LegacyBoot() member function allows the BDS to support booting a traditional OS. EFI thunks drivers that make EFI bindings for BIOS INT services use all the other member functions. - - @param Int86 - Performs traditional software INT. See the Int86() function description. - - @param FarCall86 - Performs a far call into Compatibility16 or traditional OpROM code. - - @param CheckPciRom - Checks if a traditional OpROM exists for this device. - - @param InstallPciRom - Loads a traditional OpROM in traditional OpROM address space. - - @param LegacyBoot - Boots a traditional OS. - - @param UpdateKeyboardLedStatus - Updates BDA to reflect the current EFI keyboard LED status. - - @param GetBbsInfo - Allows an external agent, such as BIOS Setup, to get the BBS data. - - @param ShadowAllLegacyOproms - Causes all legacy OpROMs to be shadowed. - - @param PrepareToBootEfi - Performs all actions prior to boot. Used when booting an EFI-aware OS - rather than a legacy OS. - - @param GetLegacyRegion - Allows EFI to reserve an area in the 0xE0000 or 0xF0000 block. - - @param CopyLegacyRegion - Allows EFI to copy data to the area specified by GetLegacyRegion. - - @param BootUnconventionalDevice - Allows the user to boot off an unconventional device such as a PARTIES partition. - **/ struct _EFI_LEGACY_BIOS_PROTOCOL { + /// + /// Performs traditional software INT. See the Int86() function description. + /// EFI_LEGACY_BIOS_INT86 Int86; + + /// + /// Performs a far call into Compatibility16 or traditional OpROM code. + /// EFI_LEGACY_BIOS_FARCALL86 FarCall86; + + /// + /// Checks if a traditional OpROM exists for this device. + /// EFI_LEGACY_BIOS_CHECK_ROM CheckPciRom; + + /// + /// Loads a traditional OpROM in traditional OpROM address space. + /// EFI_LEGACY_BIOS_INSTALL_ROM InstallPciRom; + + /// + /// Boots a traditional OS. + /// EFI_LEGACY_BIOS_BOOT LegacyBoot; + + /// + /// Updates BDA to reflect the current EFI keyboard LED status. + /// EFI_LEGACY_BIOS_UPDATE_KEYBOARD_LED_STATUS UpdateKeyboardLedStatus; + + /// + /// Allows an external agent, such as BIOS Setup, to get the BBS data. + /// EFI_LEGACY_BIOS_GET_BBS_INFO GetBbsInfo; + + /// + /// Causes all legacy OpROMs to be shadowed. + /// EFI_LEGACY_BIOS_SHADOW_ALL_LEGACY_OPROMS ShadowAllLegacyOproms; + + /// + /// Performs all actions prior to boot. Used when booting an EFI-aware OS + /// rather than a legacy OS. + /// EFI_LEGACY_BIOS_PREPARE_TO_BOOT_EFI PrepareToBootEfi; + + /// + /// Allows EFI to reserve an area in the 0xE0000 or 0xF0000 block. + /// EFI_LEGACY_BIOS_GET_LEGACY_REGION GetLegacyRegion; + + /// + /// Allows EFI to copy data to the area specified by GetLegacyRegion. + /// EFI_LEGACY_BIOS_COPY_LEGACY_REGION CopyLegacyRegion; + + /// + /// Allows the user to boot off an unconventional device such as a PARTIES partition. + /// EFI_LEGACY_BIOS_BOOT_UNCONVENTIONAL_DEVICE BootUnconventionalDevice; };