Subject: kern/2512: fuword() definition problem
To: None <gnats-bugs@NetBSD.ORG>
From: Ignatios Souvatzis <>
List: netbsd-bugs
Date: 06/04/1996 08:18:23
>Number:         2512
>Category:       kern
>Synopsis:       fuword() definition problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun  4 04:35:01 1996
>Originator:     Unprivileged user
	M68060 support integrators, desperated
>Release:        end of May 1996
System: NetBSD 1.1B NetBSD 1.1B (DRACO) #95: Fri May 31 13:21:53 MET DST 1996 amiga

	The kernel fuword() returns a "word of data" inside an int,
	but is also supposed to return -1 on error, which is .. rather
	difficult if sizeof(int) == sizeof(word of data).

	(We dont have this problem with fusword and fubytes, because (to
	my knowledge) none of our ports uses shorts or bytes as ints).
	Furthermore, the fetch family doesn't support 64bit machines well...

	Look for more effective ways to integrate Motorola's m68060 software
	support package than calling copyin()/copyout() for the transfer of
	bytes, int16s and int32s. Find fuxxx() and suxxx(). Read prototypes.
	Read implementation. Scratch head. Sigh.
	First problem: not known, with the exception of possibly taking a 
	pointer to a place to store it to as an argument.
	On m68k, this can still be implemented in a more effective
	way than just calling copyin.

	2nd problem: I can imagine that fuint8, fuint16, fuint32
	and fuint64 would be needed, with fuword and fusword mapped
	on a per-arch-basis to one of them.