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
@@ -8,7 +8,7 @@ ENTRY(_start) | @@ -8,7 +8,7 @@ ENTRY(_start) | ||
8 | SECTIONS | 8 | SECTIONS |
9 | { | 9 | { |
10 | /* Read-only sections, merged into text segment: */ | 10 | /* Read-only sections, merged into text segment: */ |
11 | - . = 0xa0000000 + SIZEOF_HEADERS; | 11 | + . = 0xa8000000 + SIZEOF_HEADERS; |
12 | .interp : { *(.interp) } | 12 | .interp : { *(.interp) } |
13 | .hash : { *(.hash) } | 13 | .hash : { *(.hash) } |
14 | .dynsym : { *(.dynsym) } | 14 | .dynsym : { *(.dynsym) } |
vl.c
@@ -56,7 +56,9 @@ | @@ -56,7 +56,9 @@ | ||
56 | //#define DEBUG_UNUSED_IOPORT | 56 | //#define DEBUG_UNUSED_IOPORT |
57 | //#define DEBUG_IRQ_LATENCY | 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 | #define KERNEL_LOAD_ADDR 0x00100000 | 62 | #define KERNEL_LOAD_ADDR 0x00100000 |
61 | #define INITRD_LOAD_ADDR 0x00400000 | 63 | #define INITRD_LOAD_ADDR 0x00400000 |
62 | #define KERNEL_PARAMS_ADDR 0x00090000 | 64 | #define KERNEL_PARAMS_ADDR 0x00090000 |
@@ -2640,6 +2642,11 @@ int main(int argc, char **argv) | @@ -2640,6 +2642,11 @@ int main(int argc, char **argv) | ||
2640 | phys_ram_size = atoi(optarg) * 1024 * 1024; | 2642 | phys_ram_size = atoi(optarg) * 1024 * 1024; |
2641 | if (phys_ram_size <= 0) | 2643 | if (phys_ram_size <= 0) |
2642 | help(); | 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 | break; | 2650 | break; |
2644 | case 'd': | 2651 | case 'd': |
2645 | loglevel = 1; | 2652 | loglevel = 1; |
@@ -2734,7 +2741,7 @@ int main(int argc, char **argv) | @@ -2734,7 +2741,7 @@ int main(int argc, char **argv) | ||
2734 | params->mount_root_rdonly = 0; | 2741 | params->mount_root_rdonly = 0; |
2735 | params->cl_magic = 0xA33F; | 2742 | params->cl_magic = 0xA33F; |
2736 | params->cl_offset = params->commandline - (uint8_t *)params; | 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 | for(i = optind + 1; i < argc; i++) { | 2745 | for(i = optind + 1; i < argc; i++) { |
2739 | if (i != optind + 1) | 2746 | if (i != optind + 1) |
2740 | pstrcat(params->commandline, sizeof(params->commandline), " "); | 2747 | pstrcat(params->commandline, sizeof(params->commandline), " "); |