
Hi,
On Sun, Mar 18, 2012 at 5:26 PM, Mike Frysinger vapier@gentoo.org wrote:
On Saturday 17 March 2012 22:12:38 Marek Vasut wrote:
=>md 0 00000000:Segmentation fault
this is because the change to make this work was reverted. i think ppc is broken, but haven't gone through the details to figure things out.
It's because sandbox has a 128MB memory region, which is just created using malloc(). We want address 0 to refer to the first byte of this region.
I did create a patch to fix this, which used the map_physmem() to get the address in the md command. However, ppc expects that the md command just blindly uses the address it is given (i.e. assume it is already a virtual address if the MMU is on, and a physical address if not). I suspect other archs would have the same requirement if they ever mapped virtual memory differently to physical memory.
I did post about it at the time. My proposed fix was to introduce the idea of mapping an 'apparent' address. This would be a 1-1 mapping for all architectures except sandbox, which would map it into its malloc'd memory.
It's a little unfortunate that sandbox has to be the only thing with a mapping, though. Partly that's why I haven't sent a patch. Taken to its logical conclusion then any memory access that the user requests would end up going through this veneer. But I don't have any better ideas yet.
If you're interested, the original patch was here:
http://patchwork.ozlabs.org/patch/121815/
Regards, Simon
-mike
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot