Date: Mon, 22 Aug 2011 16:30:23 GMT From: "Mikhail T." <mi+thun@aldan.algebra.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/118990: [nve] nve + PAE bus_addr_t/void * inconsistencies Message-ID: <201108221630.p7MGUNfo004092@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/118990; it has been noted by GNATS. From: "Mikhail T." <mi+thun@aldan.algebra.com> To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/118990: [nve] nve + PAE bus_addr_t/void * inconsistencies Date: Mon, 22 Aug 2011 11:57:52 -0400 This is a multi-part message in MIME format. --------------030109040001030106020202 Content-Type: multipart/alternative; boundary="------------090808020409070103020705" --------------090808020409070103020705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Ping... Any hope for this one to be fixed? I have a perfectly fine machine with 8Gb of RAM, which can't run in PAE, because the on-board nve-interface is unusable :( I made a simple patch, which makes things compile cleanly, but, of course, panics at boot, when the interface is detected... Maybe, if I post this, somebody will fix it out of sheer annoyance :-) Or, perhaps, it is not correctable, because NVidia's "hardware API" (under sys/contrib/dev/nve/{i386,amd64}/) is only available in binary blobs and thus no changes of the structures is possible? -mi --------------090808020409070103020705 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> Ping... Any hope for this one to be fixed? I have a perfectly fine machine with 8Gb of RAM, which can't run in PAE, because the on-board nve-interface is unusable :(<br> <br> I made a simple patch, which makes things compile cleanly, but, of course, panics at boot, when the interface is detected... Maybe, if I post this, somebody will fix it out of sheer annoyance :-)<br> <br> Or, perhaps, it is not correctable, because NVidia's "hardware API" (under sys/contrib/dev/nve/{i386,amd64}/) is only available in binary blobs and thus no changes of the structures is possible?<br> <blockquote>-mi<br> </blockquote> </body> </html> --------------090808020409070103020705-- --------------030109040001030106020202 Content-Type: text/plain; name="nve-pae.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="nve-pae.diff" Index: contrib/dev/nve/adapter.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/nve/adapter.h,v retrieving revision 1.1.1.2 diff -U 2 -r1.1.1.2 adapter.h --- contrib/dev/nve/adapter.h 7 Dec 2005 17:32:12 -0000 1.1.1.2 +++ contrib/dev/nve/adapter.h 22 Aug 2011 15:45:23 -0000 @@ -94,5 +94,5 @@ typedef struct _ADAPTER_WRITE_ELEMENT { - PNV_VOID pPhysical; + bus_addr_t pPhysical; NV_UINT32 ulLength; } ADAPTER_WRITE_ELEMENT, *PADAPTER_WRITE_ELEMENT; Index: contrib/dev/nve/os.h =================================================================== RCS file: /home/ncvs/src/sys/contrib/dev/nve/os.h,v retrieving revision 1.1.1.1 diff -U 2 -r1.1.1.1 os.h --- contrib/dev/nve/os.h 12 Mar 2005 00:17:37 -0000 1.1.1.1 +++ contrib/dev/nve/os.h 22 Aug 2011 15:45:23 -0000 @@ -43,6 +43,6 @@ { PNV_VOID pLogical; - PNV_VOID pPhysical; - NV_UINT32 uiLength; + bus_addr_t pPhysical; + NV_UINT32 uiLength; } MEMORY_BLOCK, *PMEMORY_BLOCK; @@ -53,6 +53,6 @@ { PNV_VOID pLogical; - PNV_VOID pPhysical; - NV_UINT32 uiLength; + bus_addr_t pPhysical; + NV_UINT32 uiLength; /* Parameter to OS layer to indicate what type of memory is needed */ NV_UINT16 AllocFlags; Index: dev/nve/if_nve.c =================================================================== RCS file: /home/ncvs/src/sys/dev/nve/if_nve.c,v retrieving revision 1.33.2.3 diff -U 2 -r1.33.2.3 if_nve.c --- dev/nve/if_nve.c 7 Nov 2010 16:56:29 -0000 1.33.2.3 +++ dev/nve/if_nve.c 22 Aug 2011 15:45:25 -0000 @@ -952,5 +952,5 @@ (ulong)desc->frags[i].ds_len; txdata.sElement[i].pPhysical = - (PVOID)desc->frags[i].ds_addr; + desc->frags[i].ds_addr; } @@ -1372,5 +1372,5 @@ memset(mem->pLogical, 0, (ulong)mem->uiLength); mem_physical = vtophys(mem->pLogical); - mem->pPhysical = (PVOID)mem_physical; + mem->pPhysical = mem_physical; DEBUGOUT(NVE_DEBUG_API, "nve: nve_osalloc 0x%x/0x%x - %d\n", @@ -1427,5 +1427,5 @@ if (offset) { mem_block_ex->pPhysical = - (PVOID)((ulong)mem_block_ex->pPhysical + + ((ulong)mem_block_ex->pPhysical + mem_block_ex->AlignmentSize - offset); mem_block_ex->pLogical = @@ -1446,5 +1446,5 @@ mem_block.pLogical = mem_block_ex->pLogicalOrig; - mem_block.pPhysical = (PVOID)((ulong)mem_block_ex->pPhysicalOrigLow); + mem_block.pPhysical = ((ulong)mem_block_ex->pPhysicalOrigLow); mem_block.uiLength = mem_block_ex->uiLengthOrig; @@ -1515,5 +1515,5 @@ mem->pLogical = (void *)desc->vaddr; - mem->pPhysical = (void *)desc->paddr; + mem->pPhysical = desc->paddr; mem->uiLength = desc->buflength; *id = (void *)desc; --------------030109040001030106020202--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108221630.p7MGUNfo004092>