Author: ion
Date: Sun Feb 5 22:17:07 2017
New Revision: 73720
URL:
http://svn.reactos.org/svn/reactos?rev=73720&view=rev
Log:
[BOOTMGR]: Fix more gcc warnings. Maybe we should stop building GCC with /Wall but MSVC
with /Wnothing?
[BOOTLIB]: Hack EfiPrintf temporarily so we can get print outs even in "Protected
mode".
[ROSLOAD]: Begin implementation. First, many bootlib fixes needed.
Modified:
trunk/reactos/boot/environ/app/bootmgr/bootmgr.c
trunk/reactos/boot/environ/app/rosload/rosload.c
trunk/reactos/boot/environ/lib/firmware/efi/firmware.c
trunk/reactos/boot/environ/lib/mm/mm.c
Modified: trunk/reactos/boot/environ/app/bootmgr/bootmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/app/bootmgr/b…
==============================================================================
--- trunk/reactos/boot/environ/app/bootmgr/bootmgr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/app/bootmgr/bootmgr.c [iso-8859-1] Sun Feb 5 22:17:07
2017
@@ -2901,7 +2901,6 @@
{
NTSTATUS Status;
PHYSICAL_ADDRESS PhysicalAddress, PhysicalAddress2;
- PBL_MEMORY_DESCRIPTOR Found;
/* Allocate 1 physical page */
PhysicalAddress.QuadPart = 0;
@@ -2913,7 +2912,7 @@
}
/* Write some data */
- *(PULONG)PhysicalAddress.QuadPart = 0x55555151;
+ *(PULONG)((ULONG_PTR)PhysicalAddress.QuadPart) = 0x55555151;
/* Free it */
Status = BlMmFreePhysicalPages(PhysicalAddress);
@@ -2940,9 +2939,9 @@
}
/* The data should still be there, since zero-ing is not on for bootmgr */
- if (*(PULONG)PhysicalAddress2.QuadPart != 0x55555151)
- {
- EfiPrintf(L"FAIL: Non-matching data: %lx %lx\r\n", 0x55555151,
*(PULONG)PhysicalAddress2.QuadPart);
+ if (*(PULONG)((ULONG_PTR)PhysicalAddress2.QuadPart) != 0x55555151)
+ {
+ EfiPrintf(L"FAIL: Non-matching data: %lx %lx\r\n", 0x55555151,
*(PULONG)((ULONG_PTR)PhysicalAddress2.QuadPart));
EfiStall(100000000);
}
Modified: trunk/reactos/boot/environ/app/rosload/rosload.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/app/rosload/r…
==============================================================================
--- trunk/reactos/boot/environ/app/rosload/rosload.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/app/rosload/rosload.c [iso-8859-1] Sun Feb 5 22:17:07
2017
@@ -47,8 +47,7 @@
LibraryParameters.DescriptorCount = 512;
Status = BlInitializeLibrary(BootParameters, &LibraryParameters);
- //EfiPrintf(L"ReactOS UEFI OS Loader Initializing...\r\n");
- EfiConOut->OutputString(EfiConOut, L"ReactOS UEFI OS Loader
Initializing...\r\n");
+ EfiPrintf(L"ReactOS UEFI OS Loader Initializing...\r\n");
return Status;
}
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] Sun Feb 5
22:17:07 2017
@@ -144,6 +144,11 @@
else
{
/* FIXME: @TODO: Not yet supported */
+ // FIXME: Hack while we are in early rosload mode
+ if (EfiConOut != NULL)
+ {
+ EfiConOut->OutputString(EfiConOut, BlScratchBuffer);
+ }
}
/* All done */
Modified: trunk/reactos/boot/environ/lib/mm/mm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/mm.c?r…
==============================================================================
--- trunk/reactos/boot/environ/lib/mm/mm.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/mm/mm.c [iso-8859-1] Sun Feb 5 22:17:07 2017
@@ -349,6 +349,7 @@
LibraryParameters->MinimumAllocationCount);
if (!NT_SUCCESS(Status))
{
+ EfiPrintf(L"PA Mm init failed: %lx\r\n", Status);
goto Quickie;
}
@@ -356,6 +357,7 @@
Status = MmTrInitialize();
if (!NT_SUCCESS(Status))
{
+ EfiPrintf(L"TR Mm init failed: %lx\r\n", Status);
//MmArchDestroy();
//MmPaDestroy(1);
goto Quickie;
@@ -380,6 +382,7 @@
if (!NT_SUCCESS(Status))
{
/* Kill everything set setup so far */
+ EfiPrintf(L"Phase 1 Mm init failed: %lx\r\n", Status);
//MmPaDestroy(0);
//MmTrDestroy();
//MmArchDestroy();
@@ -415,6 +418,7 @@
if (!NT_SUCCESS(Status))
{
/* Go back to static descriptors and kill the heap */
+ EfiPrintf(L"Phase 2 Mm init failed: %lx\r\n", Status);
//MmMdpSwitchToStaticDescriptors();
//HapInitializationStatus = 0;
//++MmDescriptorCallTreeCount;