[BOOTVID] Diverse enhancements.

- Import cmdcnst.h and vga.h headers from the 'vga_new' VGA Miniport Driver,
  that contain definitions related to VGA registers as well as command-stream
  functionality.

- Replace a bunch of hardcoded values by their corresponding defintions.

- Replace "Captain-Obvious" comments in VgaIsPresent() with actual
  explanations from the corresponding function in 'vga_new'.

- Simplify the VgaInterpretCmdStream() function, based on the
  corresponding one from 'vga_new'.

- Use concise comments in the 'AT_Initialization' command stream definition.

- Import the 'VGA_640x480' initialization command stream from 'vga_new'
  and use it as the full VGA initialization stream whenever the HAL
  does not handle the VGA display (HalResetDisplay() returning FALSE).
  Otherwise we just use the 'AT_Initialization' command stream that
  performs minimal initialization.

- Remove unused AT_Initialization and other declarations from ARM build.
This commit is contained in:
Hermès Bélusca-Maïto 2019-06-23 21:05:28 +02:00
parent a75e4db855
commit ede3fddad7
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
7 changed files with 684 additions and 343 deletions

View file

@ -1,7 +1,6 @@
#ifndef _BOOTVID_PCH_
#define _BOOTVID_PCH_
#include <ntddk.h>
#include <ntifs.h>
#include <ndk/halfuncs.h>
#include <drivers/bootvid/bootvid.h>
@ -11,11 +10,9 @@
#define BOOTCHAR_HEIGHT 13
/* Command Stream Definitions */
#define CMD_STREAM_WRITE 0x0
#define CMD_STREAM_WRITE_ARRAY 0x2
#define CMD_STREAM_USHORT 0x4
#define CMD_STREAM_READ 0x8
#ifndef _M_ARM
#include "vga.h"
#endif /* _M_ARM */
/* Bitmap Header */
typedef struct tagBITMAPINFOHEADER
@ -42,11 +39,14 @@ NTAPI
InitializePalette(VOID);
/* Globals */
#ifndef _M_ARM
extern ULONG curr_x;
extern ULONG curr_y;
extern ULONG_PTR VgaRegisterBase;
extern ULONG_PTR VgaBase;
extern USHORT AT_Initialization[];
extern USHORT VGA_640x480[];
#endif /* _M_ARM */
extern UCHAR FontData[256 * BOOTCHAR_HEIGHT];
#define __inpb(Port) \