qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [6322] add a -vga none cli option (Stefano	Stabellini)
Date: Fri, 16 Jan 2009 12:36:33 -0600	[thread overview]
Message-ID: <4970D3B1.5070504@codemonkey.ws> (raw)
In-Reply-To: <49707765.3070706@eu.citrix.com>

Stefano Stabellini wrote:
> Jan Kiszka wrote:
>
>   
>> This hunk now generates:
>>
>> qemu/hw/pc.c: In function â¬Üpc_init1â¬":
>> qemu/hw/pc.c:762: warning: â¬Üvga_bios_offsetâ¬" may be used uninitialized in this function 
>>
>> For obvious reasons. Can we simply make the related
>> cpu_register_physical_memory conditional as well?
>>
>> Jan
>>
>>     
>
>
>
> You are right that patch caused variable initialization issues, this
> patch should fix them.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
> diff --git a/hw/pc.c b/hw/pc.c
> index d64e442..ff0f16d 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -759,7 +759,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
>  {
>      char buf[1024];
>      int ret, linux_boot, i;
> -    ram_addr_t ram_addr, vga_ram_addr, bios_offset, vga_bios_offset;
> +    ram_addr_t ram_addr, vga_ram_addr = 0x00, bios_offset, vga_bios_offset;
>      ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
>      int bios_size, isa_bios_size, vga_bios_size;
>      PCIBus *pci_bus;
> @@ -831,10 +831,6 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
>                                       ram_addr);
>      }
>  
> -
> -    /* allocate VGA RAM */
> -    vga_ram_addr = qemu_ram_alloc(vga_ram_size);
> -
>   

It's a little safer to leave this allocation in place because it 
maintains the 1-1 mapping of phys_ram_base and low memory.  
Unfortunately, I think there is still code that depends on this.

Regards,

Anthony Liguroi

  reply	other threads:[~2009-01-16 18:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 20:37 [Qemu-devel] [6322] add a -vga none cli option (Stefano Stabellini) Anthony Liguori
2009-01-16 10:03 ` [Qemu-devel] " Jan Kiszka
2009-01-16 12:02   ` Stefano Stabellini
2009-01-16 18:36     ` Anthony Liguori [this message]
2009-01-16 14:27   ` Anthony Liguori
2009-01-18 21:39 ` Sebastian Herbszt
2009-01-18 23:04   ` Daniel P. Berrange
2009-01-19 12:05     ` Stefano Stabellini

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=4970D3B1.5070504@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@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).