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.

191 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. bootefi.h
  5. Abstract:
  6. Contains definitions and prototypes specific to EFI based os loaders.
  7. Author:
  8. Andrew Ritz (andrewr) 21-Nov-2000
  9. Revision History:
  10. --*/
  11. #ifndef _BOOTEFI_
  12. #define _BOOTEFI_
  13. #include "efi.h"
  14. //
  15. // these are ARC constants, used for mapping ARC attributes to EFI
  16. // attributes
  17. //
  18. #define ATT_FG_BLACK 0
  19. #define ATT_FG_RED 1
  20. #define ATT_FG_GREEN 2
  21. #define ATT_FG_YELLOW 3
  22. #define ATT_FG_BLUE 4
  23. #define ATT_FG_MAGENTA 5
  24. #define ATT_FG_CYAN 6
  25. #define ATT_FG_WHITE 7
  26. #define ATT_BG_BLACK (ATT_FG_BLACK << 4)
  27. #define ATT_BG_BLUE (ATT_FG_BLUE << 4)
  28. #define ATT_BG_GREEN (ATT_FG_GREEN << 4)
  29. #define ATT_BG_CYAN (ATT_FG_CYAN << 4)
  30. #define ATT_BG_RED (ATT_FG_RED << 4)
  31. #define ATT_BG_MAGENTA (ATT_FG_MAGENTA << 4)
  32. #define ATT_BG_YELLOW (ATT_FG_YELLOW << 4)
  33. #define ATT_BG_WHITE (ATT_FG_WHITE << 4)
  34. #define ATT_FG_INTENSE 8
  35. #define ATT_BG_INTENSE (ATT_FG_INTENSE << 4)
  36. #define DEFIATT (ATT_FG_WHITE | ATT_BG_BLUE | ATT_FG_INTENSE)
  37. // intense red on blue doesn't show up on all monitors.
  38. //#define DEFERRATT (ATT_FG_RED | ATT_BG_BLUE | ATT_FG_INTENSE)
  39. #define DEFERRATT DEFATT
  40. #define DEFSTATTR (ATT_FG_BLACK | ATT_BG_WHITE)
  41. #define DEFDLGATT (ATT_FG_RED | ATT_BG_WHITE)
  42. //
  43. // EFI utility prototypes
  44. //
  45. VOID
  46. FlipToPhysical();
  47. VOID
  48. FlipToVirtual();
  49. BOOLEAN
  50. IsPsrDtOn();
  51. //
  52. // display related prototypes
  53. //
  54. BOOLEAN
  55. BlEfiClearDisplay(
  56. VOID
  57. );
  58. BOOLEAN
  59. BlEfiClearToEndOfDisplay(
  60. VOID
  61. );
  62. BOOLEAN
  63. BlEfiClearToEndOfLine(
  64. VOID
  65. );
  66. ULONG
  67. BlEfiGetColumnsPerLine(
  68. VOID
  69. );
  70. ULONG
  71. BlEfiGetLinesPerRow(
  72. VOID
  73. );
  74. BOOLEAN
  75. BlEfiGetCursorPosition(
  76. OUT PULONG x, OPTIONAL
  77. OUT PULONG y OPTIONAL
  78. );
  79. BOOLEAN
  80. BlEfiPositionCursor(
  81. IN ULONG Column,
  82. IN ULONG Row
  83. );
  84. BOOLEAN
  85. BlEfiEnableCursor(
  86. BOOLEAN bVisible
  87. );
  88. BOOLEAN
  89. BlEfiSetAttribute(
  90. ULONG Attribute
  91. );
  92. BOOLEAN
  93. BlEfiSetInverseMode(
  94. BOOLEAN fInverseOn
  95. );
  96. USHORT
  97. BlEfiGetGraphicsChar(
  98. IN GraphicsChar WhichOne
  99. );
  100. VOID
  101. DBG_EFI_PAUSE(
  102. VOID
  103. );
  104. VOID
  105. EFITRACE( PTCHAR p, ... );
  106. UINT16
  107. __cdecl
  108. wsprintf(
  109. CHAR16 *buf,
  110. const CHAR16 *fmt,
  111. ...);
  112. extern WCHAR DebugBuffer[512];
  113. CHAR16*
  114. DevicePathToStr(
  115. EFI_DEVICE_PATH UNALIGNED *DevPath
  116. );
  117. VOID
  118. DisableEFIWatchDog(
  119. VOID
  120. );
  121. #define EFI_WATCHDOG_TIMEOUT 60 * 20
  122. VOID
  123. SetEFIWatchDog(
  124. ULONG Timeout
  125. );
  126. ARC_STATUS
  127. BlGetEfiProtocolHandles(
  128. IN EFI_GUID *ProtocolType,
  129. OUT EFI_HANDLE **pHandleArray,
  130. OUT ULONG *NumberOfDevices
  131. );
  132. ARC_STATUS
  133. BlLoadEFIImage(
  134. IN PCCHAR PartitionArcName,
  135. IN PCCHAR ImagePath,
  136. IN PCCHAR ImageName OPTIONAL,
  137. IN BOOLEAN StartImage,
  138. OUT EFI_HANDLE* EfiHandle OPTIONAL
  139. );
  140. VOID
  141. SetupSMBiosInLoaderBlock(
  142. VOID
  143. );
  144. #endif // _BOOTEFI_