Re: Lemote Yeeloong observations
[email protected] (Christos Zoulas) Fri, 11 May 2012 16:49:14 +0000 (UTC)
| Newsgroups | gmane.os.netbsd.ports.evbmips |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]>, Martin Husemann <[email protected]> wrote: >On Fri, May 11, 2012 at 12:52:49AM -0500, John D. Baker wrote: >> Searching for EINVAL revealed calls to netbsd32_ioctl() with commands >> "CLOCKCTL_CLOCK_SETTIME", "CLOCKCTL_SETTIMEOFDAY", and "_IOWR" as >> failing in this way. A few lines earlier, ioctl() calls with command >> "CLOCKCTL_NTP_ADJTIME" fails with EFAULT. Alignment issues? > >This seems strange, the address should be that of a global variable in ntpd, >and thus should be properly aligned. > >Could you instrument the code in src/sys/compat/netbsd32/netbsd32_time.c >and see if the EFAULT comes from the return (error); in line 155 and print >the pointer value? > >Something like: > > if ((error = copyin(SCARG_P32(uap, tp), &ntv32, sizeof(ntv32)))) { > printf("error %d pointer %p\n", error, (void*)SCARG_P32(uap, tp)); > return error; > } The issue is that the ioctls are not being translated. christos