qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] get roms more room.


From: Glauber Costa
Subject: [Qemu-devel] [PATCH] get roms more room.
Date: Fri, 27 Mar 2009 14:37:36 -0300

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]