Revision 44ae28f3 hw/pc.c
b/hw/pc.c | ||
---|---|---|
901 | 901 |
*above_4g_mem_size_p = above_4g_mem_size; |
902 | 902 |
*below_4g_mem_size_p = below_4g_mem_size; |
903 | 903 |
|
904 |
#if TARGET_PHYS_ADDR_BITS == 32 |
|
905 |
if (above_4g_mem_size > 0) { |
|
906 |
hw_error("To much RAM for 32-bit physical address"); |
|
907 |
} |
|
908 |
#endif |
|
904 | 909 |
linux_boot = (kernel_filename != NULL); |
905 | 910 |
|
906 | 911 |
/* allocate RAM */ |
907 |
ram_addr = qemu_ram_alloc(below_4g_mem_size); |
|
912 |
ram_addr = qemu_ram_alloc(below_4g_mem_size + above_4g_mem_size);
|
|
908 | 913 |
cpu_register_physical_memory(0, 0xa0000, ram_addr); |
909 | 914 |
cpu_register_physical_memory(0x100000, |
910 | 915 |
below_4g_mem_size - 0x100000, |
911 | 916 |
ram_addr + 0x100000); |
912 |
|
|
913 |
/* above 4giga memory allocation */ |
|
914 |
if (above_4g_mem_size > 0) { |
|
915 |
#if TARGET_PHYS_ADDR_BITS == 32 |
|
916 |
hw_error("To much RAM for 32-bit physical address"); |
|
917 |
#else |
|
918 |
ram_addr = qemu_ram_alloc(above_4g_mem_size); |
|
919 |
cpu_register_physical_memory(0x100000000ULL, |
|
920 |
above_4g_mem_size, |
|
921 |
ram_addr); |
|
917 |
#if TARGET_PHYS_ADDR_BITS > 32 |
|
918 |
cpu_register_physical_memory(0x100000000ULL, above_4g_mem_size, |
|
919 |
ram_addr + below_4g_mem_size); |
|
922 | 920 |
#endif |
923 |
} |
|
924 |
|
|
925 | 921 |
|
926 | 922 |
/* BIOS load */ |
927 | 923 |
if (bios_name == NULL) |
Also available in: Unified diff