diff --git a/reactos/boot/environ/app/rosload/rosload.c b/reactos/boot/environ/app/rosload/rosload.c index 000cbee7abd..7db6cef1400 100644 --- a/reactos/boot/environ/app/rosload/rosload.c +++ b/reactos/boot/environ/app/rosload/rosload.c @@ -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; } diff --git a/reactos/boot/environ/lib/firmware/efi/firmware.c b/reactos/boot/environ/lib/firmware/efi/firmware.c index a88095d7c1b..be4e02e29d3 100644 --- a/reactos/boot/environ/lib/firmware/efi/firmware.c +++ b/reactos/boot/environ/lib/firmware/efi/firmware.c @@ -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; diff --git a/reactos/boot/environ/lib/misc/image.c b/reactos/boot/environ/lib/misc/image.c index 2b4fb8433a7..61f879736ef 100644 --- a/reactos/boot/environ/lib/misc/image.c +++ b/reactos/boot/environ/lib/misc/image.c @@ -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();