* ARM7 Physical Memory Manager
* arch/arm7/mm_phys.c
*/
+#define DEBUG 0
+
#include <acess.h>
#include <mm_virt.h>
char gStaticAllocPages[NUM_STATIC_ALLOC][PAGE_SIZE] __attribute__ ((section(".padata")));
tPAddr gaiStaticAllocPages[NUM_STATIC_ALLOC] = {
- (tPAddr)(&gStaticAllocPages[0] - KERNEL_BASE),
- (tPAddr)(&gStaticAllocPages[1] - KERNEL_BASE),
- (tPAddr)(&gStaticAllocPages[2] - KERNEL_BASE),
- (tPAddr)(&gStaticAllocPages[3] - KERNEL_BASE)
+ (tPAddr)(&gStaticAllocPages[0]) - KERNEL_BASE,
+ (tPAddr)(&gStaticAllocPages[1]) - KERNEL_BASE,
+ (tPAddr)(&gStaticAllocPages[2]) - KERNEL_BASE,
+ (tPAddr)(&gStaticAllocPages[3]) - KERNEL_BASE
};
extern char gKernelEnd[];
{
case 0:
*Start = ((tVAddr)&gKernelEnd - KERNEL_BASE + 0xFFF) & ~0xFFF;
- *Length = 16*1024*1024;
+ *Length = 16*1024*1024 - *Start;
return 1;
default:
return 0;