qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu
@ 2009-12-22  9:25 Avi Kivity
  2009-12-22  9:35 ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2009-12-22  9:25 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

The first such option rom will load at address 0, which isn't very nice,
and the second will report a conflict and abort, which is horrible.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 hw/loader.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/loader.c b/hw/loader.c
index 2ceb8eb..c6bf0f1 100644
--- a/hw/loader.c
+++ b/hw/loader.c
@@ -654,6 +654,9 @@ int rom_load_all(void)
     Rom *rom;
 
     QTAILQ_FOREACH(rom, &roms, next) {
+        if (!rom->addr) {
+            continue;
+        }
         if (addr > rom->addr) {
             fprintf(stderr, "rom: requested regions overlap "
                     "(rom %s. free=0x" TARGET_FMT_plx
-- 
1.6.5.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu
  2009-12-22  9:25 [Qemu-devel] [PATCH master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu Avi Kivity
@ 2009-12-22  9:35 ` Aurelien Jarno
  2009-12-22  9:40   ` Avi Kivity
  0 siblings, 1 reply; 3+ messages in thread
From: Aurelien Jarno @ 2009-12-22  9:35 UTC (permalink / raw)
  To: Avi Kivity; +Cc: qemu-devel

On Tue, Dec 22, 2009 at 11:25:13AM +0200, Avi Kivity wrote:
> The first such option rom will load at address 0, which isn't very nice,
> and the second will report a conflict and abort, which is horrible.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
>  hw/loader.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/loader.c b/hw/loader.c
> index 2ceb8eb..c6bf0f1 100644
> --- a/hw/loader.c
> +++ b/hw/loader.c
> @@ -654,6 +654,9 @@ int rom_load_all(void)
>      Rom *rom;
>  
>      QTAILQ_FOREACH(rom, &roms, next) {
> +        if (!rom->addr) {
> +            continue;
> +        }

Some roms needs to be loaded at address 0, it's the case for example of
the arm versatile bootloader. Adding this code will break the board
emulation.

>          if (addr > rom->addr) {
>              fprintf(stderr, "rom: requested regions overlap "
>                      "(rom %s. free=0x" TARGET_FMT_plx
> -- 
> 1.6.5.3
> 
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu
  2009-12-22  9:35 ` Aurelien Jarno
@ 2009-12-22  9:40   ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-12-22  9:40 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

On 12/22/2009 11:35 AM, Aurelien Jarno wrote:
> On Tue, Dec 22, 2009 at 11:25:13AM +0200, Avi Kivity wrote:
>    
>> The first such option rom will load at address 0, which isn't very nice,
>> and the second will report a conflict and abort, which is horrible.
>>
>> Signed-off-by: Avi Kivity<avi@redhat.com>
>> ---
>>   hw/loader.c |    3 +++
>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/hw/loader.c b/hw/loader.c
>> index 2ceb8eb..c6bf0f1 100644
>> --- a/hw/loader.c
>> +++ b/hw/loader.c
>> @@ -654,6 +654,9 @@ int rom_load_all(void)
>>       Rom *rom;
>>
>>       QTAILQ_FOREACH(rom,&roms, next) {
>> +        if (!rom->addr) {
>> +            continue;
>> +        }
>>      
> Some roms needs to be loaded at address 0, it's the case for example of
> the arm versatile bootloader. Adding this code will break the board
> emulation.
>    

The idea of keying bios-loading or host-loading on address is broken 
(another instance of mixing control and data).  We need a separate 
control for this.  I'll leave this to the authors of the code as I can't 
make heads or tails of it.

-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-12-22  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22  9:25 [Qemu-devel] [PATCH master, stable-0.12] Don't load options roms intended to be loaded by the bios in qemu Avi Kivity
2009-12-22  9:35 ` Aurelien Jarno
2009-12-22  9:40   ` Avi Kivity

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).