2 * QEMU Sun4u/Sun4v System Emulator
4 * Copyright (c) 2005 Fabrice Bellard
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31 #include "qemu-timer.h"
34 #include "firmware_abi.h"
44 #define DPRINTF(fmt, ...) \
45 do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
47 #define DPRINTF(fmt, ...)
50 #define KERNEL_LOAD_ADDR 0x00404000
51 #define CMDLINE_ADDR 0x003ff000
52 #define INITRD_LOAD_ADDR 0x00300000
53 #define PROM_SIZE_MAX (4 * 1024 * 1024)
54 #define PROM_VADDR 0x000ffd00000ULL
55 #define APB_SPECIAL_BASE 0x1fe00000000ULL
56 #define APB_MEM_BASE 0x1ff00000000ULL
57 #define VGA_BASE (APB_MEM_BASE + 0x400000ULL)
58 #define PROM_FILENAME "openbios-sparc64"
59 #define NVRAM_SIZE 0x2000
61 #define BIOS_CFG_IOPORT 0x510
62 #define FW_CFG_SPARC64_WIDTH (FW_CFG_ARCH_LOCAL + 0x00)
63 #define FW_CFG_SPARC64_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01)
64 #define FW_CFG_SPARC64_DEPTH (FW_CFG_ARCH_LOCAL + 0x02)
68 #define TICK_INT_DIS 0x8000000000000000ULL
69 #define TICK_MAX 0x7fffffffffffffffULL
72 const char * const default_cpu_model
;
75 uint64_t console_serial_base
;
78 int DMA_get_channel_mode (int nchan
)
82 int DMA_read_memory (int nchan
, void *buf
, int pos
, int size
)
86 int DMA_write_memory (int nchan
, void *buf
, int pos
, int size
)
90 void DMA_hold_DREQ (int nchan
) {}
91 void DMA_release_DREQ (int nchan
) {}
92 void DMA_schedule(int nchan
) {}
93 void DMA_init (int high_page_enable
) {}
94 void DMA_register_channel (int nchan
,
95 DMA_transfer_handler transfer_handler
,
100 static int fw_cfg_boot_set(void *opaque
, const char *boot_device
)
102 fw_cfg_add_i16(opaque
, FW_CFG_BOOT_DEVICE
, boot_device
[0]);
106 static int sun4u_NVRAM_set_params (m48t59_t
*nvram
, uint16_t NVRAM_size
,
109 const char *boot_devices
,
110 uint32_t kernel_image
, uint32_t kernel_size
,
112 uint32_t initrd_image
, uint32_t initrd_size
,
113 uint32_t NVRAM_image
,
114 int width
, int height
, int depth
,
115 const uint8_t *macaddr
)
119 uint8_t image
[0x1ff0];
120 struct OpenBIOS_nvpart_v1
*part_header
;
122 memset(image
, '\0', sizeof(image
));
126 // OpenBIOS nvram variables
127 // Variable partition
128 part_header
= (struct OpenBIOS_nvpart_v1
*)&image
[start
];
129 part_header
->signature
= OPENBIOS_PART_SYSTEM
;
130 pstrcpy(part_header
->name
, sizeof(part_header
->name
), "system");
132 end
= start
+ sizeof(struct OpenBIOS_nvpart_v1
);
133 for (i
= 0; i
< nb_prom_envs
; i
++)
134 end
= OpenBIOS_set_var(image
, end
, prom_envs
[i
]);
139 end
= start
+ ((end
- start
+ 15) & ~15);
140 OpenBIOS_finish_partition(part_header
, end
- start
);
144 part_header
= (struct OpenBIOS_nvpart_v1
*)&image
[start
];
145 part_header
->signature
= OPENBIOS_PART_FREE
;
146 pstrcpy(part_header
->name
, sizeof(part_header
->name
), "free");
149 OpenBIOS_finish_partition(part_header
, end
- start
);
151 Sun_init_header((struct Sun_nvram
*)&image
[0x1fd8], macaddr
, 0x80);
153 for (i
= 0; i
< sizeof(image
); i
++)
154 m48t59_write(nvram
, i
, image
[i
]);
158 static unsigned long sun4u_load_kernel(const char *kernel_filename
,
159 const char *initrd_filename
,
160 ram_addr_t RAM_size
, long *initrd_size
)
166 linux_boot
= (kernel_filename
!= NULL
);
177 kernel_size
= load_elf(kernel_filename
, 0, NULL
, NULL
, NULL
,
180 kernel_size
= load_aout(kernel_filename
, KERNEL_LOAD_ADDR
,
181 RAM_size
- KERNEL_LOAD_ADDR
, bswap_needed
,
184 kernel_size
= load_image_targphys(kernel_filename
,
186 RAM_size
- KERNEL_LOAD_ADDR
);
187 if (kernel_size
< 0) {
188 fprintf(stderr
, "qemu: could not load kernel '%s'\n",
195 if (initrd_filename
) {
196 *initrd_size
= load_image_targphys(initrd_filename
,
198 RAM_size
- INITRD_LOAD_ADDR
);
199 if (*initrd_size
< 0) {
200 fprintf(stderr
, "qemu: could not load initial ram disk '%s'\n",
205 if (*initrd_size
> 0) {
206 for (i
= 0; i
< 64 * TARGET_PAGE_SIZE
; i
+= TARGET_PAGE_SIZE
) {
207 if (ldl_phys(KERNEL_LOAD_ADDR
+ i
) == 0x48647253) { // HdrS
208 stl_phys(KERNEL_LOAD_ADDR
+ i
+ 16, INITRD_LOAD_ADDR
);
209 stl_phys(KERNEL_LOAD_ADDR
+ i
+ 20, *initrd_size
);
218 void pic_info(Monitor
*mon
)
222 void irq_info(Monitor
*mon
)
226 void cpu_check_irqs(CPUState
*env
)
228 uint32_t pil
= env
->pil_in
| (env
->softint
& ~SOFTINT_TIMER
) |
229 ((env
->softint
& SOFTINT_TIMER
) << 14);
231 if (pil
&& (env
->interrupt_index
== 0 ||
232 (env
->interrupt_index
& ~15) == TT_EXTINT
)) {
235 for (i
= 15; i
> 0; i
--) {
236 if (pil
& (1 << i
)) {
237 int old_interrupt
= env
->interrupt_index
;
239 env
->interrupt_index
= TT_EXTINT
| i
;
240 if (old_interrupt
!= env
->interrupt_index
) {
241 DPRINTF("Set CPU IRQ %d\n", i
);
242 cpu_interrupt(env
, CPU_INTERRUPT_HARD
);
247 } else if (!pil
&& (env
->interrupt_index
& ~15) == TT_EXTINT
) {
248 DPRINTF("Reset CPU IRQ %d\n", env
->interrupt_index
& 15);
249 env
->interrupt_index
= 0;
250 cpu_reset_interrupt(env
, CPU_INTERRUPT_HARD
);
254 static void cpu_set_irq(void *opaque
, int irq
, int level
)
256 CPUState
*env
= opaque
;
259 DPRINTF("Raise CPU IRQ %d\n", irq
);
261 env
->pil_in
|= 1 << irq
;
264 DPRINTF("Lower CPU IRQ %d\n", irq
);
265 env
->pil_in
&= ~(1 << irq
);
270 typedef struct ResetData
{
275 static void main_cpu_reset(void *opaque
)
277 ResetData
*s
= (ResetData
*)opaque
;
278 CPUState
*env
= s
->env
;
279 static unsigned int nr_resets
;
282 env
->tick_cmpr
= TICK_INT_DIS
| 0;
283 ptimer_set_limit(env
->tick
, TICK_MAX
, 1);
284 ptimer_run(env
->tick
, 1);
285 env
->stick_cmpr
= TICK_INT_DIS
| 0;
286 ptimer_set_limit(env
->stick
, TICK_MAX
, 1);
287 ptimer_run(env
->stick
, 1);
288 env
->hstick_cmpr
= TICK_INT_DIS
| 0;
289 ptimer_set_limit(env
->hstick
, TICK_MAX
, 1);
290 ptimer_run(env
->hstick
, 1);
291 env
->gregs
[1] = 0; // Memory start
292 env
->gregs
[2] = ram_size
; // Memory size
293 env
->gregs
[3] = 0; // Machine description XXX
294 if (nr_resets
++ == 0) {
296 env
->pc
= s
->prom_addr
+ 0x20ULL
;
298 env
->pc
= s
->prom_addr
+ 0x40ULL
;
300 env
->npc
= env
->pc
+ 4;
303 static void tick_irq(void *opaque
)
305 CPUState
*env
= opaque
;
307 if (!(env
->tick_cmpr
& TICK_INT_DIS
)) {
308 env
->softint
|= SOFTINT_TIMER
;
309 cpu_interrupt(env
, CPU_INTERRUPT_TIMER
);
313 static void stick_irq(void *opaque
)
315 CPUState
*env
= opaque
;
317 if (!(env
->stick_cmpr
& TICK_INT_DIS
)) {
318 env
->softint
|= SOFTINT_STIMER
;
319 cpu_interrupt(env
, CPU_INTERRUPT_TIMER
);
323 static void hstick_irq(void *opaque
)
325 CPUState
*env
= opaque
;
327 if (!(env
->hstick_cmpr
& TICK_INT_DIS
)) {
328 cpu_interrupt(env
, CPU_INTERRUPT_TIMER
);
332 void cpu_tick_set_count(void *opaque
, uint64_t count
)
334 ptimer_set_count(opaque
, -count
);
337 uint64_t cpu_tick_get_count(void *opaque
)
339 return -ptimer_get_count(opaque
);
342 void cpu_tick_set_limit(void *opaque
, uint64_t limit
)
344 ptimer_set_limit(opaque
, -limit
, 0);
347 static void ebus_mmio_mapfunc(PCIDevice
*pci_dev
, int region_num
,
348 pcibus_t addr
, pcibus_t size
, int type
)
350 DPRINTF("Mapping region %d registers at %08x\n", region_num
, addr
);
351 switch (region_num
) {
353 isa_mmio_init(addr
, 0x1000000);
356 isa_mmio_init(addr
, 0x800000);
361 static void dummy_isa_irq_handler(void *opaque
, int n
, int level
)
365 /* EBUS (Eight bit bus) bridge */
367 pci_ebus_init(PCIBus
*bus
, int devfn
)
371 pci_create_simple(bus
, devfn
, "ebus");
372 isa_irq
= qemu_allocate_irqs(dummy_isa_irq_handler
, NULL
, 16);
373 isa_bus_irqs(isa_irq
);
377 pci_ebus_init1(PCIDevice
*s
)
379 isa_bus_new(&s
->qdev
);
381 pci_config_set_vendor_id(s
->config
, PCI_VENDOR_ID_SUN
);
382 pci_config_set_device_id(s
->config
, PCI_DEVICE_ID_SUN_EBUS
);
383 s
->config
[0x04] = 0x06; // command = bus master, pci mem
384 s
->config
[0x05] = 0x00;
385 s
->config
[0x06] = 0xa0; // status = fast back-to-back, 66MHz, no error
386 s
->config
[0x07] = 0x03; // status = medium devsel
387 s
->config
[0x08] = 0x01; // revision
388 s
->config
[0x09] = 0x00; // programming i/f
389 pci_config_set_class(s
->config
, PCI_CLASS_BRIDGE_OTHER
);
390 s
->config
[0x0D] = 0x0a; // latency_timer
391 s
->config
[PCI_HEADER_TYPE
] = PCI_HEADER_TYPE_NORMAL
; // header_type
393 pci_register_bar(s
, 0, 0x1000000, PCI_BASE_ADDRESS_SPACE_MEMORY
,
395 pci_register_bar(s
, 1, 0x800000, PCI_BASE_ADDRESS_SPACE_MEMORY
,
400 static PCIDeviceInfo ebus_info
= {
402 .qdev
.size
= sizeof(PCIDevice
),
403 .init
= pci_ebus_init1
,
406 static void pci_ebus_register(void)
408 pci_qdev_register(&ebus_info
);
411 device_init(pci_ebus_register
);
413 /* Boot PROM (OpenBIOS) */
414 static void prom_init(target_phys_addr_t addr
, const char *bios_name
)
421 dev
= qdev_create(NULL
, "openprom");
422 qdev_init_nofail(dev
);
423 s
= sysbus_from_qdev(dev
);
425 sysbus_mmio_map(s
, 0, addr
);
428 if (bios_name
== NULL
) {
429 bios_name
= PROM_FILENAME
;
431 filename
= qemu_find_file(QEMU_FILE_TYPE_BIOS
, bios_name
);
433 ret
= load_elf(filename
, addr
- PROM_VADDR
, NULL
, NULL
, NULL
,
435 if (ret
< 0 || ret
> PROM_SIZE_MAX
) {
436 ret
= load_image_targphys(filename
, addr
, PROM_SIZE_MAX
);
442 if (ret
< 0 || ret
> PROM_SIZE_MAX
) {
443 fprintf(stderr
, "qemu: could not load prom '%s'\n", bios_name
);
448 static int prom_init1(SysBusDevice
*dev
)
450 ram_addr_t prom_offset
;
452 prom_offset
= qemu_ram_alloc(PROM_SIZE_MAX
);
453 sysbus_init_mmio(dev
, PROM_SIZE_MAX
, prom_offset
| IO_MEM_ROM
);
457 static SysBusDeviceInfo prom_info
= {
459 .qdev
.name
= "openprom",
460 .qdev
.size
= sizeof(SysBusDevice
),
461 .qdev
.props
= (Property
[]) {
462 {/* end of property list */}
466 static void prom_register_devices(void)
468 sysbus_register_withprop(&prom_info
);
471 device_init(prom_register_devices
);
474 typedef struct RamDevice
481 static int ram_init1(SysBusDevice
*dev
)
483 ram_addr_t RAM_size
, ram_offset
;
484 RamDevice
*d
= FROM_SYSBUS(RamDevice
, dev
);
488 ram_offset
= qemu_ram_alloc(RAM_size
);
489 sysbus_init_mmio(dev
, RAM_size
, ram_offset
);
493 static void ram_init(target_phys_addr_t addr
, ram_addr_t RAM_size
)
500 dev
= qdev_create(NULL
, "memory");
501 s
= sysbus_from_qdev(dev
);
503 d
= FROM_SYSBUS(RamDevice
, s
);
505 qdev_init_nofail(dev
);
507 sysbus_mmio_map(s
, 0, addr
);
510 static SysBusDeviceInfo ram_info
= {
512 .qdev
.name
= "memory",
513 .qdev
.size
= sizeof(RamDevice
),
514 .qdev
.props
= (Property
[]) {
515 DEFINE_PROP_UINT64("size", RamDevice
, size
, 0),
516 DEFINE_PROP_END_OF_LIST(),
520 static void ram_register_devices(void)
522 sysbus_register_withprop(&ram_info
);
525 device_init(ram_register_devices
);
527 static CPUState
*cpu_devinit(const char *cpu_model
, const struct hwdef
*hwdef
)
531 ResetData
*reset_info
;
534 cpu_model
= hwdef
->default_cpu_model
;
535 env
= cpu_init(cpu_model
);
537 fprintf(stderr
, "Unable to find Sparc CPU definition\n");
540 bh
= qemu_bh_new(tick_irq
, env
);
541 env
->tick
= ptimer_init(bh
);
542 ptimer_set_period(env
->tick
, 1ULL);
544 bh
= qemu_bh_new(stick_irq
, env
);
545 env
->stick
= ptimer_init(bh
);
546 ptimer_set_period(env
->stick
, 1ULL);
548 bh
= qemu_bh_new(hstick_irq
, env
);
549 env
->hstick
= ptimer_init(bh
);
550 ptimer_set_period(env
->hstick
, 1ULL);
552 reset_info
= qemu_mallocz(sizeof(ResetData
));
553 reset_info
->env
= env
;
554 reset_info
->prom_addr
= hwdef
->prom_addr
;
555 qemu_register_reset(main_cpu_reset
, reset_info
);
560 static void sun4uv_init(ram_addr_t RAM_size
,
561 const char *boot_devices
,
562 const char *kernel_filename
, const char *kernel_cmdline
,
563 const char *initrd_filename
, const char *cpu_model
,
564 const struct hwdef
*hwdef
)
569 long initrd_size
, kernel_size
;
570 PCIBus
*pci_bus
, *pci_bus2
, *pci_bus3
;
572 DriveInfo
*hd
[MAX_IDE_BUS
* MAX_IDE_DEVS
];
573 DriveInfo
*fd
[MAX_FD
];
577 env
= cpu_devinit(cpu_model
, hwdef
);
580 ram_init(0, RAM_size
);
582 prom_init(hwdef
->prom_addr
, bios_name
);
585 irq
= qemu_allocate_irqs(cpu_set_irq
, env
, MAX_PILS
);
586 pci_bus
= pci_apb_init(APB_SPECIAL_BASE
, APB_MEM_BASE
, irq
, &pci_bus2
,
588 isa_mem_base
= VGA_BASE
;
589 pci_vga_init(pci_bus
, 0, 0);
591 // XXX Should be pci_bus3
592 pci_ebus_init(pci_bus
, -1);
595 if (hwdef
->console_serial_base
) {
596 serial_mm_init(hwdef
->console_serial_base
, 0, NULL
, 115200,
600 for(; i
< MAX_SERIAL_PORTS
; i
++) {
602 serial_isa_init(i
, serial_hds
[i
]);
606 for(i
= 0; i
< MAX_PARALLEL_PORTS
; i
++) {
607 if (parallel_hds
[i
]) {
608 parallel_init(i
, parallel_hds
[i
]);
612 for(i
= 0; i
< nb_nics
; i
++)
613 pci_nic_init_nofail(&nd_table
[i
], "ne2k_pci", NULL
);
615 if (drive_get_max_bus(IF_IDE
) >= MAX_IDE_BUS
) {
616 fprintf(stderr
, "qemu: too many IDE bus\n");
619 for(i
= 0; i
< MAX_IDE_BUS
* MAX_IDE_DEVS
; i
++) {
620 hd
[i
] = drive_get(IF_IDE
, i
/ MAX_IDE_DEVS
,
624 pci_cmd646_ide_init(pci_bus
, hd
, 1);
626 isa_create_simple("i8042");
627 for(i
= 0; i
< MAX_FD
; i
++) {
628 fd
[i
] = drive_get(IF_FLOPPY
, 0, i
);
631 nvram
= m48t59_init_isa(0x0074, NVRAM_SIZE
, 59);
634 kernel_size
= sun4u_load_kernel(kernel_filename
, initrd_filename
,
635 ram_size
, &initrd_size
);
637 sun4u_NVRAM_set_params(nvram
, NVRAM_SIZE
, "Sun4u", RAM_size
, boot_devices
,
638 KERNEL_LOAD_ADDR
, kernel_size
,
640 INITRD_LOAD_ADDR
, initrd_size
,
641 /* XXX: need an option to load a NVRAM image */
643 graphic_width
, graphic_height
, graphic_depth
,
644 (uint8_t *)&nd_table
[0].macaddr
);
646 fw_cfg
= fw_cfg_init(BIOS_CFG_IOPORT
, BIOS_CFG_IOPORT
+ 1, 0, 0);
647 fw_cfg_add_i32(fw_cfg
, FW_CFG_ID
, 1);
648 fw_cfg_add_i64(fw_cfg
, FW_CFG_RAM_SIZE
, (uint64_t)ram_size
);
649 fw_cfg_add_i16(fw_cfg
, FW_CFG_MACHINE_ID
, hwdef
->machine_id
);
650 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_ADDR
, KERNEL_LOAD_ADDR
);
651 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_SIZE
, kernel_size
);
652 if (kernel_cmdline
) {
653 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_CMDLINE
, CMDLINE_ADDR
);
654 pstrcpy_targphys("cmdline", CMDLINE_ADDR
, TARGET_PAGE_SIZE
, kernel_cmdline
);
656 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_CMDLINE
, 0);
658 fw_cfg_add_i32(fw_cfg
, FW_CFG_INITRD_ADDR
, INITRD_LOAD_ADDR
);
659 fw_cfg_add_i32(fw_cfg
, FW_CFG_INITRD_SIZE
, initrd_size
);
660 fw_cfg_add_i16(fw_cfg
, FW_CFG_BOOT_DEVICE
, boot_devices
[0]);
662 fw_cfg_add_i16(fw_cfg
, FW_CFG_SPARC64_WIDTH
, graphic_width
);
663 fw_cfg_add_i16(fw_cfg
, FW_CFG_SPARC64_HEIGHT
, graphic_height
);
664 fw_cfg_add_i16(fw_cfg
, FW_CFG_SPARC64_DEPTH
, graphic_depth
);
666 qemu_register_boot_set(fw_cfg_boot_set
, fw_cfg
);
675 static const struct hwdef hwdefs
[] = {
676 /* Sun4u generic PC-like machine */
678 .default_cpu_model
= "TI UltraSparc II",
679 .machine_id
= sun4u_id
,
680 .prom_addr
= 0x1fff0000000ULL
,
681 .console_serial_base
= 0,
683 /* Sun4v generic PC-like machine */
685 .default_cpu_model
= "Sun UltraSparc T1",
686 .machine_id
= sun4v_id
,
687 .prom_addr
= 0x1fff0000000ULL
,
688 .console_serial_base
= 0,
690 /* Sun4v generic Niagara machine */
692 .default_cpu_model
= "Sun UltraSparc T1",
693 .machine_id
= niagara_id
,
694 .prom_addr
= 0xfff0000000ULL
,
695 .console_serial_base
= 0xfff0c2c000ULL
,
699 /* Sun4u hardware initialisation */
700 static void sun4u_init(ram_addr_t RAM_size
,
701 const char *boot_devices
,
702 const char *kernel_filename
, const char *kernel_cmdline
,
703 const char *initrd_filename
, const char *cpu_model
)
705 sun4uv_init(RAM_size
, boot_devices
, kernel_filename
,
706 kernel_cmdline
, initrd_filename
, cpu_model
, &hwdefs
[0]);
709 /* Sun4v hardware initialisation */
710 static void sun4v_init(ram_addr_t RAM_size
,
711 const char *boot_devices
,
712 const char *kernel_filename
, const char *kernel_cmdline
,
713 const char *initrd_filename
, const char *cpu_model
)
715 sun4uv_init(RAM_size
, boot_devices
, kernel_filename
,
716 kernel_cmdline
, initrd_filename
, cpu_model
, &hwdefs
[1]);
719 /* Niagara hardware initialisation */
720 static void niagara_init(ram_addr_t RAM_size
,
721 const char *boot_devices
,
722 const char *kernel_filename
, const char *kernel_cmdline
,
723 const char *initrd_filename
, const char *cpu_model
)
725 sun4uv_init(RAM_size
, boot_devices
, kernel_filename
,
726 kernel_cmdline
, initrd_filename
, cpu_model
, &hwdefs
[2]);
729 static QEMUMachine sun4u_machine
= {
731 .desc
= "Sun4u platform",
733 .max_cpus
= 1, // XXX for now
737 static QEMUMachine sun4v_machine
= {
739 .desc
= "Sun4v platform",
741 .max_cpus
= 1, // XXX for now
744 static QEMUMachine niagara_machine
= {
746 .desc
= "Sun4v platform, Niagara",
747 .init
= niagara_init
,
748 .max_cpus
= 1, // XXX for now
751 static void sun4u_machine_init(void)
753 qemu_register_machine(&sun4u_machine
);
754 qemu_register_machine(&sun4v_machine
);
755 qemu_register_machine(&niagara_machine
);
758 machine_init(sun4u_machine_init
);