mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 07:41:51 +00:00
- Don't store memory allocation descriptors inside the bootloader, since this memory is unmapped in kernelmode. Fixes a pagefault after switching to paged mode.
- Store the configuration data in the LPB. svn path=/trunk/; revision=31983
This commit is contained in:
parent
d5a5554fcd
commit
7cd6896619
2 changed files with 1481 additions and 1478 deletions
|
@ -28,6 +28,7 @@
|
|||
extern ULONG reactos_disk_count;
|
||||
extern ARC_DISK_SIGNATURE reactos_arc_disk_info[];
|
||||
extern char reactos_arc_strings[32][256];
|
||||
extern char reactos_arc_hardware_data[HW_MAX_ARC_HEAP_SIZE];
|
||||
|
||||
BOOLEAN
|
||||
WinLdrCheckForLoadedDll(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock,
|
||||
|
@ -429,11 +430,10 @@ LoadAndBootWindows(PCSTR OperatingSystemName, WORD OperatingSystemVersion)
|
|||
AllocateAndInitLPB(&LoaderBlock);
|
||||
|
||||
/* Detect hardware */
|
||||
#if WHEN_MERGE_COMPLETE
|
||||
MachHwDetect(&LoaderBlock->ConfigurationRoot);
|
||||
#else
|
||||
MachHwDetect();
|
||||
#endif
|
||||
LoaderBlock->ConfigurationRoot = MmHeapAlloc(16 * 1024);
|
||||
RtlCopyMemory(LoaderBlock->ConfigurationRoot,
|
||||
(PVOID)reactos_arc_hardware_data, 16 * 1024);
|
||||
|
||||
/* Load kernel */
|
||||
strcpy(FileName, BootPath);
|
||||
|
|
|
@ -107,7 +107,7 @@ PUCHAR KernelPageTablesBuffer;
|
|||
ULONG PhysicalPageTables;
|
||||
ULONG KernelPageTables;
|
||||
|
||||
MEMORY_ALLOCATION_DESCRIPTOR Mad[1024];
|
||||
MEMORY_ALLOCATION_DESCRIPTOR *Mad;
|
||||
ULONG MadCount = 0;
|
||||
|
||||
|
||||
|
@ -428,6 +428,9 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
if (MempAllocatePageTables() == FALSE)
|
||||
return FALSE;
|
||||
|
||||
// Allocate memory for memory allocation descriptors
|
||||
Mad = MmHeapAlloc(sizeof(MEMORY_ALLOCATION_DESCRIPTOR) * 1024);
|
||||
|
||||
// Setup an entry for each descriptor
|
||||
MemoryMap = MmGetMemoryMap(&NoEntries);
|
||||
if (MemoryMap == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue