qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	Andrew Baumann <Andrew.Baumann@microsoft.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	Sylvain Garrigues <sylvain@sylvaingarrigues.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH] bcm2835_property: use cached values when querying framebuffer
Date: Fri, 22 Apr 2016 09:46:17 +0200	[thread overview]
Message-ID: <1461311177.28204.67.camel@redhat.com> (raw)
In-Reply-To: <CAPokK=qiaGkd3oZ+r_cLNov4gvAF6Qtv-p6NwxHkY_m4_NrqRg@mail.gmail.com>

  Hi,

> > Ideally as was mentioned earlier this would be done by simply executing the
> > existing bootloader under emulation, rather than building all that code into
> > qemu. However, in the Pi case, the bootloader runs on the VideoCore (a
> > separate non-ARM CPU), so isn't (and likely won't be since IIUC it isn't
> > fully documented) emulated by qemu. by the time the ARM CPU runs, everything
> > (kernel, DTB/ATAGS, ARM boot stub, ...) is already loaded into RAM, the
> > display is already probed over HDMI and the controller scanning out a dummy
> > image, etc.
> >
> > So I think if that were to be supported, it'd have to be coded into qemu. Is
> > that something that could happen, or would such patches not fit qemu's model
> > well?
> 
> I made half a start on this project but had to shelve it.
> 
> The hard part is the FAT filesystem. The basic approach I started on
> was to link in the relevant bits of the GNU mtools so QEMU can poke
> around in a FAT filesystem hosted on a block device. Then just mount
> the SD card and emulate the boot logic of the VideoCore bootloader.
> This amount of new code should actually be pretty small, as the FS
> driver is handled by mtools and the SDHCI can be shorted by just
> having this alternate bootloader go direct to the block device (fish
> the blockdev out from the SD card).

Alternatively we can just go for a later boot loader stage, i.e. put a
u-boot build for rpi2 to pc-bios/ (we already have one for ppc there)
and run that by default.

Our sdcard emulation seems to have problems though:

   U-Boot 2016.05-rc2 (Apr 22 2016 - 09:11:45 +0200)

   DRAM:  960 MiB
   RPI 2 Model B (0xa21041)
   MMC:   <uboot hangs here>

Recent linux kernels have trouble talking to the mmc too.

  reply	other threads:[~2016-04-22  7:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 10:41 [Qemu-devel] [PATCH] bcm2835_property: use cached values when querying framebuffer Sylvain Garrigues
2016-04-21 12:45 ` Peter Maydell
2016-04-21 12:50   ` Sylvain Garrigues
2016-04-21 12:54     ` Peter Maydell
2016-04-21 13:15       ` Sylvain Garrigues
2016-04-21 13:42         ` Peter Maydell
2016-04-21 14:07           ` Sylvain Garrigues
2016-04-21 16:06             ` [Qemu-devel] [Qemu-arm] " Stephen Warren
2016-04-22  7:17               ` Peter Crosthwaite
2016-04-22  7:46                 ` Gerd Hoffmann [this message]
2016-04-22 11:56                   ` Andrew Baumann
2016-04-22 15:43                   ` Stephen Warren
2016-04-22 16:50                   ` Peter Crosthwaite
2016-04-22 11:44                 ` Andrew Baumann
2016-04-22 16:55                   ` Peter Crosthwaite
2016-04-22 18:09                   ` Sylvain Garrigues
2016-04-22 11:22 ` [Qemu-devel] " Andrew Baumann
2016-04-22 11:26   ` Sylvain Garrigues
2016-04-22 11:30     ` Andrew Baumann
2016-04-22 12:12       ` Sylvain Garrigues
2016-05-09 10:27       ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461311177.28204.67.camel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=armbru@redhat.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=swarren@wwwdotorg.org \
    --cc=sylvain@sylvaingarrigues.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).