Commit 8a637d444387bbdb60eff803d321244487521c86
1 parent
909b69cf
Disable >4G ram support on 32-bit targets
If the target only has a 32-bit physical address space then the code to map >4G ram breaks horribly, and causes compiler warnings. Signed-off-by: Paul Brook <paul@codesourcery.com>
Showing
1 changed file
with
4 additions
and
0 deletions
hw/pc.c
| @@ -908,10 +908,14 @@ static void pc_init1(ram_addr_t ram_size, | @@ -908,10 +908,14 @@ static void pc_init1(ram_addr_t ram_size, | ||
| 908 | 908 | ||
| 909 | /* above 4giga memory allocation */ | 909 | /* above 4giga memory allocation */ |
| 910 | if (above_4g_mem_size > 0) { | 910 | if (above_4g_mem_size > 0) { |
| 911 | +#if TARGET_PHYS_ADDR_BITS == 32 | ||
| 912 | + hw_error("To much RAM for 32-bit physical address"); | ||
| 913 | +#else | ||
| 911 | ram_addr = qemu_ram_alloc(above_4g_mem_size); | 914 | ram_addr = qemu_ram_alloc(above_4g_mem_size); |
| 912 | cpu_register_physical_memory(0x100000000ULL, | 915 | cpu_register_physical_memory(0x100000000ULL, |
| 913 | above_4g_mem_size, | 916 | above_4g_mem_size, |
| 914 | ram_addr); | 917 | ram_addr); |
| 918 | +#endif | ||
| 915 | } | 919 | } |
| 916 | 920 | ||
| 917 | 921 |