Author: ion
Date: Mon Sep 7 19:46:50 2015
New Revision: 69100
URL:
http://svn.reactos.org/svn/reactos?rev=69100&view=rev
Log:
[BOOTMGFW]
- Forgot that SVN doesn't traverse up.
Modified:
trunk/reactos/boot/environ/CMakeLists.txt
trunk/reactos/boot/environ/include/bl.h
Modified: trunk/reactos/boot/environ/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/CMakeLists.tx…
==============================================================================
--- trunk/reactos/boot/environ/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/CMakeLists.txt [iso-8859-1] Mon Sep 7 19:46:50 2015
@@ -23,7 +23,14 @@
lib/io/device.c
lib/io/file.c
lib/io/fat.c
- lib/platform/display.c)
+ lib/io/display/display.c
+ lib/io/display/emscons.c
+ lib/io/display/guicons.c
+ lib/io/display/textcons.c
+ lib/io/display/efi/textcons.c
+ lib/io/display/efi/guicons.c
+ lib/io/display/efi/gop.c
+ lib/io/display/efi/uga.c)
if(ARCH STREQUAL "i386")
list(APPEND BOOTLIB_ASM_SOURCE
Modified: trunk/reactos/boot/environ/include/bl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/bl.h?…
==============================================================================
--- trunk/reactos/boot/environ/include/bl.h [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/include/bl.h [iso-8859-1] Mon Sep 7 19:46:50 2015
@@ -75,11 +75,34 @@
#define BL_LIBRARY_FLAG_INITIALIZATION_COMPLETED 0x20
#define BL_LIBRARY_FLAG_NO_GRAPHICS_CONSOLE 0x800
+#define BL_DISPLAY_GRAPHICS_FORCED_VIDEO_MODE_FLAG 0x01
+#define BL_DISPLAY_GRAPHICS_FORCED_HIGH_RES_MODE_FLAG 0x02
+
#define BL_FS_REGISTER_AT_HEAD_FLAG 1
#define BL_MEMORY_CLASS_SHIFT 28
/* ENUMERATIONS **************************************************************/
+
+typedef enum _BL_COLOR
+{
+ Black,
+ Blue,
+ Green,
+ Cyan,
+ Red,
+ Magenta,
+ Brown,
+ LtGray,
+ Gray,
+ LtBlue,
+ LtGreen,
+ LtCyan,
+ LtRed,
+ LtMagenta,
+ Yellow,
+ White
+} BL_COLOR, *PBL_COLOR;
typedef enum _BL_MEMORY_DESCRIPTOR_TYPE
{
@@ -259,6 +282,65 @@
NTSTATUS
(*PBL_FILE_DESTROY_CALLBACK) (
_In_ PVOID Entry
+ );
+
+struct _BL_TEXT_CONSOLE;
+struct _BL_DISPLAY_STATE;
+typedef
+NTSTATUS
+(*PCONSOLE_DESTRUCT) (
+ _In_ struct _BL_TEXT_CONSOLE* Console
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_REINITIALIZE) (
+ _In_ struct _BL_TEXT_CONSOLE* Console
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_GET_TEXT_STATE) (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _Out_ struct _BL_DISPLAY_STATE* TextState
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_SET_TEXT_STATE) (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ ULONG Flags,
+ _In_ struct _BL_DISPLAY_STATE* TextState
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_GET_TEXT_RESOLUTION) (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _Out_ PULONG TextResolution
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_SET_TEXT_RESOLUTION) (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ ULONG NewTextResolution,
+ _Out_ PULONG OldTextResolution
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_CLEAR_TEXT) (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ ULONG Attribute
+ );
+
+typedef
+NTSTATUS
+(*PCONSOLE_WRITE_TEXT) (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ PCHAR Text,
+ _In_ ULONG Attribute
);
/* DATA STRUCTURES ***********************************************************/
@@ -509,6 +591,81 @@
PBL_FS_PURGE_CALLBACK Purge;
} BL_FILE_SYSTEM_REGISTRATION_TABLE;
+typedef struct _BL_DISPLAY_STATE
+{
+ ULONG BgColor;
+ ULONG FgColor;
+ ULONG XPos;
+ ULONG YPos;
+ ULONG CursorVisible;
+} BL_DISPLAY_STATE, *PBL_DISPLAY_STATE;
+
+typedef struct _BL_DISPLAY_MODE
+{
+ ULONG HRes;
+ ULONG VRes;
+ ULONG HRes2;
+} BL_DISPLAY_MODE, *PBL_DISPLAY_MODE;
+
+typedef struct _BL_TEXT_CONSOLE_VTABLE
+{
+ PCONSOLE_DESTRUCT Destruct;
+ PCONSOLE_REINITIALIZE Reinitialize;
+ PCONSOLE_GET_TEXT_STATE GetTextState;
+ PCONSOLE_SET_TEXT_STATE SetTextState;
+ PCONSOLE_GET_TEXT_RESOLUTION GetTextResolution;
+ PCONSOLE_SET_TEXT_RESOLUTION SetTextResolution;
+ PCONSOLE_CLEAR_TEXT ClearText;
+ PCONSOLE_WRITE_TEXT WriteText;
+} BL_TEXT_CONSOLE_VTABLE, *PBL_TEXT_CONSOLE_VTABLE;
+
+typedef struct _BL_GRAPHICS_CONSOLE_VTABLE
+{
+ BL_TEXT_CONSOLE_VTABLE Text;
+ /// more for graphics ///
+} BL_GRAPHICS_CONSOLE_VTABLE, *PBL_GRAPHICS_CONSOLE_VTABLE;
+
+typedef struct _BL_TEXT_CONSOLE
+{
+ PBL_TEXT_CONSOLE_VTABLE Callbacks;
+ BL_DISPLAY_STATE State;
+ BL_DISPLAY_MODE DisplayMode;
+ BOOLEAN Active;
+ EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL* Protocol;
+ ULONG Mode;
+ EFI_SIMPLE_TEXT_OUTPUT_MODE OldMode;
+} BL_TEXT_CONSOLE, *PBL_TEXT_CONSOLE;
+
+typedef enum _BL_GRAPHICS_CONSOLE_TYPE
+{
+ BlGopConsole,
+ BlUgaConsole
+} BL_GRAPHICS_CONSOLE_TYPE;
+
+typedef struct _BL_GRAPHICS_CONSOLE
+{
+ BL_TEXT_CONSOLE TextConsole;
+ BL_DISPLAY_MODE DisplayMode;
+ ULONG PixelDepth;
+ ULONG FgColor;
+ ULONG BgColor;
+ BL_DISPLAY_MODE OldDisplayMode;
+ ULONG OldPixelDepth;
+ EFI_HANDLE Handle;
+ BL_GRAPHICS_CONSOLE_TYPE Type;
+ EFI_GRAPHICS_OUTPUT_PROTOCOL* Protocol;
+ PVOID FrameBuffer;
+ ULONG FrameBufferSize;
+ ULONG PixelsPerScanLine;
+ ULONG Mode;
+ ULONG OldMode;
+} BL_GRAPHICS_CONSOLE, *PBL_GRAPHICS_CONSOLE;
+
+typedef struct _BL_REMOTE_CONSOLE
+{
+ BL_TEXT_CONSOLE TextConsole;
+} BL_REMOTE_CONSOLE, *PBL_REMOTE_CONSOLE;
+
/* INLINE ROUTINES ***********************************************************/
FORCEINLINE
@@ -867,6 +1024,145 @@
BlDisplayGetTextCellResolution (
_Out_ PULONG TextWidth,
_Out_ PULONG TextHeight
+ );
+
+/* TExT CONSOLE ROUTINES *****************************************************/
+
+NTSTATUS
+ConsoleTextLocalDestruct (
+ _In_ struct _BL_TEXT_CONSOLE* Console
+ );
+
+NTSTATUS
+ConsoleTextLocalReinitialize (
+ _In_ struct _BL_TEXT_CONSOLE* Console
+ );
+
+NTSTATUS
+ConsoleTextBaseGetTextState (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _Out_ PBL_DISPLAY_STATE TextState
+ );
+
+NTSTATUS
+ConsoleTextLocalSetTextState (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ ULONG Flags,
+ _In_ PBL_DISPLAY_STATE TextState
+ );
+
+NTSTATUS
+ConsoleTextBaseGetTextResolution (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _Out_ PULONG TextResolution
+ );
+
+NTSTATUS
+ConsoleTextLocalSetTextResolution (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ ULONG NewTextResolution,
+ _Out_ PULONG OldTextResolution
+ );
+
+NTSTATUS
+ConsoleTextLocalClearText (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ ULONG Attribute
+ );
+
+NTSTATUS
+ConsoleTextLocalWriteText (
+ _In_ struct _BL_TEXT_CONSOLE* Console,
+ _In_ PCHAR Text,
+ _In_ ULONG Attribute
+ );
+
+NTSTATUS
+ConsoleTextLocalConstruct (
+ _In_ PBL_TEXT_CONSOLE TextConsole,
+ _In_ BOOLEAN Activate
+ );
+
+BOOLEAN
+ConsolepFindResolution (
+ _In_ PBL_DISPLAY_MODE Mode,
+ _In_ PBL_DISPLAY_MODE List,
+ _In_ ULONG MaxIndex
+ );
+
+VOID
+ConsoleFirmwareTextClose (
+ _In_ PBL_TEXT_CONSOLE TextConsole
+ );
+
+NTSTATUS
+ConsoleFirmwareTextOpen (
+ _In_ PBL_TEXT_CONSOLE TextConsole
+ );
+
+NTSTATUS
+ConsoleFirmwareTextSetState (
+ _In_ PBL_TEXT_CONSOLE TextConsole,
+ _In_ UCHAR Mask,
+ _In_ PBL_DISPLAY_STATE State
+ );
+
+NTSTATUS
+ConsoleGraphicalConstruct (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+NTSTATUS
+ConsoleCreateRemoteConsole (
+ _In_ PBL_TEXT_CONSOLE* TextConsole
+ );
+
+NTSTATUS
+ConsoleEfiGraphicalOpenProtocol (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole,
+ _In_ BL_GRAPHICS_CONSOLE_TYPE Type
+ );
+
+VOID
+ConsoleFirmwareGraphicalClose (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+NTSTATUS
+ConsoleFirmwareGraphicalEnable (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+NTSTATUS
+ConsoleEfiUgaOpen (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+VOID
+ConsoleEfiUgaClose (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+VOID
+ConsoleEfiGopClose (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+NTSTATUS
+ConsoleEfiGopOpen (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+NTSTATUS
+ConsoleEfiGopEnable (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
+ );
+
+NTSTATUS
+ConsoleEfiUgaSetResolution (
+ _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole,
+ _In_ PBL_DISPLAY_MODE DisplayMode,
+ _In_ ULONG DisplayModeCount
);
extern ULONG MmDescriptorCallTreeCount;
@@ -882,5 +1178,9 @@
extern EFI_GUID EfiLoadedImageProtocol;
extern EFI_GUID EfiDevicePathProtocol;
extern EFI_GUID EfiSimpleTextInputExProtocol;
-
+extern ULONG ConsoleGraphicalResolutionListFlags;
+extern BL_DISPLAY_MODE ConsoleGraphicalResolutionList[];
+extern BL_DISPLAY_MODE ConsoleTextResolutionList[];
+extern ULONG ConsoleGraphicalResolutionListSize;
+extern PVOID DspRemoteInputConsole;
#endif