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
ArmMemGetMemoryMap(OUT PBIOS_MEMORY_MAP BiosMemoryMap,
IN ULONG MaxMemoryMapSize)
{
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;
ULONG ClockRate;
ULONG TimerRegisterBase;
ULONG UartRegisterBase;
ULONG ClockRate;
ULONG TimerRegisterBase;
ULONG UartRegisterBase;
+ ULONG MemoryMapEntryCount;
PBIOS_MEMORY_MAP MemoryMap;
CHAR CommandLine[256];
} ARM_BOARD_CONFIGURATION_BLOCK, *PARM_BOARD_CONFIGURATION_BLOCK;
PBIOS_MEMORY_MAP MemoryMap;
CHAR CommandLine[256];
} ARM_BOARD_CONFIGURATION_BLOCK, *PARM_BOARD_CONFIGURATION_BLOCK;
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
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);
#endif
FreePagesInLookupTable = MmCountFreePagesInLookupTable(PageLookupTableAddress, TotalPagesInLookupTable);