[ROSLOAD]: Implement most of OslMain, which will try to initialize BootLib in Virtual Protected Mode (mostly unimplemented).

[BOOTLIB]: Fix GCC build.
Bootmgr now correctly switches execution into rosload, which must now be implemented.

svn path=/trunk/; revision=73693
This commit is contained in:
Alex Ionescu 2017-02-05 06:02:11 +00:00
parent 7800da4db6
commit d48996392c
3 changed files with 20 additions and 8 deletions

View file

@ -33,7 +33,22 @@ OslMain (
_In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootParameters
)
{
EfiPrintf(L"ReactOS UEFI OS Loader Initializing...\r\n");
return STATUS_NOT_IMPLEMENTED;
BL_LIBRARY_PARAMETERS LibraryParameters;
NTSTATUS Status;
/* Setup the boot library parameters for this application */
BlSetupDefaultParameters(&LibraryParameters);
LibraryParameters.TranslationType = BlVirtual;
LibraryParameters.LibraryFlags = BL_LIBRARY_FLAG_INITIALIZATION_COMPLETED;
LibraryParameters.MinimumAllocationCount = 1024;
LibraryParameters.MinimumHeapSize = 2 * 1024 * 1024;
LibraryParameters.HeapAllocationAttributes = 0x20000;
LibraryParameters.FontBaseDirectory = L"\\Reactos\\Boot\\Fonts";
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");
return Status;
}

View file

@ -1758,7 +1758,7 @@ BlpFwInitialize (
/* FIXME: Not supported */
Status = STATUS_NOT_SUPPORTED;
}
else if (FirmwareData->Version >= 2)
else if (FirmwareData->Version >= BL_FIRMWARE_DESCRIPTOR_VERSION)
{
/* Version 2 -- save the data */
EfiFirmwareData = *FirmwareData;

View file

@ -22,7 +22,7 @@ KDESCRIPTOR IdtRegister;
KDESCRIPTOR BootAppGdtRegister;
KDESCRIPTOR BootAppIdtRegister;
PVOID BootApp32EntryRoutine;
PVOID BootApp32Parameters;
PBOOT_APPLICATION_PARAMETER_BLOCK BootApp32Parameters;
PVOID BootApp32Stack;
/* FUNCTIONS *****************************************************************/
@ -1710,7 +1710,7 @@ ImgpInitializeBootApplicationParameters (
ParameterBlock->Signature[1] = BOOT_APPLICATION_SIGNATURE_2;
ParameterBlock->MemoryTranslationType = MmTranslationType;
ParameterBlock->ImageType = IMAGE_FILE_MACHINE_I386;
ParameterBlock->ImageBase = (ULONGLONG)ImageBase;
ParameterBlock->ImageBase = (ULONG_PTR)ImageBase;
ParameterBlock->ImageSize = NtHeaders->OptionalHeader.SizeOfImage;
/* Get the offset to the memory data */
@ -1870,9 +1870,6 @@ ImgArchEfiStartBootApplication (
/* Disable the kernel debugger */
BlBdStop();
#endif
/* Not yet implemented. This is the last step! */
EfiPrintf(L"EFI APPLICATION START!!!\r\n");
/* Make it so */
Archx86TransferTo32BitApplicationAsm();