From owner-freebsd-amd64@FreeBSD.ORG Mon Nov 8 23:53:43 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A0E816A4CE for ; Mon, 8 Nov 2004 23:53:43 +0000 (GMT) Received: from hadar.amcc.com (hadar.amcc.com [192.195.69.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31A1843D45 for ; Mon, 8 Nov 2004 23:53:42 +0000 (GMT) (envelope-from vkashyap@amcc.com) Received: from mailhost02.amcc.com ([192.195.69.49]) by hadar.amcc.com (Netscape Messaging Server 4.15) with SMTP id I6VX1N00.LM8; Mon, 8 Nov 2004 15:53:47 -0800 Received: (from vkashyap-pc [10.66.6.61]) by mailhost02.amcc.com (SMSSMTP 4.0.0.59) with SMTP id M2004110815555120259 ; Mon, 08 Nov 2004 15:55:51 -0800 From: "Vinod Kashyap" To: "James R. Van Artsalen" Date: Mon, 8 Nov 2004 15:53:38 -0800 X-Sent-Folder-Path: Sent Items X-Mailer: Oracle Connector for Outlook 9.0.4 51114 (9.0.6627) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: cc: freebsd-amd64@freebsd.org Subject: RE: How to debug >2GB memory issues (and 3ware) X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 23:53:43 -0000 > -----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.