Commit 7916e224 authored by bellard's avatar bellard

allow up to 256 MB of ram


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@307 c046a42c-6fe2-441c-8c8c-71466251a162
parent abd0aaff
...@@ -8,7 +8,7 @@ ENTRY(_start) ...@@ -8,7 +8,7 @@ ENTRY(_start)
SECTIONS SECTIONS
{ {
/* Read-only sections, merged into text segment: */ /* Read-only sections, merged into text segment: */
. = 0xa0000000 + SIZEOF_HEADERS; . = 0xa8000000 + SIZEOF_HEADERS;
.interp : { *(.interp) } .interp : { *(.interp) }
.hash : { *(.hash) } .hash : { *(.hash) }
.dynsym : { *(.dynsym) } .dynsym : { *(.dynsym) }
......
...@@ -56,7 +56,9 @@ ...@@ -56,7 +56,9 @@
//#define DEBUG_UNUSED_IOPORT //#define DEBUG_UNUSED_IOPORT
//#define DEBUG_IRQ_LATENCY //#define DEBUG_IRQ_LATENCY
#define PHYS_RAM_BASE 0xa8000000 #define PHYS_RAM_BASE 0xac000000
#define PHYS_RAM_MAX_SIZE (256 * 1024 * 1024)
#define KERNEL_LOAD_ADDR 0x00100000 #define KERNEL_LOAD_ADDR 0x00100000
#define INITRD_LOAD_ADDR 0x00400000 #define INITRD_LOAD_ADDR 0x00400000
#define KERNEL_PARAMS_ADDR 0x00090000 #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)
phys_ram_size = atoi(optarg) * 1024 * 1024; phys_ram_size = atoi(optarg) * 1024 * 1024;
if (phys_ram_size <= 0) if (phys_ram_size <= 0)
help(); help();
if (phys_ram_size > PHYS_RAM_MAX_SIZE) {
fprintf(stderr, "vl: at most %d MB RAM can be simulated\n",
PHYS_RAM_MAX_SIZE / (1024 * 1024));
exit(1);
}
break; break;
case 'd': case 'd':
loglevel = 1; loglevel = 1;
...@@ -2734,7 +2741,7 @@ int main(int argc, char **argv) ...@@ -2734,7 +2741,7 @@ int main(int argc, char **argv)
params->mount_root_rdonly = 0; params->mount_root_rdonly = 0;
params->cl_magic = 0xA33F; params->cl_magic = 0xA33F;
params->cl_offset = params->commandline - (uint8_t *)params; params->cl_offset = params->commandline - (uint8_t *)params;
params->ext_mem_k = (phys_ram_size / 1024) - 1024; params->alt_mem_k = (phys_ram_size / 1024) - 1024;
for(i = optind + 1; i < argc; i++) { for(i = optind + 1; i < argc; i++) {
if (i != optind + 1) if (i != optind + 1)
pstrcat(params->commandline, sizeof(params->commandline), " "); pstrcat(params->commandline, sizeof(params->commandline), " ");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment