Author: ion
Date: Sun Feb 5 06:02:11 2017
New Revision: 73693
URL:
http://svn.reactos.org/svn/reactos?rev=73693&view=rev
Log:
[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.
Modified:
trunk/reactos/boot/environ/app/rosload/rosload.c
trunk/reactos/boot/environ/lib/firmware/efi/firmware.c
trunk/reactos/boot/environ/lib/misc/image.c
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 06:02:11
2017
@@ -33,7 +33,22 @@
_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;
}
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
06:02:11 2017
@@ -1758,7 +1758,7 @@
/* 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;
Modified: trunk/reactos/boot/environ/lib/misc/image.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/misc/imag…
==============================================================================
--- trunk/reactos/boot/environ/lib/misc/image.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/misc/image.c [iso-8859-1] Sun Feb 5 06:02:11 2017
@@ -22,7 +22,7 @@
KDESCRIPTOR BootAppGdtRegister;
KDESCRIPTOR BootAppIdtRegister;
PVOID BootApp32EntryRoutine;
-PVOID BootApp32Parameters;
+PBOOT_APPLICATION_PARAMETER_BLOCK BootApp32Parameters;
PVOID BootApp32Stack;
/* FUNCTIONS *****************************************************************/
@@ -1710,7 +1710,7 @@
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 @@
/* 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();