Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Nov 2004 15:53:38 -0800
From:      "Vinod Kashyap" <vkashyap@amcc.com>
To:        "James R. Van Artsalen" <james@jrv.org>
Cc:        freebsd-amd64@freebsd.org
Subject:   RE: How to debug >2GB memory issues (and 3ware)
Message-ID:  <I6VX1N00.LM8@hadar.amcc.com>

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


> -----Original Message-----
> From: James R. Van Artsalen [mailto:james@jrv.org]
> Sent: Monday, November 08, 2004 3:42 PM
> To: Vinod Kashyap
> Cc: Michael R. Wayne; freebsd-amd64@freebsd.org
> Subject: Re: How to debug >2GB memory issues (and 3ware)
> =

> =

> Vinod Kashyap wrote:
> =

> >The 3ware driver (twe) for 7xxx/8xxx controllers can handle upto
> >4 GB memory on FreeBSD 4.x, and beyond 4 GB on FreeBSD 5.x.  The
> >driver (twa) for 9xxx controllers can handle memory beyond 4 GB
> >on both 4.x and 5.x.
> >  =

> >
> =

> The twe driver in MAIN seems to be limited to direct access =

> to the lower =

> 4GB.  Am I misinterpreting the significance of this code in =

> twe_freebsd.c?
> =

>     /*
>      * Allocate the parent bus DMA tag appropriate for PCI.
>      */
>     if (bus_dma_tag_create(NULL, 				=

> /* parent */
> 			   1, 0, 				=

> /* alignment, boundary */
> 			   BUS_SPACE_MAXADDR_32BIT, 		=

> /* lowaddr */
> 			   BUS_SPACE_MAXADDR, 			=

> /* highaddr */
> 			   NULL, NULL, 				=

> /* filter, filterarg */
> 			   MAXBSIZE, TWE_MAX_SGL_LENGTH,	=

> /* maxsize, nsegments */
> 			   BUS_SPACE_MAXSIZE_32BIT,		=

> /* maxsegsize */
> 			   BUS_DMA_ALLOCNOW,			=

> /* flags */
> 			   NULL,				=

> /* lockfunc */
> 			   NULL,				=

> /* lockarg */
> =

> =


What this piece of code does is, it lets busdma know that the driver
cannot be passed addresses beyond 4 GB.  So, busdma maps any addresses
beyond 4 GB to the range (< 4 GB) requested by the driver, and so, the
driver is effectively able to "handle" more than 4 GB memory.

All this because the underlying controller cannot access > 4 GB addresses.
The 9xxx controllers, however, can access > 4 GB addresses, and so, the
driver does not request for a smaller range of addresses.





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