[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.

svn path=/trunk/; revision=73720
This commit is contained in:
Alex Ionescu 2017-02-05 22:17:07 +00:00
parent 968d02e55c
commit 0348b64178
4 changed files with 13 additions and 6 deletions

View file

@ -2901,7 +2901,6 @@ BmMain (
{ {
NTSTATUS Status; NTSTATUS Status;
PHYSICAL_ADDRESS PhysicalAddress, PhysicalAddress2; PHYSICAL_ADDRESS PhysicalAddress, PhysicalAddress2;
PBL_MEMORY_DESCRIPTOR Found;
/* Allocate 1 physical page */ /* Allocate 1 physical page */
PhysicalAddress.QuadPart = 0; PhysicalAddress.QuadPart = 0;
@ -2913,7 +2912,7 @@ BmMain (
} }
/* Write some data */ /* Write some data */
*(PULONG)PhysicalAddress.QuadPart = 0x55555151; *(PULONG)((ULONG_PTR)PhysicalAddress.QuadPart) = 0x55555151;
/* Free it */ /* Free it */
Status = BlMmFreePhysicalPages(PhysicalAddress); Status = BlMmFreePhysicalPages(PhysicalAddress);
@ -2940,9 +2939,9 @@ BmMain (
} }
/* The data should still be there, since zero-ing is not on for bootmgr */ /* The data should still be there, since zero-ing is not on for bootmgr */
if (*(PULONG)PhysicalAddress2.QuadPart != 0x55555151) if (*(PULONG)((ULONG_PTR)PhysicalAddress2.QuadPart) != 0x55555151)
{ {
EfiPrintf(L"FAIL: Non-matching data: %lx %lx\r\n", 0x55555151, *(PULONG)PhysicalAddress2.QuadPart); EfiPrintf(L"FAIL: Non-matching data: %lx %lx\r\n", 0x55555151, *(PULONG)((ULONG_PTR)PhysicalAddress2.QuadPart));
EfiStall(100000000); EfiStall(100000000);
} }

View file

@ -47,8 +47,7 @@ OslMain (
LibraryParameters.DescriptorCount = 512; LibraryParameters.DescriptorCount = 512;
Status = BlInitializeLibrary(BootParameters, &LibraryParameters); Status = BlInitializeLibrary(BootParameters, &LibraryParameters);
//EfiPrintf(L"ReactOS UEFI OS Loader Initializing...\r\n"); EfiPrintf(L"ReactOS UEFI OS Loader Initializing...\r\n");
EfiConOut->OutputString(EfiConOut, L"ReactOS UEFI OS Loader Initializing...\r\n");
return Status; return Status;
} }

View file

@ -144,6 +144,11 @@ EfiPrintf (
else else
{ {
/* FIXME: @TODO: Not yet supported */ /* FIXME: @TODO: Not yet supported */
// FIXME: Hack while we are in early rosload mode
if (EfiConOut != NULL)
{
EfiConOut->OutputString(EfiConOut, BlScratchBuffer);
}
} }
/* All done */ /* All done */

View file

@ -349,6 +349,7 @@ BlpMmInitialize (
LibraryParameters->MinimumAllocationCount); LibraryParameters->MinimumAllocationCount);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
EfiPrintf(L"PA Mm init failed: %lx\r\n", Status);
goto Quickie; goto Quickie;
} }
@ -356,6 +357,7 @@ BlpMmInitialize (
Status = MmTrInitialize(); Status = MmTrInitialize();
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
EfiPrintf(L"TR Mm init failed: %lx\r\n", Status);
//MmArchDestroy(); //MmArchDestroy();
//MmPaDestroy(1); //MmPaDestroy(1);
goto Quickie; goto Quickie;
@ -380,6 +382,7 @@ BlpMmInitialize (
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Kill everything set setup so far */ /* Kill everything set setup so far */
EfiPrintf(L"Phase 1 Mm init failed: %lx\r\n", Status);
//MmPaDestroy(0); //MmPaDestroy(0);
//MmTrDestroy(); //MmTrDestroy();
//MmArchDestroy(); //MmArchDestroy();
@ -415,6 +418,7 @@ BlpMmInitialize (
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
/* Go back to static descriptors and kill the heap */ /* Go back to static descriptors and kill the heap */
EfiPrintf(L"Phase 2 Mm init failed: %lx\r\n", Status);
//MmMdpSwitchToStaticDescriptors(); //MmMdpSwitchToStaticDescriptors();
//HapInitializationStatus = 0; //HapInitializationStatus = 0;
//++MmDescriptorCallTreeCount; //++MmDescriptorCallTreeCount;