CodeSmith wrote:
Ah, sign extension. The bane of the bit banger. Bitter experience has taught me to use typedef'd unsigned ints and chars for all low level datatypes. I hope it didn't take Michal too long to find that bug,
Well, the problem was more complex. The virtual address space for PPC architecture is slightly larger than 4GB. Since I wanted to make it clear, I was in the need (at least to some degree) of 64 bit arithmetic. Yes, my fault

but I really didn't knew, that a cast like:
uint64_t foo(void *addr)
{
return (uint64_t)addr;
}
will sign-extend all addresses above 0x7fffffff

Well

But no, it didn't took that much time. As soon as I saw that the PTE search in MMU tables fails for upper 2GB range, where it should not fail at all, I fixed it pretty quickly.