summaryrefslogtreecommitdiffstats
path: root/qemu/hw/alpha/dp264.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/hw/alpha/dp264.c')
-rw-r--r--qemu/hw/alpha/dp264.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/qemu/hw/alpha/dp264.c b/qemu/hw/alpha/dp264.c
index f86e7bb83..f1267b544 100644
--- a/qemu/hw/alpha/dp264.c
+++ b/qemu/hw/alpha/dp264.c
@@ -6,16 +6,21 @@
* that we need to emulate as well.
*/
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
#include "hw/hw.h"
#include "elf.h"
#include "hw/loader.h"
#include "hw/boards.h"
#include "alpha_sys.h"
+#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
#include "hw/timer/mc146818rtc.h"
#include "hw/ide.h"
#include "hw/timer/i8254.h"
#include "hw/char/serial.h"
+#include "qemu/cutils.h"
#define MAX_IDE_BUS 2
@@ -104,14 +109,14 @@ static void clipper_init(MachineState *machine)
palcode_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS,
bios_name ? bios_name : "palcode-clipper");
if (palcode_filename == NULL) {
- hw_error("no palcode provided\n");
+ error_report("no palcode provided");
exit(1);
}
size = load_elf(palcode_filename, cpu_alpha_superpage_to_phys,
NULL, &palcode_entry, &palcode_low, &palcode_high,
- 0, EM_ALPHA, 0);
+ 0, EM_ALPHA, 0, 0);
if (size < 0) {
- hw_error("could not load palcode '%s'\n", palcode_filename);
+ error_report("could not load palcode '%s'", palcode_filename);
exit(1);
}
g_free(palcode_filename);
@@ -129,9 +134,9 @@ static void clipper_init(MachineState *machine)
size = load_elf(kernel_filename, cpu_alpha_superpage_to_phys,
NULL, &kernel_entry, &kernel_low, &kernel_high,
- 0, EM_ALPHA, 0);
+ 0, EM_ALPHA, 0, 0);
if (size < 0) {
- hw_error("could not load kernel '%s'\n", kernel_filename);
+ error_report("could not load kernel '%s'", kernel_filename);
exit(1);
}
@@ -148,8 +153,8 @@ static void clipper_init(MachineState *machine)
initrd_size = get_image_size(initrd_filename);
if (initrd_size < 0) {
- hw_error("could not load initial ram disk '%s'\n",
- initrd_filename);
+ error_report("could not load initial ram disk '%s'",
+ initrd_filename);
exit(1);
}
@@ -168,17 +173,12 @@ static void clipper_init(MachineState *machine)
}
}
-static QEMUMachine clipper_machine = {
- .name = "clipper",
- .desc = "Alpha DP264/CLIPPER",
- .init = clipper_init,
- .max_cpus = 4,
- .is_default = 1,
-};
-
-static void clipper_machine_init(void)
+static void clipper_machine_init(MachineClass *mc)
{
- qemu_register_machine(&clipper_machine);
+ mc->desc = "Alpha DP264/CLIPPER";
+ mc->init = clipper_init;
+ mc->max_cpus = 4;
+ mc->is_default = 1;
}
-machine_init(clipper_machine_init);
+DEFINE_MACHINE("clipper", clipper_machine_init)