qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Andreas Färber" <andreas.faerber@web.de>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3 03/10] raven: move BIOS loading from board code to PCI host
Date: Mon, 23 Dec 2013 20:16:13 +0100	[thread overview]
Message-ID: <52B88BFD.6090607@reactos.org> (raw)
In-Reply-To: <CAFEAcA-M9Xt-__jT1BBK+d4n=HHh7MRrjucS-8qOw4tK26W04A@mail.gmail.com>

Peter Maydell a écrit :
> On 23 December 2013 06:48, Hervé Poussineau <hpoussin@reactos.org> wrote:
>> So, this patch is a small functional change, as it adds a copy of the
>> firmware in a new range 0xfff00000-0xfff7ffff, but I think we can live with
>> it.
>>
>> We'll be able to remove it once we switch to another firmware which uses the
>> right reset instruction pointer or whose size is 1MB.
>>
>>>> +    /* Open Hack'Ware hack: bios size is 512K and is loaded at
>>>> 0xfff00000.
>>>> +     * However, reset address is 0xfffffffc. Mirror the bios from
>>>> +     * 0xfff00000 to 0xfff80000.
>>>> +     */
>>>> +    memory_region_init_alias(bios, NULL, "bios-alias", sysmem,
>>>> 0xfff00000,
>>>> +                             0x00080000);
>>>> +    memory_region_add_subregion_overlap(sysmem, 0xfff80000, bios, 1);
> 
> This code creates the mirrored region regardless of the size of the
> firmware blob, right? I think that means that if we do supply a
> 1MB blob it'll do the wrong thing. You probably want to have some
> "mirror this object as many times as necessary to fill the space"
> logic.
> 
> We could probably do with having a generic MemoryRegion
> API for that, actually -- it's not uncommon behaviour for devices
> to be accessible every N bytes because they simply don't
> decode the full set of address lines.
> 
> memory_region_add_subregion_tiled(MemoryRegion *mr,
>                                  hwaddr offset, hwaddr tilelen,
>                                  MemoryRegion *subregion)
> 
> to add copies of subregion to container mr starting at offset
> for tilelen bytes, maybe? (we assume subregion to be created
> at the length that each 'tile' should be, so don't need to pass
> that too).

This hack is meant to exist only as long as OHW has not been replaced by 
something else. That's a hack which has to be used only for *current OHW 
firmware* (ie 512KB) and only for *a short time*. I've already patches 
to replace OHW by OpenBIOS, but some details need some more polish.

So, I don't want to invest too much time to polish this hack. Choose 
whatever you want, but I don't want to take more time to push this patchset.

If you really don't like it, I can provide a OHW image which is 1MB, so 
this hack becomes moot. It will be created by concatenating 2 512KB OHW 
images in a 1MB image.

Regards,

Hervé

  reply	other threads:[~2013-12-23 19:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04 23:09 [Qemu-devel] [PATCH v3 00/10] prep: improve Raven PCI host emulation Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 01/10] prep: kill get_system_io() usage Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 02/10] raven: use constant PCI_NUM_PINS instead of 4 Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 03/10] raven: move BIOS loading from board code to PCI host Hervé Poussineau
2013-12-23  1:05   ` Andreas Färber
2013-12-23  6:48     ` Hervé Poussineau
2013-12-23  6:48     ` Hervé Poussineau
2013-12-23 10:24       ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2013-12-23 18:13         ` Hervé Poussineau
2013-12-23 20:02           ` Andreas Färber
2013-12-23 21:54             ` Hervé Poussineau
2013-12-24  0:32               ` Alexander Graf
2013-12-24  2:02                 ` Andreas Färber
2013-12-24  6:32                   ` Hervé Poussineau
2013-12-29 16:28                   ` Alexander Graf
2013-12-24 14:06             ` Mark Cave-Ayland
2013-12-23 18:36       ` [Qemu-devel] " Peter Maydell
2013-12-23 19:16         ` Hervé Poussineau [this message]
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 04/10] raven: rename intack region to pci_intack Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 05/10] raven: set a correct PCI I/O memory region Hervé Poussineau
2014-03-13 17:09   ` Andreas Färber
2014-03-13 20:56     ` Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 06/10] raven: set a correct PCI " Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 07/10] raven: add PCI bus mastering address space Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 08/10] raven: implement non-contiguous I/O region Hervé Poussineau
2014-03-13 17:19   ` Andreas Färber
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 09/10] raven: fix PCI bus accesses with size > 1 Hervé Poussineau
2013-11-04 23:09 ` [Qemu-devel] [PATCH v3 10/10] raven: use raven_ for all function prefixes Hervé Poussineau
2013-12-23  0:52 ` [Qemu-devel] [PATCH v3 00/10] prep: improve Raven PCI host emulation Andreas Färber

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=52B88BFD.6090607@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=andreas.faerber@web.de \
    --cc=peter.maydell@linaro.org \
    --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).