Revision 7ffa4767
b/hw/pc.c | ||
---|---|---|
446 | 446 |
|
447 | 447 |
/* Generate an initial boot sector which sets state and jump to |
448 | 448 |
a specified vector */ |
449 |
static void generate_bootsect(uint8_t *option_rom,
|
|
449 |
static void generate_bootsect(target_phys_addr_t option_rom,
|
|
450 | 450 |
uint32_t gpr[8], uint16_t segs[6], uint16_t ip) |
451 | 451 |
{ |
452 | 452 |
uint8_t rom[512], *p, *reloc; |
... | ... | |
520 | 520 |
sum += rom[i]; |
521 | 521 |
rom[sizeof(rom) - 1] = -sum; |
522 | 522 |
|
523 |
memcpy(option_rom, rom, sizeof(rom));
|
|
523 |
cpu_physical_memory_write_rom(option_rom, rom, sizeof(rom));
|
|
524 | 524 |
} |
525 | 525 |
|
526 | 526 |
static long get_file_size(FILE *f) |
... | ... | |
537 | 537 |
return size; |
538 | 538 |
} |
539 | 539 |
|
540 |
static void load_linux(uint8_t *option_rom,
|
|
540 |
static void load_linux(target_phys_addr_t option_rom,
|
|
541 | 541 |
const char *kernel_filename, |
542 | 542 |
const char *initrd_filename, |
543 | 543 |
const char *kernel_cmdline) |
... | ... | |
909 | 909 |
oprom_area_size = 0x8000; |
910 | 910 |
|
911 | 911 |
if (linux_boot) { |
912 |
load_linux(phys_ram_base + option_rom_offset + oprom_area_size,
|
|
912 |
load_linux(0xc0000 + oprom_area_size,
|
|
913 | 913 |
kernel_filename, initrd_filename, kernel_cmdline); |
914 | 914 |
oprom_area_size += 2048; |
915 | 915 |
} |
Also available in: Unified diff