From owner-freebsd-arm@FreeBSD.ORG Mon Mar 31 16:02:41 2008 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 A045D1065670 for ; Mon, 31 Mar 2008 16:02:41 +0000 (UTC) (envelope-from qdk@quickdekay.net) Received: from hatert.nijmegen.internl.net (mailrelay1.nijmegen.internl.net [217.149.192.44]) by mx1.freebsd.org (Postfix) with ESMTP id 57B128FC1B for ; Mon, 31 Mar 2008 16:02:41 +0000 (UTC) (envelope-from qdk@quickdekay.net) Received: from smtp20.nijmegen.internl.net by hatert.nijmegen.internl.net via smtp20.nijmegen.internl.net [217.149.192.18] with ESMTP for id m2VFKxt6027763 (8.13.6/2.04); Mon, 31 Mar 2008 17:20:59 +0200 (MEST) Received: from [172.16.17.100] (waalbrug.nijmegen.internl.net [217.149.192.5]) by smtp20.nijmegen.internl.net (8.13.8/2.04) with ESMTP id m2VFKvgl018580 for ; Mon, 31 Mar 2008 17:20:58 +0200 (CEST) Message-ID: <47F10137.5070104@quickdekay.net> Date: Mon, 31 Mar 2008 17:20:23 +0200 From: K Staring User-Agent: Thunderbird 1.5.0.14 (Macintosh/20071210) MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: multipart/mixed; boundary="------------030506020707060206060306" Subject: Porting FreeBSD to Atmel at91sam9263 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: Mon, 31 Mar 2008 16:02:41 -0000 This is a multi-part message in MIME format. --------------030506020707060206060306 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I'm trying to get FreeBSD to boot from an Atmel 9263 based board. I suppose the porting process isn't that much trouble, as the Atmel 9261 seems to be supported. The bootloader used is u-boot. As far as I can see, the Atmel 9263 is mostly identical to the 9261, but the memory mapping of the integrated devices differ. So to start with, I created an extra hints file with the correct offsets for the devices (and use that hints file in the kernel conf). This clearly wasn't enough; I didn't get any output. Next, I tried compiling some simple code, like printing a character to the USB serial device (offset 0xffffee00 + 28) and jumping to 0x0 to reboot. This worked ok. Using the jump-to-0x0 trick (ldr r0, =0 ; mov pc, r0) I was able to boot and reboot the kernel up to the mmu enable code at Lunmapped: in locore.S (STARTUP_PAGETABLE_ADDR is defined). After this point, the board didn't reboot. Which is understandable since the mmu won't allow it. However, adding this line at the start of mmu_init_table didn't improve anything, the board still doesn't seem to reboot. MMU_INIT(0x0, 0x0 , 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) Another possibility is that u-boot doens't expect the mmu to be active and causes a protection fault itself. Can anyone give me pointers for possible next steps to try? It looks like the hints files isn't used by some of the code in the at91 directory, is this correct? Would editing at91rm92reg.h be more useful? I'm using FreeBSD 8. Thanks for any advice, Khamba -- (src/sys/arm/at91/std.a9263) include "../at91/std.at91" files "../at91/files.kb920x" makeoptions KERNPHYSADDR=0x20000000 makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 options STARTUP_PAGETABLE_ADDR=0x20800000 options PHYSADDR=0x20000000 -- -- (boot with u-boot) tftp 20000000 kernel go 200000e0 -- --------------030506020707060206060306 Content-Type: text/plain; x-mac-type="656E2E79"; x-mac-creator="65532F74"; name="hints.at91sam9263" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hints.at91sam9263" # These are the wiring for the at91sam9263. These are the built-in devices # for that cpu. # DBGU is unit 0 hint.uart.0.at="apb" hint.uart.0.maddr="0xffffee00" hint.uart.0.flags=0x10 # USART0 is unit 1 hint.uart.1.at="apb" hint.uart.1.maddr="0xfff8c000" # USART1 is unit 2 hint.uart.2.at="apb" hint.uart.2.maddr="0xfff90000" # USART2 is unit 3 hint.uart.3.at="apb" hint.uart.3.maddr="0xfff94000" # SSC0 is unit 4 hint.uart.4.at="apb" hint.uart.4.maddr="0xfff98000" # SSC1 is unit 5 hint.uart.5.at="apb" hint.uart.5.maddr="0xfff9c000" # TC0, TC1, TC2 hint.tc.0.at="apb" hint.tc.0.maddr="0xfff7c000" # USB Device hint.udp.0.at="apb" hint.udp.0.maddr="0xfff78000" # MCI0 hint.mci.0.at="apb" hint.mci.0.maddr="0xfff80000" # MCI1 hint.mci.1.at="apb" hint.mci.1.maddr="0xfff84000" # TWI hint.twi.0.at="apb" hint.twi.0.maddr="0xfff88000" # SSC0 hint.ssc.0.at="apb" hint.ssc.0.maddr="0xfff98000" # SSC1 hint.ssc.1.at="apb" hint.ssc.1.maddr="0xfff9c000" # SPI0 hint.spi.0.at="apb" hint.spi.0.maddr="0xfffa4000" # SSC1 hint.spi.1.at="apb" hint.spi.1.maddr="0xfff9c000" # PMC hint.pmc.0.at="apb" hint.pmc.0.maddr="0xfffffc00" # USB host (ohci) #??? maybe this needs to be on asb instead of apb hint.ohci.at="apb" hint.ohci.maddr="0x00500000" # LCD controller hint.atlcd.at="apb" hint.atlcd.maddr="0x00600000" --------------030506020707060206060306--