From: Lennert B. <bu...@wa...> - 2004-08-30 14:24:09
|
On Mon, Aug 30, 2004 at 03:57:32PM +0200, Lennert Buytenhek wrote: > > That sounds like general memory corruption. Have you upgraded the > > flash to fix the ram refresh problem? > > No, I haven't yet. I was somewhat afraid to brick it and not sure > if this would solve the problem. > > If you think this is the general ram refresh problem present in the > older bootloaders, perhaps I can just poke the right value into > MDCNFG/MDREFR and see if that helps? Any idea what I should poke > into there? OK, MDREFR was 0x039bc0ff, and I just poked 0x039bc018 in there from userspace (p6-15 of Intel PXA255 Processor Developer's manual.) I assume that that should do it, but I'm afraid my root filesystem might have some subtle corruption by now.. will check it out now. cheers, Lennert #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> int main() { volatile u_int32_t *reg; void *x; int fd; fd = open("/dev/mem", O_RDWR | O_SYNC); if (fd < 0) { perror("open"); exit(-1); } x = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x48000000); if (x == MAP_FAILED) { perror("mmap"); exit(-1); } reg = (volatile u_int32_t *)(x + 0x4); printf("0x48000004 is %.8x\n", *reg); if (*reg == 0x039bc0ff) { printf("updating register\n"); *reg = 0x039bc018; } return 0; } |