Commit 7916e2245d71aff10b48aab0ebdc754550c89539
1 parent
abd0aaff
allow up to 256 MB of ram
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@307 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
10 additions
and
3 deletions
i386-vl.ld
vl.c
... | ... | @@ -56,7 +56,9 @@ |
56 | 56 | //#define DEBUG_UNUSED_IOPORT |
57 | 57 | //#define DEBUG_IRQ_LATENCY |
58 | 58 | |
59 | -#define PHYS_RAM_BASE 0xa8000000 | |
59 | +#define PHYS_RAM_BASE 0xac000000 | |
60 | +#define PHYS_RAM_MAX_SIZE (256 * 1024 * 1024) | |
61 | + | |
60 | 62 | #define KERNEL_LOAD_ADDR 0x00100000 |
61 | 63 | #define INITRD_LOAD_ADDR 0x00400000 |
62 | 64 | #define KERNEL_PARAMS_ADDR 0x00090000 |
... | ... | @@ -2640,6 +2642,11 @@ int main(int argc, char **argv) |
2640 | 2642 | phys_ram_size = atoi(optarg) * 1024 * 1024; |
2641 | 2643 | if (phys_ram_size <= 0) |
2642 | 2644 | help(); |
2645 | + if (phys_ram_size > PHYS_RAM_MAX_SIZE) { | |
2646 | + fprintf(stderr, "vl: at most %d MB RAM can be simulated\n", | |
2647 | + PHYS_RAM_MAX_SIZE / (1024 * 1024)); | |
2648 | + exit(1); | |
2649 | + } | |
2643 | 2650 | break; |
2644 | 2651 | case 'd': |
2645 | 2652 | loglevel = 1; |
... | ... | @@ -2734,7 +2741,7 @@ int main(int argc, char **argv) |
2734 | 2741 | params->mount_root_rdonly = 0; |
2735 | 2742 | params->cl_magic = 0xA33F; |
2736 | 2743 | params->cl_offset = params->commandline - (uint8_t *)params; |
2737 | - params->ext_mem_k = (phys_ram_size / 1024) - 1024; | |
2744 | + params->alt_mem_k = (phys_ram_size / 1024) - 1024; | |
2738 | 2745 | for(i = optind + 1; i < argc; i++) { |
2739 | 2746 | if (i != optind + 1) |
2740 | 2747 | pstrcat(params->commandline, sizeof(params->commandline), " "); | ... | ... |