Author: ion
Date: Mon Sep 7 18:09:12 2015
New Revision: 69095
URL:
http://svn.reactos.org/svn/reactos?rev=69095&view=rev
Log:
[BOOTMGFW]
- Fix GOP bugs
Modified:
trunk/reactos/boot/environ/lib/firmware/efi/firmware.c
trunk/reactos/boot/environ/lib/platform/display.c
Modified: trunk/reactos/boot/environ/lib/firmware/efi/firmware.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/firmware/…
==============================================================================
--- trunk/reactos/boot/environ/lib/firmware/efi/firmware.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/firmware/efi/firmware.c [iso-8859-1] Mon Sep 7
18:09:12 2015
@@ -536,7 +536,7 @@
/* Make the EFI call */
*Mode = GopInterface->Mode->Mode;
- RtlCopyMemory(Information, GopInterface->Mode, sizeof(*Information));
+ RtlCopyMemory(Information, GopInterface->Mode->Info, sizeof(*Information));
/* Switch back to protected mode if we came from there */
if (OldMode != BlRealMode)
Modified: trunk/reactos/boot/environ/lib/platform/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/platform/…
==============================================================================
--- trunk/reactos/boot/environ/lib/platform/display.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/platform/display.c [iso-8859-1] Mon Sep 7 18:09:12
2015
@@ -908,6 +908,7 @@
(PVOID*)&GopProtocol);
if (!NT_SUCCESS(Status))
{
+ EarlyPrint(L"GOP OPEN failed: %lx\n", Status);
return STATUS_NOT_SUPPORTED;
}
@@ -915,6 +916,7 @@
Status = EfiGopGetCurrentMode(GopProtocol, &CurrentMode, &ModeInformation);
if (!NT_SUCCESS(Status))
{
+ EarlyPrint(L"GOP mode failed: %lx\n", Status);
goto Quickie;
}
@@ -967,6 +969,7 @@
Quickie:
/* We failed, close the protocol and return the failure code */
+ EarlyPrint(L"Get format failed: %lx\n", Status);
EfiCloseProtocol(GraphicsConsole->Handle, &EfiGraphicsOutputProtocol);
return Status;
}
@@ -995,18 +998,18 @@
if (!NT_SUCCESS(Status))
{
/* Nothing supports this (no video card?) */
+ EarlyPrint(L"Status: %lx Count: %d\n", Status, HandleCount);
return STATUS_UNSUCCESSFUL;
}
/* Scan through the handles we received */
- for (HandleIndex = 0; HandleCount < HandleIndex; HandleIndex++)
+ for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex++)
{
/* Try to open each one */
GraphicsConsole->Handle = HandleArray[HandleIndex];
Handle = HandleArray[HandleIndex];
- if (NT_SUCCESS(EfiOpenProtocol(Handle,
- &EfiDevicePathProtocol,
- &Interface)))
+ Status = EfiOpenProtocol(Handle, &EfiDevicePathProtocol, &Interface);
+ if (NT_SUCCESS(Status))
{
/* Test worked, close the protocol */
EfiCloseProtocol(Handle, &EfiDevicePathProtocol);
@@ -1299,6 +1302,7 @@
Status = ConsoleTextLocalConstruct(&GraphicsConsole->TextConsole, FALSE);
if (!NT_SUCCESS(Status))
{
+ EarlyPrint(L"Text failed: %lx\n", Status);
return Status;
}
@@ -1310,10 +1314,12 @@
if (!NT_SUCCESS(Status))
{
/* That failed, try an older EFI 1.02 UGA console */
+ EarlyPrint(L"GOP open failed!\n", Status);
Status = ConsoleEfiGraphicalOpenProtocol(GraphicsConsole, BlUgaConsole);
if (!NT_SUCCESS(Status))
{
/* That failed too, give up */
+ EarlyPrint(L"UGA failed!\n", Status);
ConsoleTextLocalDestruct(&GraphicsConsole->TextConsole);
return STATUS_UNSUCCESSFUL;
}
@@ -1324,6 +1330,7 @@
if (!NT_SUCCESS(Status))
{
/* Failed to enable it, undo everything */
+ EarlyPrint(L"Enable failed\n");
ConsoleFirmwareGraphicalClose(GraphicsConsole);
ConsoleTextLocalDestruct(&GraphicsConsole->TextConsole);
return STATUS_UNSUCCESSFUL;
@@ -1426,6 +1433,7 @@
{
/* Construct it */
Status = ConsoleGraphicalConstruct(GraphicsConsole);
+ EarlyPrint(L"GFX FAILED: %lx\n", Status);
if (!NT_SUCCESS(Status))
{
BlMmFreeHeap(GraphicsConsole);