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