Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1999 Intel Corporation
  3. Module Name:
  4. legacyboot
  5. Abstract:
  6. EFI support for legacy boot
  7. Revision History
  8. --*/
  9. #ifndef _LEGACY_BOOT_INCLUDE_
  10. #define _LEGACY_BOOT_INCLUDE_
  11. #define LEGACY_BOOT_PROTOCOL \
  12. { 0x376e5eb2, 0x30e4, 0x11d3, { 0xba, 0xe5, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
  13. #pragma pack(1)
  14. /*
  15. * BBS 1.01 (See Appendix A) IPL and BCV Table Entry Data structure.
  16. * Seg:Off pointers have been converted to EFI pointers in this data structure
  17. * This is the structure that also maps to the EFI device path for the boot selection
  18. */
  19. typedef struct {
  20. UINT16 DeviceType;
  21. UINT16 StatusFlag;
  22. UINT32 Reserved;
  23. VOID *BootHandler; /* Not an EFI entry point */
  24. CHAR8 *DescString;
  25. } BBS_TABLE_ENTRY;
  26. #pragma pack()
  27. typedef
  28. EFI_STATUS
  29. (EFIAPI *LEGACY_BOOT_CALL) (
  30. IN EFI_DEVICE_PATH *DevicePath
  31. );
  32. /*
  33. * BBS support functions
  34. * PnP Call numbers and BiosSelector hidden in implementation
  35. */
  36. typedef enum {
  37. IplRelative,
  38. BcvRelative
  39. } BBS_TYPE;
  40. /*
  41. * == PnP Function 0x60 then BbsVersion == 0x0101 if this call fails then BbsVersion == 0x0000
  42. */
  43. /*
  44. * == PnP Function 0x61
  45. */
  46. typedef
  47. EFI_STATUS
  48. (EFIAPI *GET_DEVICE_COUNT) (
  49. IN struct _LEGACY_BOOT_INTERFACE *This,
  50. IN BBS_TYPE *TableType,
  51. OUT UINTN *DeviceCount,
  52. OUT UINTN *MaxCount
  53. );
  54. /*
  55. * == PnP Function 0x62
  56. */
  57. typedef
  58. EFI_STATUS
  59. (EFIAPI *GET_PRIORITY_AND_TABLE) (
  60. IN struct _LEGACY_BOOT_INTERFACE *This,
  61. IN BBS_TYPE *TableType,
  62. IN OUT UINTN *PrioritySize, /* MaxCount * sizeof(UINT8) */
  63. OUT UINTN *Priority,
  64. IN OUT UINTN *TableSize, /* MaxCount * sizeof(BBS_TABLE_ENTRY) */
  65. OUT BBS_TABLE_ENTRY *TableEntrySize
  66. );
  67. /*
  68. * == PnP Function 0x63
  69. */
  70. typedef
  71. EFI_STATUS
  72. (EFIAPI *SET_PRIORITY) (
  73. IN struct _LEGACY_BOOT_INTERFACE *This,
  74. IN BBS_TYPE *TableType,
  75. IN OUT UINTN *PrioritySize,
  76. OUT UINTN *Priority
  77. );
  78. typedef struct _LEGACY_BOOT_INTERFACE {
  79. LEGACY_BOOT_CALL BootIt;
  80. /*
  81. * New functions to allow BBS booting to be configured from EFI
  82. */
  83. UINTN BbsVersion; /* Currently 0x0101 */
  84. GET_DEVICE_COUNT GetDeviceCount;
  85. GET_PRIORITY_AND_TABLE GetPriorityAndTable;
  86. SET_PRIORITY SetPriority;
  87. } LEGACY_BOOT_INTERFACE;
  88. EFI_STATUS
  89. PlInitializeLegacyBoot (
  90. VOID
  91. );
  92. #endif