Author: ros-arm-bringup
Date: Wed Feb 6 18:47:02 2008
New Revision: 32162
URL:
http://svn.reactos.org/svn/reactos?rev=32162&view=rev
Log:
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.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
trunk/reactos/boot/freeldr/freeldr/mm/meminit.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/stubs.c Wed Feb 6 18:47:02 2008
@@ -127,8 +127,13 @@
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
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h Wed Feb 6 18:47:02
2008
@@ -38,6 +38,7 @@
ULONG ClockRate;
ULONG TimerRegisterBase;
ULONG UartRegisterBase;
+ ULONG MemoryMapEntryCount;
PBIOS_MEMORY_MAP MemoryMap;
CHAR CommandLine[256];
} ARM_BOARD_CONFIGURATION_BLOCK, *PARM_BOARD_CONFIGURATION_BLOCK;
Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c Wed Feb 6 18:47:02 2008
@@ -106,6 +106,10 @@
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);