Revision 5fafdf24 hw/sun4m.c
b/hw/sun4m.c | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
* QEMU Sun4m System Emulator |
3 |
*
|
|
3 |
* |
|
4 | 4 |
* Copyright (c) 2003-2005 Fabrice Bellard |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | 7 |
* of this software and associated documentation files (the "Software"), to deal |
8 | 8 |
* in the Software without restriction, including without limitation the rights |
... | ... | |
425 | 425 |
linux_boot = (kernel_filename != NULL); |
426 | 426 |
|
427 | 427 |
prom_offset = RAM_size + vram_size; |
428 |
cpu_register_physical_memory(PROM_ADDR,
|
|
429 |
(PROM_SIZE_MAX + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK,
|
|
428 |
cpu_register_physical_memory(PROM_ADDR, |
|
429 |
(PROM_SIZE_MAX + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK, |
|
430 | 430 |
prom_offset | IO_MEM_ROM); |
431 | 431 |
|
432 | 432 |
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, PROM_FILENAME); |
433 | 433 |
ret = load_elf(buf, 0, NULL, NULL, NULL); |
434 | 434 |
if (ret < 0) { |
435 |
fprintf(stderr, "qemu: could not load prom '%s'\n",
|
|
435 |
fprintf(stderr, "qemu: could not load prom '%s'\n", |
|
436 | 436 |
buf); |
437 | 437 |
exit(1); |
438 | 438 |
} |
... | ... | |
445 | 445 |
if (kernel_size < 0) |
446 | 446 |
kernel_size = load_image(kernel_filename, phys_ram_base + KERNEL_LOAD_ADDR); |
447 | 447 |
if (kernel_size < 0) { |
448 |
fprintf(stderr, "qemu: could not load kernel '%s'\n",
|
|
448 |
fprintf(stderr, "qemu: could not load kernel '%s'\n", |
|
449 | 449 |
kernel_filename); |
450 | 450 |
exit(1); |
451 | 451 |
} |
... | ... | |
455 | 455 |
if (initrd_filename) { |
456 | 456 |
initrd_size = load_image(initrd_filename, phys_ram_base + INITRD_LOAD_ADDR); |
457 | 457 |
if (initrd_size < 0) { |
458 |
fprintf(stderr, "qemu: could not load initial ram disk '%s'\n",
|
|
458 |
fprintf(stderr, "qemu: could not load initial ram disk '%s'\n", |
|
459 | 459 |
initrd_filename); |
460 | 460 |
exit(1); |
461 | 461 |
} |
Also available in: Unified diff