qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marty E. Plummer" <hanetzer@startmail.com>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Joel Stanley <joel@jms.id.au>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: qemu/powernv: coreboot support?
Date: Sun, 20 Oct 2019 11:32:55 -0500	[thread overview]
Message-ID: <20191020163254.sqgqnyqbjudyowyu@proprietary-killer> (raw)
In-Reply-To: <0a7cbd9b-2c46-259d-4e0d-9084ee2875a3@kaod.org>

On Sun, Oct 20, 2019 at 08:51:47AM +0200, Cédric Le Goater wrote:
> On 20/10/2019 08:28, David Gibson wrote:
> > Ok.  Note that the qemu emulated machine doesn't model the hardware
> > right down to the level of hostboot.  That's wy we're just loading
> > skiboot and jumping straight into it usually.  I guess clg's stuff to
> > load pnor images gets us a little closer to the hardware behaviour,
> > but I think it's still only a rough approximation.
> 
Yeah, but its useful enough to see that my rough understanding of ppc64
assembly is more/less correct (using the hostboot/skiboot sources as a
reference [both are elfv1] to write coreboot [I'm using elfv2] is a bit
fun)
> It's really tied to the OpenPOWER firmwares using the HIOMAP protocol
> to discuss with the BMC and load the flash. We could loosen how QEMU 
> interprets the MTD device and use a property to inform QEMU that this
> is an OpenPOWER  PNOR file and that skiboot and can be loaded from it.
> Something to discuss.
> 
Yeah, it would be useful to be able to use a non-pnor mtd device but
still get the hiomap behavior, because that's what I'll be dealing with
on real hardware.
> 
> I have applied this small hack to load larger -bios files :
>  
> --- qemu-powernv-4.2.git.orig/hw/ppc/pnv.c
> +++ qemu-powernv-4.2.git/hw/ppc/pnv.c
> @@ -58,7 +58,7 @@
>  
>  #define FW_FILE_NAME            "skiboot.lid"
>  #define FW_LOAD_ADDR            0x0
> -#define FW_MAX_SIZE             (4 * MiB)
> +#define FW_MAX_SIZE             (64 * MiB)
>  
Yeah, I did a similar hack after I realized I only did this hack to
version 4.1.0 and not the powernv-4.2 git version.
>  #define KERNEL_LOAD_ADDR        0x20000000
>  #define KERNEL_MAX_SIZE         (256 * MiB)
> 
> and coreboot.rom loads and boots and loops.
> 
> 
> You can use -d exec,in_asm to check what's going on.
> 
Ended up using -s -S and gdb'ing it. It loops because of endian issues
in the coreboot fmap implmentation. That needs to be fixed upstream.
> 
> C.


  reply	other threads:[~2019-10-20 16:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 17:28 qemu/powernv: coreboot support? Marty E. Plummer
2019-10-19 11:15 ` David Gibson
2019-10-19 12:28   ` Marty E. Plummer
2019-10-19 13:46 ` Cédric Le Goater
2019-10-19 15:31   ` Marty E. Plummer
2019-10-19 15:53     ` Cédric Le Goater
2019-10-19 16:09       ` Marty E. Plummer
2019-10-20  6:28         ` David Gibson
2019-10-20  6:51           ` Cédric Le Goater
2019-10-20 16:32             ` Marty E. Plummer [this message]
2019-10-21  5:34             ` David Gibson
2019-10-21 12:46               ` Cédric Le Goater
2019-10-22  0:32                 ` Marty E. Plummer
2019-10-22  1:40                   ` David Gibson
2019-10-22  2:17                     ` Marty E. Plummer
2019-10-22  7:55                       ` David Gibson
2019-10-22  7:58                   ` Cédric Le Goater
2019-10-23 21:41                     ` Marty E. Plummer
2019-10-19 18:51       ` Marty E. Plummer
2019-10-19 19:23       ` Marty E. Plummer
2019-10-20 19:48         ` Peter Maydell
2019-10-21  9:51           ` Philippe Mathieu-Daudé
2019-10-20  6:26     ` David Gibson
2019-10-20  6:24   ` David Gibson

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=20191020163254.sqgqnyqbjudyowyu@proprietary-killer \
    --to=hanetzer@startmail.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=joel@jms.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).