Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Dec 2007 12:52:26 GMT
From:      Igor Mozolevsky <igor@hybrid-lab.co.uk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/118990: nve + PAE bus_addr_t/void * inconsistencies
Message-ID:  <200712241252.lBOCqQ49032953@www.freebsd.org>
Resent-Message-ID: <200712241300.lBOD025a014514@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712241252.lBOCqQ49032953>