Subject: kern/2512: fuword() definition problem
To: None <gnats-bugs@NetBSD.ORG>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
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
>Last-Modified:
>Originator:     Unprivileged user
>Organization:
	M68060 support integrators, desperated
>Release:        end of May 1996
>Environment:
	
System: NetBSD jocelyn.rhein.de 1.1B NetBSD 1.1B (DRACO) #95: Fri May 31 13:21:53 MET DST 1996 is@jocelyn.rhein.de:/bulk/s2/src/sys/arch/amiga/compile/DRACO amiga


>Description:
	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...

>How-To-Repeat:
	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.
>Fix:
	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.

>Audit-Trail:
>Unformatted: