kern/118990: nve + PAE bus_addr_t/void * inconsistencies

Igor Mozolevsky igor at hybrid-lab.co.uk
Mon Dec 24 05:00:02 PST 2007


>Number:         118990
>Category:       kern
>Synopsis:       nve + PAE bus_addr_t/void * inconsistencies
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 24 13:00:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Igor Mozolevsky
>Release:        RELENG_6
>Organization:
>Environment:
>Description:
=== FreeBSD-RELENG_6/src/sys/i386/include/_bus.h defines bus_addr_t as:

l38:
/*
 * Bus address and size types
 */
#ifdef PAE
typedef uint64_t bus_addr_t;
#else
typedef uint32_t bus_addr_t;
#endif

which is clearly 64 bits when PAE is enabled, this causes compile problems with nve device driver when it copies stuff around:

=== FreeBSD-RELENG_6/src/sys/dev/nve/if_nve.c:

l1450:
nve_osallocrxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID *id)

l1453:
struct nve_rx_desc *desc;

l1494: (this is the one that makes the compiler bail out)
mem->pPhysical = (void *)desc->paddr;

=== FreeBSD-RELENG_6/src/sys/contrib/dev/nve/basetype.h
l91:
#define NV_VOID                 void
typedef NV_VOID                 *PNV_VOID;

=== FreeBSD-RELENG_6/src/sys/contrib/dev/nve/os.h
l45:
PNV_VOID   pPhysical;


>How-To-Repeat:
Enable both PAE and nve in the kernel
>Fix:
Don't enable PAE

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list