From owner-freebsd-arm@FreeBSD.ORG Wed Jan 26 14:34:26 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFF3C106566C for ; Wed, 26 Jan 2011 14:34:26 +0000 (UTC) (envelope-from deveshkr@marvell.com) Received: from na3sys009aog109.obsmtp.com (na3sys009aog109.obsmtp.com [74.125.149.201]) by mx1.freebsd.org (Postfix) with SMTP id AED378FC16 for ; Wed, 26 Jan 2011 14:34:26 +0000 (UTC) Received: from source ([65.219.4.130]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKTUAw8d+2gE6NFGnZfmIMXFZghatMCHli@postini.com; Wed, 26 Jan 2011 06:34:26 PST Received: from SC-vEXCH2.marvell.com ([10.93.76.134]) by sc-owa02.marvell.com ([10.93.76.22]) with mapi; Wed, 26 Jan 2011 06:34:24 -0800 From: Devesh Rai To: Mark Tinguely , "freebsd-arm@freebsd.org" Date: Wed, 26 Jan 2011 06:34:21 -0800 Thread-Topic: Changing virtual adress space layout Thread-Index: AcuzPzKYPeSG+g0fRfyNtPYB7ZHQggKIsvZA Message-ID: <0DB595A2CB707F458400BE9663B6A7225E42E359C8@SC-VEXCH2.marvell.com> In-Reply-To: <4D2F289C.9080908@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: RE: Changing virtual adress space layout X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2011 14:34:27 -0000 Hi Mark, Actually I want to map large portion of RAM in kernel virtual address space= . To achieve this in Linux, I did following 1) boot kernel with 256M by setting CONFIG_CMDLINE=3D"mem=3D256M". This fre= ed up more than 1GB of RAM for my module usages 2) increase KVA to 3GB by setting CONFIG_VMSPLIT_1G=3Dy ( 1G for user and 3= GB for kernel) 3) ioremap unused RAM ( 2GB - 256MB ) into Kernel virtual address space. Changing KERNBASE and KERNVIRTADDR "makeoption" from 0xc0000000 to 0x800000= 00 did not worked for me. Kernel hang while loading.=20 Thanks & Regards Devesh =20 -----Original Message----- From: Mark Tinguely [mailto:marktinguely@gmail.com]=20 Sent: Thursday, January 13, 2011 10:00 PM To: freebsd-arm@freebsd.org Cc: Devesh Rai Subject: Re: Changing virtual adress space layout On 1/13/2011 1:30 AM, Devesh Rai wrote: > Hi, > > I am new to FreeBSD. Can some tell how to change virtual address space la= yout in FreeBSD for arm? > For x86, KVA_PAGES=3DN option is there in FreeBSD. In Linux, I used CONF= IG_VMSPLIT option. > I am looking corresponding option for arm. > > Regards > Devesh I assume you have run out of space for the device virtual addresses. KERNBASE is hard coded in sys/arm/include/vm_param.h to be 0xc0000000. There is a related variable for each device configuration: the =20 KERNVIRTADDR "option" and "makeoption" values. This is usually in one=20 of the "std" file file for the device. KERNVIRTADDR sets the starting=20 location of the executable and is sometimes different than KERNBASE. The arm code does not map the from KERNBASE to 0xffff_ffff into the KVA.=20 Instead, there is a variable that determines the maximum size of the=20 kernel executable and kernel virtual address area. Above this defined=20 area lies the no-cache remap memory region, device map area, high=20 vector, etc. On a tangent note: There will be a great advantage in ARMv6/ARMv7 to go=20 to a 2GB UVA / 2GB KVA. --Mark.