aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorAnthony PERARD <anthony.perard@citrix.com>2011-04-11 19:48:11 +0100
committerAlexander Graf <agraf@suse.de>2011-05-08 10:10:00 +0200
commite0e7e67b455afa254356acdac1254653f6eed47b (patch)
tree6ff69bc3127b6d18f72f7e898a08168bf3893cdb /hw/pc.c
parent3285cf4fe78b4b83b70b9306cc97968b414a6e9d (diff)
downloadqemu-e0e7e67b455afa254356acdac1254653f6eed47b.zip
qemu-e0e7e67b455afa254356acdac1254653f6eed47b.tar.gz
qemu-e0e7e67b455afa254356acdac1254653f6eed47b.tar.bz2
pc_memory_init: Move memory calculation to the caller.
This patch moves above_4g_mem_size and below_4g_mem_size calculation in the caller of pc_memory_init (pc_init1). And the prototype of pc_memory_init is changed because there is no need anymore to have variable pointer and the ram_size parameter. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 6939c04..ebdf3b0 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -957,29 +957,18 @@ void pc_cpus_init(const char *cpu_model)
}
}
-void pc_memory_init(ram_addr_t ram_size,
- const char *kernel_filename,
+void pc_memory_init(const char *kernel_filename,
const char *kernel_cmdline,
const char *initrd_filename,
- ram_addr_t *below_4g_mem_size_p,
- ram_addr_t *above_4g_mem_size_p)
+ ram_addr_t below_4g_mem_size,
+ ram_addr_t above_4g_mem_size)
{
char *filename;
int ret, linux_boot, i;
ram_addr_t ram_addr, bios_offset, option_rom_offset;
- ram_addr_t below_4g_mem_size, above_4g_mem_size = 0;
int bios_size, isa_bios_size;
void *fw_cfg;
- if (ram_size >= 0xe0000000 ) {
- above_4g_mem_size = ram_size - 0xe0000000;
- below_4g_mem_size = 0xe0000000;
- } else {
- below_4g_mem_size = ram_size;
- }
- *above_4g_mem_size_p = above_4g_mem_size;
- *below_4g_mem_size_p = below_4g_mem_size;
-
linux_boot = (kernel_filename != NULL);
/* allocate RAM */