From: Glauber Costa <glommer@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: [Qemu-devel] [PATCH] get roms more room.
Date: Fri, 27 Mar 2009 14:37:36 -0300 [thread overview]
Message-ID: <1238175456-9816-1-git-send-email-glommer@redhat.com> (raw)
This patch increases by 50 % the size available for option roms.
The main motivator is that some roms grew bigger than the 64k we
currently allocate for them (Hey, it's 2009!)
One example is the gpxe project, that produces some roms with 69k,
70k, etc. The space proposed by this patch actually makes it as
big as 84k. Probably still a fit for some time.
But there is no free lunch. This space must come from somewhere,
and we take it from vga rom space. Currently, our vga roms are
around 35k in size. With this patch, they will be limited to
44k, instead of 64k, which seems reasonable to me.
---
hw/pc.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index 69f25f3..f66bfdd 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -876,7 +876,7 @@ vga_bios_error:
}
/* setup basic memory access */
- cpu_register_physical_memory(0xc0000, 0x10000,
+ cpu_register_physical_memory(0xc0000, 0xb000,
vga_bios_offset | IO_MEM_ROM);
}
@@ -897,7 +897,7 @@ vga_bios_error:
option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE);
load_linux(phys_ram_base + option_rom_offset,
kernel_filename, initrd_filename, kernel_cmdline);
- cpu_register_physical_memory(0xd0000, TARGET_PAGE_SIZE,
+ cpu_register_physical_memory(0xcb000, TARGET_PAGE_SIZE,
option_rom_offset | IO_MEM_ROM);
offset = TARGET_PAGE_SIZE;
}
@@ -909,7 +909,7 @@ vga_bios_error:
option_rom[i]);
exit(1);
}
- if (size > (0x10000 - offset))
+ if (size > (0x15000 - offset))
goto option_rom_error;
option_rom_offset = qemu_ram_alloc(size);
ret = load_image(option_rom[i], phys_ram_base + option_rom_offset);
@@ -919,7 +919,7 @@ vga_bios_error:
exit(1);
}
size = (size + 4095) & ~4095;
- cpu_register_physical_memory(0xd0000 + offset,
+ cpu_register_physical_memory(0xcb000 + offset,
size, option_rom_offset | IO_MEM_ROM);
offset += size;
}
--
1.6.2
next reply other threads:[~2009-03-27 17:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 17:37 Glauber Costa [this message]
2009-03-27 20:29 ` [Qemu-devel] [PATCH] get roms more room Carl-Daniel Hailfinger
2009-03-27 20:45 ` Glauber Costa
2009-03-27 23:12 ` Carl-Daniel Hailfinger
2009-03-27 23:43 ` Glauber Costa
-- strict thread matches above, loose matches on Subject: below --
2009-03-27 23:48 Glauber Costa
2009-03-28 1:58 ` Carl-Daniel Hailfinger
2009-03-28 4:19 ` Glauber Costa
2009-03-28 4:25 Glauber Costa
2009-03-28 8:51 ` Carl-Daniel Hailfinger
2009-03-28 17:30 ` Anthony Liguori
2009-03-28 22:25 ` Glauber Costa
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=1238175456-9816-1-git-send-email-glommer@redhat.com \
--to=glommer@redhat.com \
--cc=aliguori@us.ibm.com \
--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).