51 |
#include "vl.h" |
#include "vl.h" |
52 |
|
|
53 |
#define DEBUG_LOGFILE "/tmp/vl.log" |
#define DEBUG_LOGFILE "/tmp/vl.log" |
54 |
#define DEFAULT_NETWORK_SCRIPT "/etc/vl-ifup" |
#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup" |
55 |
#define BIOS_FILENAME "bios.bin" |
#define BIOS_FILENAME "bios.bin" |
56 |
#define VGABIOS_FILENAME "vgabios.bin" |
#define VGABIOS_FILENAME "vgabios.bin" |
57 |
|
|
205 |
|
|
206 |
#define MAX_IOPORTS 4096 |
#define MAX_IOPORTS 4096 |
207 |
|
|
208 |
static const char *interp_prefix = CONFIG_QEMU_PREFIX; |
static const char *bios_dir = CONFIG_QEMU_SHAREDIR; |
209 |
char phys_ram_file[1024]; |
char phys_ram_file[1024]; |
210 |
CPUX86State *global_env; |
CPUX86State *global_env; |
211 |
CPUX86State *cpu_single_env; |
CPUX86State *cpu_single_env; |
3547 |
gdbstub_port = atoi(optarg); |
gdbstub_port = atoi(optarg); |
3548 |
break; |
break; |
3549 |
case 'L': |
case 'L': |
3550 |
interp_prefix = optarg; |
bios_dir = optarg; |
3551 |
break; |
break; |
3552 |
} |
} |
3553 |
} |
} |
3693 |
/* RAW PC boot */ |
/* RAW PC boot */ |
3694 |
|
|
3695 |
/* BIOS load */ |
/* BIOS load */ |
3696 |
snprintf(buf, sizeof(buf), "%s/%s", interp_prefix, BIOS_FILENAME); |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
3697 |
ret = load_image(buf, phys_ram_base + 0x000f0000); |
ret = load_image(buf, phys_ram_base + 0x000f0000); |
3698 |
if (ret != 0x10000) { |
if (ret != 0x10000) { |
3699 |
fprintf(stderr, "vl: could not load PC bios '%s'\n", BIOS_FILENAME); |
fprintf(stderr, "vl: could not load PC bios '%s'\n", buf); |
3700 |
exit(1); |
exit(1); |
3701 |
} |
} |
3702 |
|
|
3703 |
/* VGA BIOS load */ |
/* VGA BIOS load */ |
3704 |
snprintf(buf, sizeof(buf), "%s/%s", interp_prefix, VGABIOS_FILENAME); |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME); |
3705 |
ret = load_image(buf, phys_ram_base + 0x000c0000); |
ret = load_image(buf, phys_ram_base + 0x000c0000); |
3706 |
|
|
3707 |
/* setup basic memory access */ |
/* setup basic memory access */ |