Commit c0e564d53b8de4ec390ad632e9a6b9d401fe9ad8

Authored by bellard
1 parent 384d8876

use new machine API


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1451 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 23 additions and 8 deletions
hw/ppc_prep.c
@@ -510,10 +510,10 @@ extern CPUPPCState *global_env; @@ -510,10 +510,10 @@ extern CPUPPCState *global_env;
510 #define NVRAM_SIZE 0x2000 510 #define NVRAM_SIZE 0x2000
511 511
512 /* PowerPC PREP hardware initialisation */ 512 /* PowerPC PREP hardware initialisation */
513 -void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,  
514 - DisplayState *ds, const char **fd_filename, int snapshot,  
515 - const char *kernel_filename, const char *kernel_cmdline,  
516 - const char *initrd_filename) 513 +static void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
  514 + DisplayState *ds, const char **fd_filename, int snapshot,
  515 + const char *kernel_filename, const char *kernel_cmdline,
  516 + const char *initrd_filename)
517 { 517 {
518 char buf[1024]; 518 char buf[1024];
519 m48t59_t *nvram; 519 m48t59_t *nvram;
@@ -650,4 +650,13 @@ void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device, @@ -650,4 +650,13 @@ void ppc_prep_init(int ram_size, int vga_ram_size, int boot_device,
650 /* XXX: need an option to load a NVRAM image */ 650 /* XXX: need an option to load a NVRAM image */
651 0, 651 0,
652 graphic_width, graphic_height, graphic_depth); 652 graphic_width, graphic_height, graphic_depth);
  653 +
  654 + /* Special port to get debug messages from Open-Firmware */
  655 + register_ioport_write(0x0F00, 4, 1, &PPC_debug_write, NULL);
653 } 656 }
  657 +
  658 +QEMUMachine prep_machine = {
  659 + "prep",
  660 + "PowerPC PREP platform",
  661 + ppc_prep_init,
  662 +};
hw/sun4m.c
@@ -203,10 +203,10 @@ uint32_t iommu_translate(uint32_t addr) @@ -203,10 +203,10 @@ uint32_t iommu_translate(uint32_t addr)
203 } 203 }
204 204
205 /* Sun4m hardware initialisation */ 205 /* Sun4m hardware initialisation */
206 -void sun4m_init(int ram_size, int vga_ram_size, int boot_device,  
207 - DisplayState *ds, const char **fd_filename, int snapshot,  
208 - const char *kernel_filename, const char *kernel_cmdline,  
209 - const char *initrd_filename) 206 +static void sun4m_init(int ram_size, int vga_ram_size, int boot_device,
  207 + DisplayState *ds, const char **fd_filename, int snapshot,
  208 + const char *kernel_filename, const char *kernel_cmdline,
  209 + const char *initrd_filename)
210 { 210 {
211 char buf[1024]; 211 char buf[1024];
212 int ret, linux_boot; 212 int ret, linux_boot;
@@ -283,3 +283,9 @@ void sun4m_init(int ram_size, int vga_ram_size, int boot_device, @@ -283,3 +283,9 @@ void sun4m_init(int ram_size, int vga_ram_size, int boot_device,
283 } 283 }
284 nvram_init(nvram, (uint8_t *)&nd_table[0].macaddr, kernel_cmdline, boot_device, ram_size, kernel_size, graphic_width, graphic_height, graphic_depth); 284 nvram_init(nvram, (uint8_t *)&nd_table[0].macaddr, kernel_cmdline, boot_device, ram_size, kernel_size, graphic_width, graphic_height, graphic_depth);
285 } 285 }
  286 +
  287 +QEMUMachine sun4m_machine = {
  288 + "sun4m",
  289 + "Sun4m platform",
  290 + sun4m_init,
  291 +};