X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Farm7%2Fmm_phys.c;h=0a7632cecdb6bc2349d3d8a1c2e48b00a07d3d2b;hb=a12f34dd45f08acd22664db795423a238ca6e569;hp=d91f889f1ec56e0f710fd2abbbe5e132cd555675;hpb=7ca8dd27be34ef1a089e42b9b5518e64c9d4dd11;p=tpg%2Facess2.git diff --git a/Kernel/arch/arm7/mm_phys.c b/Kernel/arch/arm7/mm_phys.c index d91f889f..0a7632ce 100644 --- a/Kernel/arch/arm7/mm_phys.c +++ b/Kernel/arch/arm7/mm_phys.c @@ -4,6 +4,8 @@ * ARM7 Physical Memory Manager * arch/arm7/mm_phys.c */ +#define DEBUG 0 + #include #include @@ -14,10 +16,10 @@ 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[]; @@ -34,7 +36,7 @@ int MM_int_GetMapEntry( void *Data, int Index, tPAddr *Start, tPAddr *Length ) { case 0: *Start = ((tVAddr)&gKernelEnd - KERNEL_BASE + 0xFFF) & ~0xFFF; - *Length = 16*1024*1024; + *Length = 16*1024*1024 - *Start; return 1; default: return 0;