Date: Wed, 10 Jul 2002 11:39:15 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Serguei Tzukanov <tzukanov@narod.ru> Cc: freebsd-hackers@freebsd.org, freebsd-platforms@freebsd.org Subject: RE: A question about S/390 port Message-ID: <XFMail.20020710113502.jhb@FreeBSD.org> In-Reply-To: <200207101554.09734.tzukanov@narod.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10-Jul-2002 Serguei Tzukanov wrote: > Some working notes. > > I've written the libc/csu part, kernel successfully starts init and init > forks off for the execve of -sh, > (http://tzukanov.narod.ru/freebsd390/bootlog.txt) > but there is problem with printing from userland, e.g. output from > userland are not visible. Write syscall to descs 1,2 in init returns > with success. > I'm sure it's something very stupid, so maybe someone have a clue? > > And another problem (well-known?): > __syscall returns 64-bit value but mmap returns 4-byte word in the > td->td_retval[0]. Wrapper for mmap in libc casts 64 rv to 32 and alays > gets zero. This leads to truncating to zero due to cast on 32-bit > big-endian architectures. > The solution is obvious - using constructs like > td->td_retval[_QUAD_LOWWORD] = xxx in MI code. > > For now I just avoid it with hack in syscall handler. td_retval[0] is the low word, and td_retval[1] is the high word, you just need to make sure the values from those two words get returned properly to userland. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020710113502.jhb>