mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
We now return memory map.
We added a new member to the ARM board configuration block that specifies the number of memory map entries. Board boot loaders are responsible for sending the base and size of all DRAM and FLASH banks. FLASH banks should be marked as Reserved so we don't try using them as RAM. svn path=/trunk/; revision=32162
This commit is contained in:
parent
4980e5f7eb
commit
1e5a0b3061
3 changed files with 12 additions and 2 deletions
|
@ -127,8 +127,13 @@ ULONG
|
|||
ArmMemGetMemoryMap(OUT PBIOS_MEMORY_MAP BiosMemoryMap,
|
||||
IN ULONG MaxMemoryMapSize)
|
||||
{
|
||||
while (TRUE);
|
||||
return FALSE;
|
||||
//
|
||||
// Return whatever the board returned to us (CS0 Base + Size and FLASH0)
|
||||
//
|
||||
RtlCopyMemory(BiosMemoryMap,
|
||||
ArmBoardBlock->MemoryMap,
|
||||
ArmBoardBlock->MemoryMapEntryCount * sizeof(BIOS_MEMORY_MAP));
|
||||
return ArmBoardBlock->MemoryMapEntryCount;
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
|
@ -38,6 +38,7 @@ typedef struct _ARM_BOARD_CONFIGURATION_BLOCK
|
|||
ULONG ClockRate;
|
||||
ULONG TimerRegisterBase;
|
||||
ULONG UartRegisterBase;
|
||||
ULONG MemoryMapEntryCount;
|
||||
PBIOS_MEMORY_MAP MemoryMap;
|
||||
CHAR CommandLine[256];
|
||||
} ARM_BOARD_CONFIGURATION_BLOCK, *PARM_BOARD_CONFIGURATION_BLOCK;
|
||||
|
|
|
@ -106,6 +106,10 @@ BOOLEAN MmInitializeMemoryManager(VOID)
|
|||
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x90, 0x10, LoaderOsloaderHeap); // Disk read buffer for int 13h. DISKREADBUFFER
|
||||
MmMarkPagesInLookupTable(PageLookupTableAddress, 0xA0, 0x60, LoaderFirmwarePermanent); // ROM / Video
|
||||
MmMarkPagesInLookupTable(PageLookupTableAddress, 0xFFF, 1, LoaderSpecialMemory); // unusable memory
|
||||
#elif __arm__
|
||||
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x00, 1, LoaderFirmwarePermanent); // arm exception handlers
|
||||
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x01, 7, LoaderFirmwareTemporary); // arm board block + freeldr stack + cmdline
|
||||
MmMarkPagesInLookupTable(PageLookupTableAddress, 0x08, 0x70, LoaderLoadedProgram); // freeldr image (roughly max. 0x64 pages)
|
||||
#endif
|
||||
|
||||
FreePagesInLookupTable = MmCountFreePagesInLookupTable(PageLookupTableAddress, TotalPagesInLookupTable);
|
||||
|
|
Loading…
Reference in a new issue