summaryrefslogtreecommitdiff
path: root/hw/ppc_prep.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-06-05 15:17:28 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-06-05 15:17:28 +0000
commitc0e564d53b8de4ec390ad632e9a6b9d401fe9ad8 (patch)
tree4b1e0bcf0babf3253cf2492b8b342d7e85159414 /hw/ppc_prep.c
parent384d887691a3b936e2703e2d9c01a1dc5294b8d9 (diff)
use new machine API
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1451 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/ppc_prep.c')
-rw-r--r--hw/ppc_prep.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 06951e542d..849635f6ca 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -510,10 +510,10 @@ extern CPUPPCState *global_env;
#define NVRAM_SIZE 0x2000
/* PowerPC PREP hardware initialisation */
-void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
- DisplayState *ds, const char **fd_filename, int snapshot,
- const char *kernel_filename, const char *kernel_cmdline,
- const char *initrd_filename)
+static void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
+ DisplayState *ds, const char **fd_filename, int snapshot,
+ const char *kernel_filename, const char *kernel_cmdline,
+ const char *initrd_filename)
{
char buf[1024];
m48t59_t *nvram;
@@ -650,4 +650,13 @@ void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
/* XXX: need an option to load a NVRAM image */
0,
graphic_width, graphic_height, graphic_depth);
+
+ /* Special port to get debug messages from Open-Firmware */
+ register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL);
}
+
+QEMUMachine prep_machine = {
+ "prep",
+ "PowerPC PREP platform",
+ ppc_prep_init,
+};