Fixed that problem. Time to do some more digging.
--EDIT-- That is really strange. Addr2line for 0002ac38 indicates that the problem occurs at this line of code:
*((unsigned int *)(rdramb + (address & 0xFFFFFF))) = word;
The following output indicates that the cause of the problem is an attempt to access memory address 0x80000004:
I/DEBUG ( 100): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 80000004
The code where the RAM is mmapped:
printf( "rdram=0x%x", (int)rdram );
printf( "munmapping" );
munmap ((void*)0x80000000, 0x800000);
printf( "mmapping" );
if( mmap ((void*)0x80000000, 0x800000,
PROT_READ | PROT_WRITE,
MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS,
=1, 0) <= 0) {printf( "map(0x80000000) failed");}
else
printf( "done mmapping" );
And the following output indicates that the memory allocation was successful and in the correct location:
V/core ( 4947): rdram=0x80000000
V/core ( 4947): munmapping
V/core ( 4947): mmapping
V/core ( 4947): done mmapping
So why does it fail to write a mere word of data at 0x80000004 if 0x800000 bytes of memory have been allocated starting from 0x80000000, I wonder? Maybe I should test that I can write to this area immediately after allocating it, to determine if I'm being prevented from writing there, or if the problem crops up later.