Revision ac41881b hw/core/loader.c
b/hw/core/loader.c | ||
---|---|---|
54 | 54 |
|
55 | 55 |
#include <zlib.h> |
56 | 56 |
|
57 |
bool option_rom_has_mr = false; |
|
57 | 58 |
bool rom_file_has_mr = true; |
58 | 59 |
|
59 | 60 |
static int roms_loaded; |
... | ... | |
642 | 643 |
} |
643 | 644 |
|
644 | 645 |
int rom_add_file(const char *file, const char *fw_dir, |
645 |
hwaddr addr, int32_t bootindex) |
|
646 |
hwaddr addr, int32_t bootindex, |
|
647 |
bool option_rom) |
|
646 | 648 |
{ |
647 | 649 |
Rom *rom; |
648 | 650 |
int rc, fd = -1; |
... | ... | |
694 | 696 |
basename); |
695 | 697 |
snprintf(devpath, sizeof(devpath), "/rom@%s", fw_file_name); |
696 | 698 |
|
697 |
if (rom_file_has_mr) { |
|
699 |
if ((!option_rom || option_rom_has_mr) && rom_file_has_mr) {
|
|
698 | 700 |
data = rom_set_mr(rom, OBJECT(fw_cfg), devpath); |
699 | 701 |
} else { |
700 | 702 |
data = rom->data; |
... | ... | |
773 | 775 |
|
774 | 776 |
int rom_add_vga(const char *file) |
775 | 777 |
{ |
776 |
return rom_add_file(file, "vgaroms", 0, -1); |
|
778 |
return rom_add_file(file, "vgaroms", 0, -1, true);
|
|
777 | 779 |
} |
778 | 780 |
|
779 | 781 |
int rom_add_option(const char *file, int32_t bootindex) |
780 | 782 |
{ |
781 |
return rom_add_file(file, "genroms", 0, bootindex); |
|
783 |
return rom_add_file(file, "genroms", 0, bootindex, true);
|
|
782 | 784 |
} |
783 | 785 |
|
784 | 786 |
static void rom_reset(void *unused) |
Also available in: Unified diff