Date: Fri, 23 Nov 2012 20:20:42 -0800 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: grenville armitage <garmitage@swin.edu.au> Cc: freebsd-emulation@freebsd.org, freebsd-arm@freebsd.org Subject: Re: FreeBSD-CURRENT on Qemu-emulated Gumstix Verdex? Message-ID: <50B04B1A.8090907@bluezbox.com> In-Reply-To: <50AFEAC5.6040607@swin.edu.au> References: <50AFEAC5.6040607@swin.edu.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/23/2012 1:29 PM, grenville armitage wrote: > All, > > Apologies if I have the wrong lists, feel free to redirect me. > > I recently decided to try getting an arm build of 10.0-CURRENT > (r243319) (TARGET=arm KERNCONF=GUMSTIX-QEMU) running inside a > Qemu-emulated Gumstix Verdex board, using qemu-devel (1.1.1) as the > emulator. > > Short version: I fire up qemu-system-arm with "-m 768" to make sure > there's enough virtual RAM. u-boot reports the emulated Verdex board > as having 256MB of DRAM (I believe this limit is imposed by u-boot). > But when control passes to FreeBSD the kernel prints the usual > copyright messages, detects the CPU type ("PXA27x step C-0 (XScale > core)"), auto-detects 512MB of real memory rather than 256MB and > promptly panics (with "panic: vm_page_insert: page already inserted"). > > The problem appears to be FreeBSD auto-detecting twice the emulated > available RAM. Does this ring any bells with anyone? My google-fu has > so far failed me. > > (I've been contemplating trying this for awhile, since noticing > sys/arm/conf/GUMSTIX-QEMU was added to head earlier this year. > Admittedly GUMSTIX-QEMU relies on GUMSTIX, which notes it is for the > Basix and Connex boards. So I recognise that the answer when emulating > Verdex boards might simply be "don't do that".) > > FWIW, this is a side project to get an emulated ARM environment > running on my amd64 box for building ARM Ports. I've also tried > booting the same kernel using Qemu's emulation of the Gumstix Connex > board -- this does seem to work, but the emulated 64MB RAM is too > tight. > (http://matrossi.blogspot.com.au/2011/09/freebsd-arm-on-qemu-in-virtualbox.html > was my early motivation for doing this.) > > FWIW#2, the actual console output during a failed boot: AFAIU you can't specify just any memory size for PXA2XX-based boards since they've got strict SDRAM configuration format. From quick glance it seems that FreeBSD's SDRAM size detection code thinks that there are 4 banks of 128Mb. While the same MDCNFG register value(0x8ad30ad3) is used in U-Boot source to indicate 256Mb memory size. So I assume our code is broken for PXA270. If anybody got a datasheet for it - please take a look, or send datasheet my way.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50B04B1A.8090907>