mirror of
https://github.com/reactos/reactos.git
synced 2024-09-12 05:43:24 +00:00
- Properly allocate ArcDisk info, so it gets correctly mapped later. Fixes spontaneous INACCESSIBLE_BOOT_DEVICE errors.
svn path=/branches/winldr/; revision=31285
This commit is contained in:
parent
e43bd0bf47
commit
8ba93ade66
|
@ -106,8 +106,14 @@ WinLdrScanImportDescriptorTable(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock,
|
||||||
ImportTable = (PIMAGE_IMPORT_DESCRIPTOR)RtlImageDirectoryEntryToData(VaToPa(ScanDTE->DllBase),
|
ImportTable = (PIMAGE_IMPORT_DESCRIPTOR)RtlImageDirectoryEntryToData(VaToPa(ScanDTE->DllBase),
|
||||||
TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &ImportTableSize);
|
TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &ImportTableSize);
|
||||||
|
|
||||||
DbgPrint((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %S ImportTable = 0x%X\n",
|
{
|
||||||
VaToPa(ScanDTE->BaseDllName.Buffer),ImportTable));
|
UNICODE_STRING BaseName;
|
||||||
|
BaseName.Buffer = VaToPa(ScanDTE->BaseDllName.Buffer);
|
||||||
|
BaseName.MaximumLength = ScanDTE->BaseDllName.MaximumLength;
|
||||||
|
BaseName.Length = ScanDTE->BaseDllName.Length;
|
||||||
|
DbgPrint((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %wZ ImportTable = 0x%X\n",
|
||||||
|
&BaseName, ImportTable));
|
||||||
|
}
|
||||||
|
|
||||||
/* If image doesn't have any import directory - just return success */
|
/* If image doesn't have any import directory - just return success */
|
||||||
if (ImportTable == NULL)
|
if (ImportTable == NULL)
|
||||||
|
|
|
@ -29,9 +29,6 @@ extern ULONG reactos_disk_count;
|
||||||
extern ARC_DISK_SIGNATURE reactos_arc_disk_info[];
|
extern ARC_DISK_SIGNATURE reactos_arc_disk_info[];
|
||||||
extern char reactos_arc_strings[32][256];
|
extern char reactos_arc_strings[32][256];
|
||||||
|
|
||||||
ARC_DISK_SIGNATURE BldrDiskInfo[32];
|
|
||||||
CHAR BldrArcNames[32][256];
|
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
WinLdrCheckForLoadedDll(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock,
|
WinLdrCheckForLoadedDll(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock,
|
||||||
IN PCH DllName,
|
IN PCH DllName,
|
||||||
|
@ -138,7 +135,7 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
PARC_DISK_SIGNATURE ArcDiskInfo;
|
PARC_DISK_SIGNATURE ArcDiskInfo;
|
||||||
|
|
||||||
/* Get the ARC structure */
|
/* Get the ARC structure */
|
||||||
ArcDiskInfo = (PARC_DISK_SIGNATURE)MmHeapAlloc(sizeof(ARC_DISK_SIGNATURE));//&BldrDiskInfo[i];
|
ArcDiskInfo = (PARC_DISK_SIGNATURE)MmHeapAlloc(sizeof(ARC_DISK_SIGNATURE));
|
||||||
RtlZeroMemory(ArcDiskInfo, sizeof(ARC_DISK_SIGNATURE));
|
RtlZeroMemory(ArcDiskInfo, sizeof(ARC_DISK_SIGNATURE));
|
||||||
|
|
||||||
/* Copy the data over */
|
/* Copy the data over */
|
||||||
|
@ -146,9 +143,9 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
ArcDiskInfo->CheckSum = reactos_arc_disk_info[i].CheckSum;
|
ArcDiskInfo->CheckSum = reactos_arc_disk_info[i].CheckSum;
|
||||||
|
|
||||||
/* Copy the ARC Name */
|
/* Copy the ARC Name */
|
||||||
//ArcDiskInfo->ArcName = (PCHAR)MmAllocateMemory(sizeof(CHAR)*256);
|
ArcDiskInfo->ArcName = (PCHAR)MmHeapAlloc(sizeof(CHAR)*256);
|
||||||
strcpy(BldrArcNames[i], reactos_arc_disk_info[i].ArcName);
|
strcpy(ArcDiskInfo->ArcName, reactos_arc_disk_info[i].ArcName);
|
||||||
ArcDiskInfo->ArcName = (PCHAR)PaToVa(BldrArcNames[i]);
|
ArcDiskInfo->ArcName = (PCHAR)PaToVa(ArcDiskInfo->ArcName);
|
||||||
|
|
||||||
/* Mark partition table as valid */
|
/* Mark partition table as valid */
|
||||||
ArcDiskInfo->ValidPartitionTable = TRUE;
|
ArcDiskInfo->ValidPartitionTable = TRUE;
|
||||||
|
@ -534,7 +531,6 @@ WinLdrpDumpMemoryDescriptors(PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
{
|
{
|
||||||
MemoryDescriptor = CONTAINING_RECORD(NextMd, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry);
|
MemoryDescriptor = CONTAINING_RECORD(NextMd, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry);
|
||||||
|
|
||||||
|
|
||||||
DbgPrint((DPRINT_WINDOWS, "BP %08X PC %04X MT %d\n", MemoryDescriptor->BasePage,
|
DbgPrint((DPRINT_WINDOWS, "BP %08X PC %04X MT %d\n", MemoryDescriptor->BasePage,
|
||||||
MemoryDescriptor->PageCount, MemoryDescriptor->MemoryType));
|
MemoryDescriptor->PageCount, MemoryDescriptor->MemoryType));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue