diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2011-04-11 19:48:11 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-05-08 10:10:00 +0200 |
commit | e0e7e67b455afa254356acdac1254653f6eed47b (patch) | |
tree | 6ff69bc3127b6d18f72f7e898a08168bf3893cdb /hw/pc_piix.c | |
parent | 3285cf4fe78b4b83b70b9306cc97968b414a6e9d (diff) |
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_piix.c')
-rw-r--r-- | hw/pc_piix.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/pc_piix.c b/hw/pc_piix.c index a85214b7f1..23a6bfba2b 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -92,9 +92,17 @@ static void pc_init1(ram_addr_t ram_size, kvmclock_create(); } + if (ram_size >= 0xe0000000 ) { + above_4g_mem_size = ram_size - 0xe0000000; + below_4g_mem_size = 0xe0000000; + } else { + above_4g_mem_size = 0; + below_4g_mem_size = ram_size; + } + /* allocate ram and load rom/bios */ - pc_memory_init(ram_size, kernel_filename, kernel_cmdline, initrd_filename, - &below_4g_mem_size, &above_4g_mem_size); + pc_memory_init(kernel_filename, kernel_cmdline, initrd_filename, + below_4g_mem_size, above_4g_mem_size); cpu_irq = pc_allocate_cpu_irq(); i8259 = i8259_init(cpu_irq[0]); |