Takeshi,
I think I solved the problem now! Now my code automatically detects DIMM presence, size, and MA mapping type correctly for my 3 different types of DIMMs, in whichever slot, or any combination of these DIMMs. I'll do some cleanups and extensive test using memtest86, then post the patch.
I'm just testing your latest code here with LinuxBIOS + ADLO. It is able to start VGA and grub sometimes, but not all the time. FYI, I'm running EPIA with IDE to CF adapter. It maybe related to memory again.
-Andrew