Author: ion
Date: Thu Jan 7 05:30:18 2016
New Revision: 70516
URL:
http://svn.reactos.org/svn/reactos?rev=70516&view=rev
Log:
[BOOTLIB]: More debug print cleanups
[BOOTLIB]: Fix incorrect use of flag introduced a few revisions ago. This fixes <1MB
RAM descriptors.
[BOOTLIB]: Enable BmFwMemoryInitialize, since it works now.
All (known) bugs are fixed, bootmgr is back on track.
Modified:
trunk/reactos/boot/environ/app/bootmgr/bootmgr.c
trunk/reactos/boot/environ/include/bl.h
trunk/reactos/boot/environ/lib/firmware/efi/firmware.c
trunk/reactos/boot/environ/lib/io/device.c
trunk/reactos/boot/environ/lib/io/etfs.c
trunk/reactos/boot/environ/lib/io/file.c
trunk/reactos/boot/environ/lib/mm/descriptor.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] Thu Jan 7 05:30:18
2016
@@ -1151,7 +1151,7 @@
}
/* Initialize firmware-specific memory regions */
- //BmFwMemoryInitialize();
+ BmFwMemoryInitialize();
/* Initialize the boot status data log (BSD) */
BmpInitializeBootStatusDataLog();
@@ -1168,7 +1168,7 @@
/* do more stuff!! */
EfiPrintf(BlResourceFindMessage(BM_MSG_TEST));
- EfiPrintf(Stylesheet);
+ //EfiPrintf(Stylesheet);
EfiStall(10000000);
//Failure:
Modified: trunk/reactos/boot/environ/include/bl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/bl.h?…
==============================================================================
--- trunk/reactos/boot/environ/include/bl.h [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/include/bl.h [iso-8859-1] Thu Jan 7 05:30:18 2016
@@ -287,10 +287,11 @@
//
// Memory Allocation Attributes
//
+ BlMemoryUnknown = 0x00010000,
BlMemoryNonFixed = 0x00020000,
BlMemoryFixed = 0x00040000,
BlMemoryReserved = 0x00080000,
- BlMemoryValidAllocationAttributes = BlMemoryNonFixed | BlMemoryFixed |
BlMemoryReserved,
+ BlMemoryValidAllocationAttributes = BlMemoryNonFixed | BlMemoryFixed |
BlMemoryReserved | BlMemoryUnknown,
BlMemoryValidAllocationAttributeMask = 0x00FF0000,
//
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] Thu Jan 7
05:30:18 2016
@@ -1269,7 +1269,8 @@
if (Descriptor->Type == BlConventionalMemory)
{
/* Set the reserved flag on the descriptor */
- Descriptor->Flags |= BlReservedMemory;
+ EfiPrintf(L"Adding magic flag\r\n");
+ Descriptor->Flags |= BlMemoryReserved;
}
/* Add this descriptor into the list */
@@ -1313,7 +1314,8 @@
if ((Descriptor->Type == BlConventionalMemory) && (EndPage <=
0x100))
{
/* Set the reserved flag on the descriptor */
- Descriptor->Flags |= BlReservedMemory;
+ EfiPrintf(L"Adding magic flag\r\n");
+ Descriptor->Flags |= BlMemoryReserved;
}
/* Add the descriptor to the list, requesting coalescing as asked */
Modified: trunk/reactos/boot/environ/lib/io/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/device…
==============================================================================
--- trunk/reactos/boot/environ/lib/io/device.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/io/device.c [iso-8859-1] Thu Jan 7 05:30:18 2016
@@ -301,7 +301,7 @@
}
Alignment = BlockDevice->Alignment;
- if (!Alignment || !((Alignment - 1) & (ULONG_PTR)Buffer))
+ if (!(Alignment) || !((Alignment - 1) & (ULONG_PTR)Buffer))
{
Status = BlockIopFirmwareOperation(DeviceEntry,
Buffer,
@@ -317,7 +317,6 @@
return STATUS_SUCCESS;
}
- EfiPrintf(L"Firmware alignment fixup required\r\n");
Status = BlockIopAllocateAlignedBuffer(&BlockIopAlignedBuffer,
&BlockIopAlignedBufferSize,
BufferSize,
@@ -820,11 +819,6 @@
/* Get information on the block media */
Media = BlockDevice->Protocol->Media;
-
- EfiPrintf(L"Block I/O Info for Device 0x%p, 0x%lX\r\n", BlockDevice,
BlockDevice->Handle);
- EfiPrintf(L"Removable: %d Present: %d Last Block: %I64d BlockSize: %d IoAlign:
%d MediaId: %d ReadOnly: %d\r\n",
- Media->RemovableMedia, Media->MediaPresent, Media->LastBlock,
Media->BlockSize, Media->IoAlign,
- Media->MediaId, Media->ReadOnly);
/* Set the appropriate device flags */
BlockDevice->DeviceFlags = 0;
Modified: trunk/reactos/boot/environ/lib/io/etfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/etfs.c…
==============================================================================
--- trunk/reactos/boot/environ/lib/io/etfs.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/io/etfs.c [iso-8859-1] Thu Jan 7 05:30:18 2016
@@ -550,8 +550,6 @@
ULONG DeviceId, FileSize, DirOffset, FileOffset, Size;
PRAW_DIR_REC DirEntry;
BOOLEAN IsDirectory;
-
- EfiPrintf(L"Attempting to open file %s in directory %s\r\n", FileName,
Directory->FilePath);
EtfsFile = Directory->FsSpecificData;
DeviceId = EtfsFile->DeviceId;
Modified: trunk/reactos/boot/environ/lib/io/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/io/file.c…
==============================================================================
--- trunk/reactos/boot/environ/lib/io/file.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/io/file.c [iso-8859-1] Thu Jan 7 05:30:18 2016
@@ -426,8 +426,6 @@
Status = STATUS_SUCCESS;
FileEntry->FileId = FileId;
- EfiPrintf(L"File %s opened with ID: %lx\r\n", FileEntry->FilePath,
FileId);
-
FileOpened:
/* Add a reference to the file entry, and see if this is the first one */
if (++FileEntry->ReferenceCount == 1)
@@ -524,7 +522,6 @@
if (NT_SUCCESS(Status))
{
/* Return the file ID back to the caller */
- EfiPrintf(L"File %s opened: %lx\r\n", FileName, FileEntry->FileId);
*FileId = FileEntry->FileId;
}
Modified: trunk/reactos/boot/environ/lib/mm/descriptor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/descri…
==============================================================================
--- trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] Thu Jan 7 05:30:18 2016
@@ -742,9 +742,9 @@
}
/* Bail out if the allocation flags don't match */
- if (((Flags ^ Descriptor->Flags) & 0x190000))
- {
- EfiPrintf(L"Incorrect memory allocation flags\r\n");
+ if (((Flags ^ Descriptor->Flags) & (BlMemoryRuntime | BlMemoryReserved |
BlMemoryUnknown)))
+ {
+ //EfiPrintf(L"Incorrect memory allocation flags\r\n");
return FALSE;
}