From owner-freebsd-arm@FreeBSD.ORG Thu May 21 20:44:14 2009 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 CCA141065670 for ; Thu, 21 May 2009 20:44:14 +0000 (UTC) (envelope-from gballet@gmail.com) Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com [209.85.218.165]) by mx1.freebsd.org (Postfix) with ESMTP id 575E88FC21 for ; Thu, 21 May 2009 20:44:14 +0000 (UTC) (envelope-from gballet@gmail.com) Received: by bwz9 with SMTP id 9so1299897bwz.43 for ; Thu, 21 May 2009 13:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=6jvMt8jxy34qrttdKpSzhDfbiV8W9I1bCDmqevRuyJU=; b=MCJE9COzPyOEhgRIzaBmNft1S3MNgOU+TaHdJfs+1GIOarb1PKtXdDgAJtfpkfWV9w dOzUloParJJpfyO8dd5XlQuFyXoI/fBCs5bt1O3hxfA/JsAWySjsV1swqIoTyFPNIBeC /EjHOf3kc92ZLgWRxQ/qaVJBhDXZ8+0gDcEFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=JPBL9t+Hcx26gNNazaa3T445z2VP4v1UGIbDB6PP0L7HD43/gx6qpX19CT6USnWZxy d+S0W+jEbfN6EvOgjEugSPhWfX9chZ0U3h6F8+AvRvc1scb1iUI0zwKBRW52g0tWu0AX m1eGJUWo/BCS4ce+6ZpUZH+xCl5lwIBYnV3k0= MIME-Version: 1.0 Received: by 10.204.60.148 with SMTP id p20mr2775214bkh.165.1242937091688; Thu, 21 May 2009 13:18:11 -0700 (PDT) Date: Thu, 21 May 2009 22:18:11 +0200 Message-ID: From: Guillaume Ballet To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: LMA != VMA when compiling a kernel 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: Thu, 21 May 2009 20:44:15 -0000 Hello list, I am still working on a port of FreeBSD to the beagleboard, and am currently working on enabling the VM. So far, I have loaded the kernel at phys_addr = virt_addr = 0x80000000, because that is where the RAM is. However, when enabling the VM, I would like the kernel virtual addresses to start with 0xC0000000 as they do on most other platform. Hence, I have been trying to set the ELF file sections' VMAs to something starting with 0xC and the LMAs to something starting with 0x8. It turns out that just setting KERNPHYSADDR and KERNVIRTADDR is not enough >.< If found a way to do this by chaning the script linker and adding AT after each section declaration, and it works fine. But it's tedious, hacky and lots of hardcoded values only work with my platform. Googling for ideas, I found that there has been some discussion about it barely a year ago. Yet, it doesn't seem to have yielded any tangible result. Would someone have addressed the progress in the mean time? I guess another way to look at it would be to work it around by also porting a full-fledged loader(8). A task which I have delayed to until I get a booting kernel - maybe not the wisest move :) Still, I'm curious about the possibility of specifying distinct LMAs and VMAs for the kernel executable. Guillaume