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
30 #include "qemu-timer.h"
33 #include "firmware_abi.h"
43 #define DPRINTF(fmt, ...) \
44 do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
46 #define DPRINTF(fmt, ...)
49 #define KERNEL_LOAD_ADDR 0x00404000
50 #define CMDLINE_ADDR 0x003ff000
51 #define INITRD_LOAD_ADDR 0x00300000
52 #define PROM_SIZE_MAX (4 * 1024 * 1024)
53 #define PROM_VADDR 0x000ffd00000ULL
54 #define APB_SPECIAL_BASE 0x1fe00000000ULL
55 #define APB_MEM_BASE 0x1ff00000000ULL
56 #define VGA_BASE (APB_MEM_BASE + 0x400000ULL)
57 #define PROM_FILENAME "openbios-sparc64"
58 #define NVRAM_SIZE 0x2000
60 #define BIOS_CFG_IOPORT 0x510
61 #define FW_CFG_SPARC64_WIDTH (FW_CFG_ARCH_LOCAL + 0x00)
62 #define FW_CFG_SPARC64_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01)
63 #define FW_CFG_SPARC64_DEPTH (FW_CFG_ARCH_LOCAL + 0x02)
67 #define TICK_INT_DIS 0x8000000000000000ULL
68 #define TICK_MAX 0x7fffffffffffffffULL
71 const char * const default_cpu_model
;
74 uint64_t console_serial_base
;
77 int DMA_get_channel_mode (int nchan
)
81 int DMA_read_memory (int nchan
, void *buf
, int pos
, int size
)
85 int DMA_write_memory (int nchan
, void *buf
, int pos
, int size
)
89 void DMA_hold_DREQ (int nchan
) {}
90 void DMA_release_DREQ (int nchan
) {}
91 void DMA_schedule(int nchan
) {}
92 void DMA_init (int high_page_enable
) {}
93 void DMA_register_channel (int nchan
,
94 DMA_transfer_handler transfer_handler
,
99 static int fw_cfg_boot_set(void *opaque
, const char *boot_device
)
101 fw_cfg_add_i16(opaque
, FW_CFG_BOOT_DEVICE
, boot_device
[0]);
105 static int sun4u_NVRAM_set_params (m48t59_t
*nvram
, uint16_t NVRAM_size
,
108 const char *boot_devices
,
109 uint32_t kernel_image
, uint32_t kernel_size
,
111 uint32_t initrd_image
, uint32_t initrd_size
,
112 uint32_t NVRAM_image
,
113 int width
, int height
, int depth
,
114 const uint8_t *macaddr
)
118 uint8_t image
[0x1ff0];
119 struct OpenBIOS_nvpart_v1
*part_header
;
121 memset(image
, '\0', sizeof(image
));
125 // OpenBIOS nvram variables
126 // Variable partition
127 part_header
= (struct OpenBIOS_nvpart_v1
*)&image
[start
];
128 part_header
->signature
= OPENBIOS_PART_SYSTEM
;
129 pstrcpy(part_header
->name
, sizeof(part_header
->name
), "system");
131 end
= start
+ sizeof(struct OpenBIOS_nvpart_v1
);
132 for (i
= 0; i
< nb_prom_envs
; i
++)
133 end
= OpenBIOS_set_var(image
, end
, prom_envs
[i
]);
138 end
= start
+ ((end
- start
+ 15) & ~15);
139 OpenBIOS_finish_partition(part_header
, end
- start
);
143 part_header
= (struct OpenBIOS_nvpart_v1
*)&image
[start
];
144 part_header
->signature
= OPENBIOS_PART_FREE
;
145 pstrcpy(part_header
->name
, sizeof(part_header
->name
), "free");
148 OpenBIOS_finish_partition(part_header
, end
- start
);
150 Sun_init_header((struct Sun_nvram
*)&image
[0x1fd8], macaddr
, 0x80);
152 for (i
= 0; i
< sizeof(image
); i
++)
153 m48t59_write(nvram
, i
, image
[i
]);
157 static unsigned long sun4u_load_kernel(const char *kernel_filename
,
158 const char *initrd_filename
,
159 ram_addr_t RAM_size
, long *initrd_size
)
165 linux_boot
= (kernel_filename
!= NULL
);
176 kernel_size
= load_elf(kernel_filename
, 0, NULL
, NULL
, NULL
,
179 kernel_size
= load_aout(kernel_filename
, KERNEL_LOAD_ADDR
,
180 RAM_size
- KERNEL_LOAD_ADDR
, bswap_needed
,
183 kernel_size
= load_image_targphys(kernel_filename
,
185 RAM_size
- KERNEL_LOAD_ADDR
);
186 if (kernel_size
< 0) {
187 fprintf(stderr
, "qemu: could not load kernel '%s'\n",
194 if (initrd_filename
) {
195 *initrd_size
= load_image_targphys(initrd_filename
,
197 RAM_size
- INITRD_LOAD_ADDR
);
198 if (*initrd_size
< 0) {
199 fprintf(stderr
, "qemu: could not load initial ram disk '%s'\n",
204 if (*initrd_size
> 0) {
205 for (i
= 0; i
< 64 * TARGET_PAGE_SIZE
; i
+= TARGET_PAGE_SIZE
) {
206 if (ldl_phys(KERNEL_LOAD_ADDR
+ i
) == 0x48647253) { // HdrS
207 stl_phys(KERNEL_LOAD_ADDR
+ i
+ 16, INITRD_LOAD_ADDR
);
208 stl_phys(KERNEL_LOAD_ADDR
+ i
+ 20, *initrd_size
);
217 void pic_info(Monitor
*mon
)
221 void irq_info(Monitor
*mon
)
225 void cpu_check_irqs(CPUState
*env
)
227 uint32_t pil
= env
->pil_in
| (env
->softint
& ~SOFTINT_TIMER
) |
228 ((env
->softint
& SOFTINT_TIMER
) << 14);
230 if (pil
&& (env
->interrupt_index
== 0 ||
231 (env
->interrupt_index
& ~15) == TT_EXTINT
)) {
234 for (i
= 15; i
> 0; i
--) {
235 if (pil
& (1 << i
)) {
236 int old_interrupt
= env
->interrupt_index
;
238 env
->interrupt_index
= TT_EXTINT
| i
;
239 if (old_interrupt
!= env
->interrupt_index
) {
240 DPRINTF("Set CPU IRQ %d\n", i
);
241 cpu_interrupt(env
, CPU_INTERRUPT_HARD
);
246 } else if (!pil
&& (env
->interrupt_index
& ~15) == TT_EXTINT
) {
247 DPRINTF("Reset CPU IRQ %d\n", env
->interrupt_index
& 15);
248 env
->interrupt_index
= 0;
249 cpu_reset_interrupt(env
, CPU_INTERRUPT_HARD
);
253 static void cpu_set_irq(void *opaque
, int irq
, int level
)
255 CPUState
*env
= opaque
;
258 DPRINTF("Raise CPU IRQ %d\n", irq
);
260 env
->pil_in
|= 1 << irq
;
263 DPRINTF("Lower CPU IRQ %d\n", irq
);
264 env
->pil_in
&= ~(1 << irq
);
269 typedef struct ResetData
{
274 static void main_cpu_reset(void *opaque
)
276 ResetData
*s
= (ResetData
*)opaque
;
277 CPUState
*env
= s
->env
;
278 static unsigned int nr_resets
;
281 env
->tick_cmpr
= TICK_INT_DIS
| 0;
282 ptimer_set_limit(env
->tick
, TICK_MAX
, 1);
283 ptimer_run(env
->tick
, 1);
284 env
->stick_cmpr
= TICK_INT_DIS
| 0;
285 ptimer_set_limit(env
->stick
, TICK_MAX
, 1);
286 ptimer_run(env
->stick
, 1);
287 env
->hstick_cmpr
= TICK_INT_DIS
| 0;
288 ptimer_set_limit(env
->hstick
, TICK_MAX
, 1);
289 ptimer_run(env
->hstick
, 1);
290 env
->gregs
[1] = 0; // Memory start
291 env
->gregs
[2] = ram_size
; // Memory size
292 env
->gregs
[3] = 0; // Machine description XXX
293 if (nr_resets
++ == 0) {
295 env
->pc
= s
->prom_addr
+ 0x20ULL
;
297 env
->pc
= s
->prom_addr
+ 0x40ULL
;
299 env
->npc
= env
->pc
+ 4;
302 static void tick_irq(void *opaque
)
304 CPUState
*env
= opaque
;
306 if (!(env
->tick_cmpr
& TICK_INT_DIS
)) {
307 env
->softint
|= SOFTINT_TIMER
;
308 cpu_interrupt(env
, CPU_INTERRUPT_TIMER
);
312 static void stick_irq(void *opaque
)
314 CPUState
*env
= opaque
;
316 if (!(env
->stick_cmpr
& TICK_INT_DIS
)) {
317 env
->softint
|= SOFTINT_STIMER
;
318 cpu_interrupt(env
, CPU_INTERRUPT_TIMER
);
322 static void hstick_irq(void *opaque
)
324 CPUState
*env
= opaque
;
326 if (!(env
->hstick_cmpr
& TICK_INT_DIS
)) {
327 cpu_interrupt(env
, CPU_INTERRUPT_TIMER
);
331 void cpu_tick_set_count(void *opaque
, uint64_t count
)
333 ptimer_set_count(opaque
, -count
);
336 uint64_t cpu_tick_get_count(void *opaque
)
338 return -ptimer_get_count(opaque
);
341 void cpu_tick_set_limit(void *opaque
, uint64_t limit
)
343 ptimer_set_limit(opaque
, -limit
, 0);
346 static void ebus_mmio_mapfunc(PCIDevice
*pci_dev
, int region_num
,
347 pcibus_t addr
, pcibus_t size
, int type
)
349 DPRINTF("Mapping region %d registers at %08x\n", region_num
, addr
);
350 switch (region_num
) {
352 isa_mmio_init(addr
, 0x1000000);
355 isa_mmio_init(addr
, 0x800000);
360 static void dummy_isa_irq_handler(void *opaque
, int n
, int level
)
364 /* EBUS (Eight bit bus) bridge */
366 pci_ebus_init(PCIBus
*bus
, int devfn
)
370 pci_create_simple(bus
, devfn
, "ebus");
371 isa_irq
= qemu_allocate_irqs(dummy_isa_irq_handler
, NULL
, 16);
372 isa_bus_irqs(isa_irq
);
376 pci_ebus_init1(PCIDevice
*s
)
378 isa_bus_new(&s
->qdev
);
380 pci_config_set_vendor_id(s
->config
, PCI_VENDOR_ID_SUN
);
381 pci_config_set_device_id(s
->config
, PCI_DEVICE_ID_SUN_EBUS
);
382 s
->config
[0x04] = 0x06; // command = bus master, pci mem
383 s
->config
[0x05] = 0x00;
384 s
->config
[0x06] = 0xa0; // status = fast back-to-back, 66MHz, no error
385 s
->config
[0x07] = 0x03; // status = medium devsel
386 s
->config
[0x08] = 0x01; // revision
387 s
->config
[0x09] = 0x00; // programming i/f
388 pci_config_set_class(s
->config
, PCI_CLASS_BRIDGE_OTHER
);
389 s
->config
[0x0D] = 0x0a; // latency_timer
390 s
->config
[PCI_HEADER_TYPE
] = PCI_HEADER_TYPE_NORMAL
; // header_type
392 pci_register_bar(s
, 0, 0x1000000, PCI_BASE_ADDRESS_SPACE_MEMORY
,
394 pci_register_bar(s
, 1, 0x800000, PCI_BASE_ADDRESS_SPACE_MEMORY
,
399 static PCIDeviceInfo ebus_info
= {
401 .qdev
.size
= sizeof(PCIDevice
),
402 .init
= pci_ebus_init1
,
405 static void pci_ebus_register(void)
407 pci_qdev_register(&ebus_info
);
410 device_init(pci_ebus_register
);
412 /* Boot PROM (OpenBIOS) */
413 static void prom_init(target_phys_addr_t addr
, const char *bios_name
)
420 dev
= qdev_create(NULL
, "openprom");
421 qdev_init_nofail(dev
);
422 s
= sysbus_from_qdev(dev
);
424 sysbus_mmio_map(s
, 0, addr
);
427 if (bios_name
== NULL
) {
428 bios_name
= PROM_FILENAME
;
430 filename
= qemu_find_file(QEMU_FILE_TYPE_BIOS
, bios_name
);
432 ret
= load_elf(filename
, addr
- PROM_VADDR
, NULL
, NULL
, NULL
,
434 if (ret
< 0 || ret
> PROM_SIZE_MAX
) {
435 ret
= load_image_targphys(filename
, addr
, PROM_SIZE_MAX
);
441 if (ret
< 0 || ret
> PROM_SIZE_MAX
) {
442 fprintf(stderr
, "qemu: could not load prom '%s'\n", bios_name
);
447 static int prom_init1(SysBusDevice
*dev
)
449 ram_addr_t prom_offset
;
451 prom_offset
= qemu_ram_alloc(PROM_SIZE_MAX
);
452 sysbus_init_mmio(dev
, PROM_SIZE_MAX
, prom_offset
| IO_MEM_ROM
);
456 static SysBusDeviceInfo prom_info
= {
458 .qdev
.name
= "openprom",
459 .qdev
.size
= sizeof(SysBusDevice
),
460 .qdev
.props
= (Property
[]) {
461 {/* end of property list */}
465 static void prom_register_devices(void)
467 sysbus_register_withprop(&prom_info
);
470 device_init(prom_register_devices
);
473 typedef struct RamDevice
480 static int ram_init1(SysBusDevice
*dev
)
482 ram_addr_t RAM_size
, ram_offset
;
483 RamDevice
*d
= FROM_SYSBUS(RamDevice
, dev
);
487 ram_offset
= qemu_ram_alloc(RAM_size
);
488 sysbus_init_mmio(dev
, RAM_size
, ram_offset
);
492 static void ram_init(target_phys_addr_t addr
, ram_addr_t RAM_size
)
499 dev
= qdev_create(NULL
, "memory");
500 s
= sysbus_from_qdev(dev
);
502 d
= FROM_SYSBUS(RamDevice
, s
);
504 qdev_init_nofail(dev
);
506 sysbus_mmio_map(s
, 0, addr
);
509 static SysBusDeviceInfo ram_info
= {
511 .qdev
.name
= "memory",
512 .qdev
.size
= sizeof(RamDevice
),
513 .qdev
.props
= (Property
[]) {
514 DEFINE_PROP_UINT64("size", RamDevice
, size
, 0),
515 DEFINE_PROP_END_OF_LIST(),
519 static void ram_register_devices(void)
521 sysbus_register_withprop(&ram_info
);
524 device_init(ram_register_devices
);
526 static CPUState
*cpu_devinit(const char *cpu_model
, const struct hwdef
*hwdef
)
530 ResetData
*reset_info
;
533 cpu_model
= hwdef
->default_cpu_model
;
534 env
= cpu_init(cpu_model
);
536 fprintf(stderr
, "Unable to find Sparc CPU definition\n");
539 bh
= qemu_bh_new(tick_irq
, env
);
540 env
->tick
= ptimer_init(bh
);
541 ptimer_set_period(env
->tick
, 1ULL);
543 bh
= qemu_bh_new(stick_irq
, env
);
544 env
->stick
= ptimer_init(bh
);
545 ptimer_set_period(env
->stick
, 1ULL);
547 bh
= qemu_bh_new(hstick_irq
, env
);
548 env
->hstick
= ptimer_init(bh
);
549 ptimer_set_period(env
->hstick
, 1ULL);
551 reset_info
= qemu_mallocz(sizeof(ResetData
));
552 reset_info
->env
= env
;
553 reset_info
->prom_addr
= hwdef
->prom_addr
;
554 qemu_register_reset(main_cpu_reset
, reset_info
);
559 static void sun4uv_init(ram_addr_t RAM_size
,
560 const char *boot_devices
,
561 const char *kernel_filename
, const char *kernel_cmdline
,
562 const char *initrd_filename
, const char *cpu_model
,
563 const struct hwdef
*hwdef
)
568 long initrd_size
, kernel_size
;
569 PCIBus
*pci_bus
, *pci_bus2
, *pci_bus3
;
571 DriveInfo
*hd
[MAX_IDE_BUS
* MAX_IDE_DEVS
];
572 DriveInfo
*fd
[MAX_FD
];
576 env
= cpu_devinit(cpu_model
, hwdef
);
579 ram_init(0, RAM_size
);
581 prom_init(hwdef
->prom_addr
, bios_name
);
584 irq
= qemu_allocate_irqs(cpu_set_irq
, env
, MAX_PILS
);
585 pci_bus
= pci_apb_init(APB_SPECIAL_BASE
, APB_MEM_BASE
, irq
, &pci_bus2
,
587 isa_mem_base
= VGA_BASE
;
588 pci_vga_init(pci_bus
, 0, 0);
590 // XXX Should be pci_bus3
591 pci_ebus_init(pci_bus
, -1);
594 if (hwdef
->console_serial_base
) {
595 serial_mm_init(hwdef
->console_serial_base
, 0, NULL
, 115200,
599 for(; i
< MAX_SERIAL_PORTS
; i
++) {
601 serial_isa_init(i
, serial_hds
[i
]);
605 for(i
= 0; i
< MAX_PARALLEL_PORTS
; i
++) {
606 if (parallel_hds
[i
]) {
607 parallel_init(i
, parallel_hds
[i
]);
611 for(i
= 0; i
< nb_nics
; i
++)
612 pci_nic_init_nofail(&nd_table
[i
], "ne2k_pci", NULL
);
614 if (drive_get_max_bus(IF_IDE
) >= MAX_IDE_BUS
) {
615 fprintf(stderr
, "qemu: too many IDE bus\n");
618 for(i
= 0; i
< MAX_IDE_BUS
* MAX_IDE_DEVS
; i
++) {
619 hd
[i
] = drive_get(IF_IDE
, i
/ MAX_IDE_DEVS
,
623 pci_cmd646_ide_init(pci_bus
, hd
, 1);
625 isa_create_simple("i8042");
626 for(i
= 0; i
< MAX_FD
; i
++) {
627 fd
[i
] = drive_get(IF_FLOPPY
, 0, i
);
630 nvram
= m48t59_init_isa(0x0074, NVRAM_SIZE
, 59);
633 kernel_size
= sun4u_load_kernel(kernel_filename
, initrd_filename
,
634 ram_size
, &initrd_size
);
636 sun4u_NVRAM_set_params(nvram
, NVRAM_SIZE
, "Sun4u", RAM_size
, boot_devices
,
637 KERNEL_LOAD_ADDR
, kernel_size
,
639 INITRD_LOAD_ADDR
, initrd_size
,
640 /* XXX: need an option to load a NVRAM image */
642 graphic_width
, graphic_height
, graphic_depth
,
643 (uint8_t *)&nd_table
[0].macaddr
);
645 fw_cfg
= fw_cfg_init(BIOS_CFG_IOPORT
, BIOS_CFG_IOPORT
+ 1, 0, 0);
646 fw_cfg_add_i32(fw_cfg
, FW_CFG_ID
, 1);
647 fw_cfg_add_i64(fw_cfg
, FW_CFG_RAM_SIZE
, (uint64_t)ram_size
);
648 fw_cfg_add_i16(fw_cfg
, FW_CFG_MACHINE_ID
, hwdef
->machine_id
);
649 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_ADDR
, KERNEL_LOAD_ADDR
);
650 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_SIZE
, kernel_size
);
651 if (kernel_cmdline
) {
652 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_CMDLINE
, CMDLINE_ADDR
);
653 pstrcpy_targphys("cmdline", CMDLINE_ADDR
, TARGET_PAGE_SIZE
, kernel_cmdline
);
655 fw_cfg_add_i32(fw_cfg
, FW_CFG_KERNEL_CMDLINE
, 0);
657 fw_cfg_add_i32(fw_cfg
, FW_CFG_INITRD_ADDR
, INITRD_LOAD_ADDR
);
658 fw_cfg_add_i32(fw_cfg
, FW_CFG_INITRD_SIZE
, initrd_size
);
659 fw_cfg_add_i16(fw_cfg
, FW_CFG_BOOT_DEVICE
, boot_devices
[0]);
661 fw_cfg_add_i16(fw_cfg
, FW_CFG_SPARC64_WIDTH
, graphic_width
);
662 fw_cfg_add_i16(fw_cfg
, FW_CFG_SPARC64_HEIGHT
, graphic_height
);
663 fw_cfg_add_i16(fw_cfg
, FW_CFG_SPARC64_DEPTH
, graphic_depth
);
665 qemu_register_boot_set(fw_cfg_boot_set
, fw_cfg
);
674 static const struct hwdef hwdefs
[] = {
675 /* Sun4u generic PC-like machine */
677 .default_cpu_model
= "TI UltraSparc II",
678 .machine_id
= sun4u_id
,
679 .prom_addr
= 0x1fff0000000ULL
,
680 .console_serial_base
= 0,
682 /* Sun4v generic PC-like machine */
684 .default_cpu_model
= "Sun UltraSparc T1",
685 .machine_id
= sun4v_id
,
686 .prom_addr
= 0x1fff0000000ULL
,
687 .console_serial_base
= 0,
689 /* Sun4v generic Niagara machine */
691 .default_cpu_model
= "Sun UltraSparc T1",
692 .machine_id
= niagara_id
,
693 .prom_addr
= 0xfff0000000ULL
,
694 .console_serial_base
= 0xfff0c2c000ULL
,
698 /* Sun4u hardware initialisation */
699 static void sun4u_init(ram_addr_t RAM_size
,
700 const char *boot_devices
,
701 const char *kernel_filename
, const char *kernel_cmdline
,
702 const char *initrd_filename
, const char *cpu_model
)
704 sun4uv_init(RAM_size
, boot_devices
, kernel_filename
,
705 kernel_cmdline
, initrd_filename
, cpu_model
, &hwdefs
[0]);
708 /* Sun4v hardware initialisation */
709 static void sun4v_init(ram_addr_t RAM_size
,
710 const char *boot_devices
,
711 const char *kernel_filename
, const char *kernel_cmdline
,
712 const char *initrd_filename
, const char *cpu_model
)
714 sun4uv_init(RAM_size
, boot_devices
, kernel_filename
,
715 kernel_cmdline
, initrd_filename
, cpu_model
, &hwdefs
[1]);
718 /* Niagara hardware initialisation */
719 static void niagara_init(ram_addr_t RAM_size
,
720 const char *boot_devices
,
721 const char *kernel_filename
, const char *kernel_cmdline
,
722 const char *initrd_filename
, const char *cpu_model
)
724 sun4uv_init(RAM_size
, boot_devices
, kernel_filename
,
725 kernel_cmdline
, initrd_filename
, cpu_model
, &hwdefs
[2]);
728 static QEMUMachine sun4u_machine
= {
730 .desc
= "Sun4u platform",
732 .max_cpus
= 1, // XXX for now
736 static QEMUMachine sun4v_machine
= {
738 .desc
= "Sun4v platform",
740 .max_cpus
= 1, // XXX for now
743 static QEMUMachine niagara_machine
= {
745 .desc
= "Sun4v platform, Niagara",
746 .init
= niagara_init
,
747 .max_cpus
= 1, // XXX for now
750 static void sun4u_machine_init(void)
752 qemu_register_machine(&sun4u_machine
);
753 qemu_register_machine(&sun4v_machine
);
754 qemu_register_machine(&niagara_machine
);
757 machine_init(sun4u_machine_init
);