4 * ARM7 Physical Memory Manager
10 #define MM_NUM_RANGES 1 // Single range
11 #define MM_RANGE_MAX 0
13 #define NUM_STATIC_ALLOC 4
15 char gStaticAllocPages[NUM_STATIC_ALLOC][PAGE_SIZE] __attribute__ ((section(".padata")));
16 tPAddr gaiStaticAllocPages[NUM_STATIC_ALLOC] = {
17 (tPAddr)(&gStaticAllocPages[0]) - KERNEL_BASE,
18 (tPAddr)(&gStaticAllocPages[1]) - KERNEL_BASE,
19 (tPAddr)(&gStaticAllocPages[2]) - KERNEL_BASE,
20 (tPAddr)(&gStaticAllocPages[3]) - KERNEL_BASE
22 extern char gKernelEnd[];
24 #include <tpl_mm_phys_bitmap.h>
26 void MM_SetupPhys(void)
28 MM_Tpl_InitPhys( 16*1024*1024/0x1000, NULL );
31 int MM_int_GetMapEntry( void *Data, int Index, tPAddr *Start, tPAddr *Length )
36 *Start = ((tVAddr)&gKernelEnd - KERNEL_BASE + 0xFFF) & ~0xFFF;
37 *Length = 16*1024*1024;
45 * \brief Takes a physical address and returns the ID of its range
46 * \param Addr Physical address of page
47 * \return Range ID from eMMPhys_Ranges
49 int MM_int_GetRangeID( tPAddr Addr )
51 return MM_RANGE_MAX; // ARM doesn't need ranges