Revision 1192dad8
b/hw/mips_malta.c | ||
---|---|---|
791 | 791 |
|
792 | 792 |
/* Load a BIOS image unless a kernel image has been specified. */ |
793 | 793 |
if (!kernel_filename) { |
794 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
794 |
if (bios_name == NULL) |
|
795 |
bios_name = BIOS_FILENAME; |
|
796 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
795 | 797 |
ret = load_image(buf, phys_ram_base + bios_offset); |
796 | 798 |
if (ret < 0 || ret > BIOS_SIZE) { |
797 | 799 |
fprintf(stderr, |
b/hw/mips_pica61.c | ||
---|---|---|
94 | 94 |
|
95 | 95 |
/* load a BIOS image */ |
96 | 96 |
bios_offset = ram_size + vga_ram_size; |
97 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
97 |
if (bios_name == NULL) |
|
98 |
bios_name = BIOS_FILENAME; |
|
99 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
98 | 100 |
bios_size = load_image(buf, phys_ram_base + bios_offset); |
99 | 101 |
if ((bios_size <= 0) || (bios_size > BIOS_SIZE)) { |
100 | 102 |
/* fatal */ |
b/hw/mips_r4k.c | ||
---|---|---|
179 | 179 |
preloaded we also initialize the hardware, since the BIOS wasn't |
180 | 180 |
run. */ |
181 | 181 |
bios_offset = ram_size + vga_ram_size; |
182 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
182 |
if (bios_name == NULL) |
|
183 |
bios_name = BIOS_FILENAME; |
|
184 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
183 | 185 |
bios_size = load_image(buf, phys_ram_base + bios_offset); |
184 | 186 |
if ((bios_size > 0) && (bios_size <= BIOS_SIZE)) { |
185 | 187 |
cpu_register_physical_memory(0x1fc00000, |
b/hw/pc.c | ||
---|---|---|
706 | 706 |
vga_ram_addr = qemu_ram_alloc(vga_ram_size); |
707 | 707 |
|
708 | 708 |
/* BIOS load */ |
709 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
709 |
if (bios_name == NULL) |
|
710 |
bios_name = BIOS_FILENAME; |
|
711 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
710 | 712 |
bios_size = get_image_size(buf); |
711 | 713 |
if (bios_size <= 0 || |
712 | 714 |
(bios_size % 65536) != 0) { |
b/hw/ppc405_boards.c | ||
---|---|---|
236 | 236 |
#ifdef DEBUG_BOARD_INIT |
237 | 237 |
printf("Load BIOS from file\n"); |
238 | 238 |
#endif |
239 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
239 |
if (bios_name == NULL) |
|
240 |
bios_name = BIOS_FILENAME; |
|
241 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
240 | 242 |
bios_size = load_image(buf, phys_ram_base + bios_offset); |
241 | 243 |
if (bios_size < 0 || bios_size > BIOS_SIZE) { |
242 | 244 |
fprintf(stderr, "qemu: could not load PowerPC bios '%s'\n", buf); |
... | ... | |
549 | 551 |
#ifdef DEBUG_BOARD_INIT |
550 | 552 |
printf("Load BIOS from file\n"); |
551 | 553 |
#endif |
552 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
554 |
if (bios_name == NULL) |
|
555 |
bios_name = BIOS_FILENAME; |
|
556 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
553 | 557 |
bios_size = load_image(buf, phys_ram_base + bios_offset); |
554 | 558 |
if (bios_size < 0 || bios_size > BIOS_SIZE) { |
555 | 559 |
fprintf(stderr, "qemu: could not load PowerPC bios '%s'\n", buf); |
b/hw/ppc_chrp.c | ||
---|---|---|
349 | 349 |
|
350 | 350 |
/* allocate and load BIOS */ |
351 | 351 |
bios_offset = ram_size + vga_ram_size; |
352 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
352 |
if (bios_name == NULL) |
|
353 |
bios_name = BIOS_FILENAME; |
|
354 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
353 | 355 |
bios_size = load_image(buf, phys_ram_base + bios_offset); |
354 | 356 |
if (bios_size < 0 || bios_size > BIOS_SIZE) { |
355 | 357 |
cpu_abort(env, "qemu: could not load PowerPC bios '%s'\n", buf); |
b/hw/ppc_prep.c | ||
---|---|---|
564 | 564 |
|
565 | 565 |
/* allocate and load BIOS */ |
566 | 566 |
bios_offset = ram_size + vga_ram_size; |
567 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); |
|
567 |
if (bios_name == NULL) |
|
568 |
bios_name = BIOS_FILENAME; |
|
569 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
568 | 570 |
bios_size = load_image(buf, phys_ram_base + bios_offset); |
569 | 571 |
if (bios_size < 0 || bios_size > BIOS_SIZE) { |
570 | 572 |
cpu_abort(env, "qemu: could not load PPC PREP bios '%s'\n", buf); |
b/hw/shix.c | ||
---|---|---|
83 | 83 |
cpu_register_physical_memory(0x0c000000, 0x01000000, 0x01004000); |
84 | 84 |
|
85 | 85 |
/* Load BIOS in 0 (and access it through P2, 0xA0000000) */ |
86 |
printf("%s: load BIOS '%s'\n", __func__, BIOS_FILENAME); |
|
87 |
ret = load_image(BIOS_FILENAME, phys_ram_base); |
|
86 |
if (bios_name == NULL) |
|
87 |
bios_name = BIOS_FILENAME; |
|
88 |
printf("%s: load BIOS '%s'\n", __func__, bios_name); |
|
89 |
ret = load_image(bios_name, phys_ram_base); |
|
88 | 90 |
if (ret < 0) { /* Check bios size */ |
89 | 91 |
fprintf(stderr, "ret=%d\n", ret); |
90 | 92 |
fprintf(stderr, "qemu: could not load SHIX bios '%s'\n", |
91 |
BIOS_FILENAME);
|
|
93 |
bios_name);
|
|
92 | 94 |
exit(1); |
93 | 95 |
} |
94 | 96 |
|
b/hw/sun4m.c | ||
---|---|---|
430 | 430 |
(PROM_SIZE_MAX + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK, |
431 | 431 |
prom_offset | IO_MEM_ROM); |
432 | 432 |
|
433 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, PROM_FILENAME); |
|
433 |
if (bios_name == NULL) |
|
434 |
bios_name = PROM_FILENAME; |
|
435 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
434 | 436 |
ret = load_elf(buf, PROM_PADDR - PROM_VADDR, NULL, NULL, NULL); |
435 | 437 |
if (ret < 0) { |
436 | 438 |
fprintf(stderr, "qemu: could not load prom '%s'\n", |
b/hw/sun4u.c | ||
---|---|---|
382 | 382 |
(PROM_SIZE_MAX + TARGET_PAGE_SIZE) & TARGET_PAGE_MASK, |
383 | 383 |
prom_offset | IO_MEM_ROM); |
384 | 384 |
|
385 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, PROM_FILENAME); |
|
385 |
if (bios_name == NULL) |
|
386 |
bios_name = PROM_FILENAME; |
|
387 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_name); |
|
386 | 388 |
ret = load_elf(buf, PROM_ADDR - PROM_VADDR, NULL, NULL, NULL); |
387 | 389 |
if (ret < 0) { |
388 | 390 |
fprintf(stderr, "qemu: could not load prom '%s'\n", |
b/vl.c | ||
---|---|---|
143 | 143 |
#define MAX_IOPORTS 65536 |
144 | 144 |
|
145 | 145 |
const char *bios_dir = CONFIG_QEMU_SHAREDIR; |
146 |
const char *bios_name = NULL; |
|
146 | 147 |
char phys_ram_file[1024]; |
147 | 148 |
void *ioport_opaque[MAX_IOPORTS]; |
148 | 149 |
IOPortReadFunc *ioport_read_table[3][MAX_IOPORTS]; |
... | ... | |
7149 | 7150 |
QEMU_OPTION_d, |
7150 | 7151 |
QEMU_OPTION_hdachs, |
7151 | 7152 |
QEMU_OPTION_L, |
7153 |
QEMU_OPTION_bios, |
|
7152 | 7154 |
QEMU_OPTION_no_code_copy, |
7153 | 7155 |
QEMU_OPTION_k, |
7154 | 7156 |
QEMU_OPTION_localtime, |
... | ... | |
7241 | 7243 |
{ "d", HAS_ARG, QEMU_OPTION_d }, |
7242 | 7244 |
{ "hdachs", HAS_ARG, QEMU_OPTION_hdachs }, |
7243 | 7245 |
{ "L", HAS_ARG, QEMU_OPTION_L }, |
7246 |
{ "bios", HAS_ARG, QEMU_OPTION_bios }, |
|
7244 | 7247 |
{ "no-code-copy", 0, QEMU_OPTION_no_code_copy }, |
7245 | 7248 |
#ifdef USE_KQEMU |
7246 | 7249 |
{ "no-kqemu", 0, QEMU_OPTION_no_kqemu }, |
... | ... | |
7887 | 7890 |
case QEMU_OPTION_L: |
7888 | 7891 |
bios_dir = optarg; |
7889 | 7892 |
break; |
7893 |
case QEMU_OPTION_bios: |
|
7894 |
bios_name = optarg; |
|
7895 |
break; |
|
7890 | 7896 |
case QEMU_OPTION_S: |
7891 | 7897 |
autostart = 0; |
7892 | 7898 |
break; |
b/vl.h | ||
---|---|---|
129 | 129 |
void hw_error(const char *fmt, ...); |
130 | 130 |
|
131 | 131 |
extern const char *bios_dir; |
132 |
extern const char *bios_name; |
|
132 | 133 |
|
133 | 134 |
extern int vm_running; |
134 | 135 |
extern const char *qemu_name; |
Also available in: Unified diff