pc_piix.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. /*
  2. * QEMU PC System Emulator
  3. *
  4. * Copyright (c) 2003-2004 Fabrice Bellard
  5. *
  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:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  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
  22. * THE SOFTWARE.
  23. */
  24. #include <glib.h>
  25. #include "hw.h"
  26. #include "pc.h"
  27. #include "apic.h"
  28. #include "pci/pci.h"
  29. #include "pci/pci_ids.h"
  30. #include "usb.h"
  31. #include "net.h"
  32. #include "boards.h"
  33. #include "ide.h"
  34. #include "kvm.h"
  35. #include "kvm/clock.h"
  36. #include "sysemu.h"
  37. #include "sysbus.h"
  38. #include "arch_init.h"
  39. #include "blockdev.h"
  40. #include "smbus.h"
  41. #include "xen.h"
  42. #include "memory.h"
  43. #include "exec-memory.h"
  44. #include "cpu.h"
  45. #ifdef CONFIG_XEN
  46. # include <xen/hvm/hvm_info_table.h>
  47. #endif
  48. #define MAX_IDE_BUS 2
  49. static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
  50. static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
  51. static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
  52. /* PC hardware initialisation */
  53. static void pc_init1(MemoryRegion *system_memory,
  54. MemoryRegion *system_io,
  55. ram_addr_t ram_size,
  56. const char *boot_device,
  57. const char *kernel_filename,
  58. const char *kernel_cmdline,
  59. const char *initrd_filename,
  60. const char *cpu_model,
  61. int pci_enabled,
  62. int kvmclock_enabled)
  63. {
  64. int i;
  65. ram_addr_t below_4g_mem_size, above_4g_mem_size;
  66. PCIBus *pci_bus;
  67. ISABus *isa_bus;
  68. PCII440FXState *i440fx_state;
  69. int piix3_devfn = -1;
  70. qemu_irq *cpu_irq;
  71. qemu_irq *gsi;
  72. qemu_irq *i8259;
  73. qemu_irq *smi_irq;
  74. GSIState *gsi_state;
  75. DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
  76. BusState *idebus[MAX_IDE_BUS];
  77. ISADevice *rtc_state;
  78. ISADevice *floppy;
  79. MemoryRegion *ram_memory;
  80. MemoryRegion *pci_memory;
  81. MemoryRegion *rom_memory;
  82. void *fw_cfg = NULL;
  83. pc_cpus_init(cpu_model);
  84. if (kvmclock_enabled) {
  85. kvmclock_create();
  86. }
  87. if (ram_size >= 0xe0000000 ) {
  88. above_4g_mem_size = ram_size - 0xe0000000;
  89. below_4g_mem_size = 0xe0000000;
  90. } else {
  91. above_4g_mem_size = 0;
  92. below_4g_mem_size = ram_size;
  93. }
  94. if (pci_enabled) {
  95. pci_memory = g_new(MemoryRegion, 1);
  96. memory_region_init(pci_memory, "pci", INT64_MAX);
  97. rom_memory = pci_memory;
  98. } else {
  99. pci_memory = NULL;
  100. rom_memory = system_memory;
  101. }
  102. /* allocate ram and load rom/bios */
  103. if (!xen_enabled()) {
  104. fw_cfg = pc_memory_init(system_memory,
  105. kernel_filename, kernel_cmdline, initrd_filename,
  106. below_4g_mem_size, above_4g_mem_size,
  107. rom_memory, &ram_memory);
  108. }
  109. gsi_state = g_malloc0(sizeof(*gsi_state));
  110. if (kvm_irqchip_in_kernel()) {
  111. kvm_pc_setup_irq_routing(pci_enabled);
  112. gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state,
  113. GSI_NUM_PINS);
  114. } else {
  115. gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
  116. }
  117. if (pci_enabled) {
  118. pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, gsi,
  119. system_memory, system_io, ram_size,
  120. below_4g_mem_size,
  121. 0x100000000ULL - below_4g_mem_size,
  122. 0x100000000ULL + above_4g_mem_size,
  123. (sizeof(hwaddr) == 4
  124. ? 0
  125. : ((uint64_t)1 << 62)),
  126. pci_memory, ram_memory);
  127. } else {
  128. pci_bus = NULL;
  129. i440fx_state = NULL;
  130. isa_bus = isa_bus_new(NULL, system_io);
  131. no_hpet = 1;
  132. }
  133. isa_bus_irqs(isa_bus, gsi);
  134. if (kvm_irqchip_in_kernel()) {
  135. i8259 = kvm_i8259_init(isa_bus);
  136. } else if (xen_enabled()) {
  137. i8259 = xen_interrupt_controller_init();
  138. } else {
  139. cpu_irq = pc_allocate_cpu_irq();
  140. i8259 = i8259_init(isa_bus, cpu_irq[0]);
  141. }
  142. for (i = 0; i < ISA_NUM_IRQS; i++) {
  143. gsi_state->i8259_irq[i] = i8259[i];
  144. }
  145. if (pci_enabled) {
  146. ioapic_init_gsi(gsi_state, "i440fx");
  147. }
  148. pc_register_ferr_irq(gsi[13]);
  149. pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
  150. if (xen_enabled()) {
  151. pci_create_simple(pci_bus, -1, "xen-platform");
  152. }
  153. /* init basic PC hardware */
  154. pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled());
  155. pc_nic_init(isa_bus, pci_bus);
  156. ide_drive_get(hd, MAX_IDE_BUS);
  157. if (pci_enabled) {
  158. PCIDevice *dev;
  159. if (xen_enabled()) {
  160. dev = pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1);
  161. } else {
  162. dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
  163. }
  164. idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
  165. idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
  166. } else {
  167. for(i = 0; i < MAX_IDE_BUS; i++) {
  168. ISADevice *dev;
  169. dev = isa_ide_init(isa_bus, ide_iobase[i], ide_iobase2[i],
  170. ide_irq[i],
  171. hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]);
  172. idebus[i] = qdev_get_child_bus(&dev->qdev, "ide.0");
  173. }
  174. }
  175. audio_init(isa_bus, pci_enabled ? pci_bus : NULL);
  176. pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device,
  177. floppy, idebus[0], idebus[1], rtc_state);
  178. if (pci_enabled && usb_enabled(false)) {
  179. pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci");
  180. }
  181. if (pci_enabled && acpi_enabled) {
  182. i2c_bus *smbus;
  183. smi_irq = qemu_allocate_irqs(pc_acpi_smi_interrupt, first_cpu, 1);
  184. /* TODO: Populate SPD eeprom data. */
  185. smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
  186. gsi[9], *smi_irq,
  187. kvm_enabled(), fw_cfg);
  188. smbus_eeprom_init(smbus, 8, NULL, 0);
  189. }
  190. if (pci_enabled) {
  191. pc_pci_device_init(pci_bus);
  192. }
  193. }
  194. static void pc_init_pci(QEMUMachineInitArgs *args)
  195. {
  196. ram_addr_t ram_size = args->ram_size;
  197. const char *cpu_model = args->cpu_model;
  198. const char *kernel_filename = args->kernel_filename;
  199. const char *kernel_cmdline = args->kernel_cmdline;
  200. const char *initrd_filename = args->initrd_filename;
  201. const char *boot_device = args->boot_device;
  202. pc_init1(get_system_memory(),
  203. get_system_io(),
  204. ram_size, boot_device,
  205. kernel_filename, kernel_cmdline,
  206. initrd_filename, cpu_model, 1, 1);
  207. }
  208. static void pc_init_pci_1_3(QEMUMachineInitArgs *args)
  209. {
  210. enable_kvm_pv_eoi();
  211. pc_init_pci(args);
  212. }
  213. static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
  214. {
  215. ram_addr_t ram_size = args->ram_size;
  216. const char *cpu_model = args->cpu_model;
  217. const char *kernel_filename = args->kernel_filename;
  218. const char *kernel_cmdline = args->kernel_cmdline;
  219. const char *initrd_filename = args->initrd_filename;
  220. const char *boot_device = args->boot_device;
  221. pc_init1(get_system_memory(),
  222. get_system_io(),
  223. ram_size, boot_device,
  224. kernel_filename, kernel_cmdline,
  225. initrd_filename, cpu_model, 1, 0);
  226. }
  227. static void pc_init_isa(QEMUMachineInitArgs *args)
  228. {
  229. ram_addr_t ram_size = args->ram_size;
  230. const char *cpu_model = args->cpu_model;
  231. const char *kernel_filename = args->kernel_filename;
  232. const char *kernel_cmdline = args->kernel_cmdline;
  233. const char *initrd_filename = args->initrd_filename;
  234. const char *boot_device = args->boot_device;
  235. if (cpu_model == NULL)
  236. cpu_model = "486";
  237. pc_init1(get_system_memory(),
  238. get_system_io(),
  239. ram_size, boot_device,
  240. kernel_filename, kernel_cmdline,
  241. initrd_filename, cpu_model, 0, 1);
  242. }
  243. #ifdef CONFIG_XEN
  244. static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
  245. {
  246. if (xen_hvm_init() != 0) {
  247. hw_error("xen hardware virtual machine initialisation failed");
  248. }
  249. pc_init_pci_no_kvmclock(args);
  250. xen_vcpu_init();
  251. }
  252. #endif
  253. static QEMUMachine pc_machine_v1_4 = {
  254. .name = "pc-1.4",
  255. .alias = "pc",
  256. .desc = "Standard PC",
  257. .init = pc_init_pci_1_3,
  258. .max_cpus = 255,
  259. .is_default = 1,
  260. };
  261. #define PC_COMPAT_1_3 \
  262. {\
  263. .driver = "usb-tablet",\
  264. .property = "usb_version",\
  265. .value = stringify(1),\
  266. }
  267. static QEMUMachine pc_machine_v1_3 = {
  268. .name = "pc-1.3",
  269. .desc = "Standard PC",
  270. .init = pc_init_pci_1_3,
  271. .max_cpus = 255,
  272. .compat_props = (GlobalProperty[]) {
  273. PC_COMPAT_1_3,
  274. { /* end of list */ }
  275. },
  276. };
  277. #define PC_COMPAT_1_2 \
  278. PC_COMPAT_1_3,\
  279. {\
  280. .driver = "nec-usb-xhci",\
  281. .property = "msi",\
  282. .value = "off",\
  283. },{\
  284. .driver = "nec-usb-xhci",\
  285. .property = "msix",\
  286. .value = "off",\
  287. },{\
  288. .driver = "ivshmem",\
  289. .property = "use64",\
  290. .value = "0",\
  291. },{\
  292. .driver = "qxl",\
  293. .property = "revision",\
  294. .value = stringify(3),\
  295. },{\
  296. .driver = "qxl-vga",\
  297. .property = "revision",\
  298. .value = stringify(3),\
  299. },{\
  300. .driver = "VGA",\
  301. .property = "mmio",\
  302. .value = "off",\
  303. }
  304. static QEMUMachine pc_machine_v1_2 = {
  305. .name = "pc-1.2",
  306. .desc = "Standard PC",
  307. .init = pc_init_pci,
  308. .max_cpus = 255,
  309. .compat_props = (GlobalProperty[]) {
  310. PC_COMPAT_1_2,
  311. { /* end of list */ }
  312. },
  313. };
  314. #define PC_COMPAT_1_1 \
  315. PC_COMPAT_1_2,\
  316. {\
  317. .driver = "virtio-scsi-pci",\
  318. .property = "hotplug",\
  319. .value = "off",\
  320. },{\
  321. .driver = "virtio-scsi-pci",\
  322. .property = "param_change",\
  323. .value = "off",\
  324. },{\
  325. .driver = "VGA",\
  326. .property = "vgamem_mb",\
  327. .value = stringify(8),\
  328. },{\
  329. .driver = "vmware-svga",\
  330. .property = "vgamem_mb",\
  331. .value = stringify(8),\
  332. },{\
  333. .driver = "qxl-vga",\
  334. .property = "vgamem_mb",\
  335. .value = stringify(8),\
  336. },{\
  337. .driver = "qxl",\
  338. .property = "vgamem_mb",\
  339. .value = stringify(8),\
  340. },{\
  341. .driver = "virtio-blk-pci",\
  342. .property = "config-wce",\
  343. .value = "off",\
  344. }
  345. static QEMUMachine pc_machine_v1_1 = {
  346. .name = "pc-1.1",
  347. .desc = "Standard PC",
  348. .init = pc_init_pci,
  349. .max_cpus = 255,
  350. .compat_props = (GlobalProperty[]) {
  351. PC_COMPAT_1_1,
  352. { /* end of list */ }
  353. },
  354. };
  355. #define PC_COMPAT_1_0 \
  356. PC_COMPAT_1_1,\
  357. {\
  358. .driver = "pc-sysfw",\
  359. .property = "rom_only",\
  360. .value = stringify(1),\
  361. }, {\
  362. .driver = "isa-fdc",\
  363. .property = "check_media_rate",\
  364. .value = "off",\
  365. }, {\
  366. .driver = "virtio-balloon-pci",\
  367. .property = "class",\
  368. .value = stringify(PCI_CLASS_MEMORY_RAM),\
  369. },{\
  370. .driver = "apic",\
  371. .property = "vapic",\
  372. .value = "off",\
  373. },{\
  374. .driver = TYPE_USB_DEVICE,\
  375. .property = "full-path",\
  376. .value = "no",\
  377. }
  378. static QEMUMachine pc_machine_v1_0 = {
  379. .name = "pc-1.0",
  380. .desc = "Standard PC",
  381. .init = pc_init_pci,
  382. .max_cpus = 255,
  383. .compat_props = (GlobalProperty[]) {
  384. PC_COMPAT_1_0,
  385. { /* end of list */ }
  386. },
  387. .hw_version = "1.0",
  388. };
  389. #define PC_COMPAT_0_15 \
  390. PC_COMPAT_1_0
  391. static QEMUMachine pc_machine_v0_15 = {
  392. .name = "pc-0.15",
  393. .desc = "Standard PC",
  394. .init = pc_init_pci,
  395. .max_cpus = 255,
  396. .compat_props = (GlobalProperty[]) {
  397. PC_COMPAT_0_15,
  398. { /* end of list */ }
  399. },
  400. .hw_version = "0.15",
  401. };
  402. #define PC_COMPAT_0_14 \
  403. PC_COMPAT_0_15,\
  404. {\
  405. .driver = "virtio-blk-pci",\
  406. .property = "event_idx",\
  407. .value = "off",\
  408. },{\
  409. .driver = "virtio-serial-pci",\
  410. .property = "event_idx",\
  411. .value = "off",\
  412. },{\
  413. .driver = "virtio-net-pci",\
  414. .property = "event_idx",\
  415. .value = "off",\
  416. },{\
  417. .driver = "virtio-balloon-pci",\
  418. .property = "event_idx",\
  419. .value = "off",\
  420. }
  421. static QEMUMachine pc_machine_v0_14 = {
  422. .name = "pc-0.14",
  423. .desc = "Standard PC",
  424. .init = pc_init_pci,
  425. .max_cpus = 255,
  426. .compat_props = (GlobalProperty[]) {
  427. PC_COMPAT_0_14,
  428. {
  429. .driver = "qxl",
  430. .property = "revision",
  431. .value = stringify(2),
  432. },{
  433. .driver = "qxl-vga",
  434. .property = "revision",
  435. .value = stringify(2),
  436. },
  437. { /* end of list */ }
  438. },
  439. .hw_version = "0.14",
  440. };
  441. #define PC_COMPAT_0_13 \
  442. PC_COMPAT_0_14,\
  443. {\
  444. .driver = TYPE_PCI_DEVICE,\
  445. .property = "command_serr_enable",\
  446. .value = "off",\
  447. },{\
  448. .driver = "AC97",\
  449. .property = "use_broken_id",\
  450. .value = stringify(1),\
  451. }
  452. static QEMUMachine pc_machine_v0_13 = {
  453. .name = "pc-0.13",
  454. .desc = "Standard PC",
  455. .init = pc_init_pci_no_kvmclock,
  456. .max_cpus = 255,
  457. .compat_props = (GlobalProperty[]) {
  458. PC_COMPAT_0_13,
  459. {
  460. .driver = "virtio-9p-pci",
  461. .property = "vectors",
  462. .value = stringify(0),
  463. },{
  464. .driver = "VGA",
  465. .property = "rombar",
  466. .value = stringify(0),
  467. },{
  468. .driver = "vmware-svga",
  469. .property = "rombar",
  470. .value = stringify(0),
  471. },
  472. { /* end of list */ }
  473. },
  474. .hw_version = "0.13",
  475. };
  476. #define PC_COMPAT_0_12 \
  477. PC_COMPAT_0_13,\
  478. {\
  479. .driver = "virtio-serial-pci",\
  480. .property = "max_ports",\
  481. .value = stringify(1),\
  482. },{\
  483. .driver = "virtio-serial-pci",\
  484. .property = "vectors",\
  485. .value = stringify(0),\
  486. }
  487. static QEMUMachine pc_machine_v0_12 = {
  488. .name = "pc-0.12",
  489. .desc = "Standard PC",
  490. .init = pc_init_pci_no_kvmclock,
  491. .max_cpus = 255,
  492. .compat_props = (GlobalProperty[]) {
  493. PC_COMPAT_0_12,
  494. {
  495. .driver = "VGA",
  496. .property = "rombar",
  497. .value = stringify(0),
  498. },{
  499. .driver = "vmware-svga",
  500. .property = "rombar",
  501. .value = stringify(0),
  502. },
  503. { /* end of list */ }
  504. },
  505. .hw_version = "0.12",
  506. };
  507. #define PC_COMPAT_0_11 \
  508. PC_COMPAT_0_12,\
  509. {\
  510. .driver = "virtio-blk-pci",\
  511. .property = "vectors",\
  512. .value = stringify(0),\
  513. },{\
  514. .driver = TYPE_PCI_DEVICE,\
  515. .property = "rombar",\
  516. .value = stringify(0),\
  517. }
  518. static QEMUMachine pc_machine_v0_11 = {
  519. .name = "pc-0.11",
  520. .desc = "Standard PC, qemu 0.11",
  521. .init = pc_init_pci_no_kvmclock,
  522. .max_cpus = 255,
  523. .compat_props = (GlobalProperty[]) {
  524. PC_COMPAT_0_11,
  525. {
  526. .driver = "ide-drive",
  527. .property = "ver",
  528. .value = "0.11",
  529. },{
  530. .driver = "scsi-disk",
  531. .property = "ver",
  532. .value = "0.11",
  533. },
  534. { /* end of list */ }
  535. },
  536. .hw_version = "0.11",
  537. };
  538. static QEMUMachine pc_machine_v0_10 = {
  539. .name = "pc-0.10",
  540. .desc = "Standard PC, qemu 0.10",
  541. .init = pc_init_pci_no_kvmclock,
  542. .max_cpus = 255,
  543. .compat_props = (GlobalProperty[]) {
  544. PC_COMPAT_0_11,
  545. {
  546. .driver = "virtio-blk-pci",
  547. .property = "class",
  548. .value = stringify(PCI_CLASS_STORAGE_OTHER),
  549. },{
  550. .driver = "virtio-serial-pci",
  551. .property = "class",
  552. .value = stringify(PCI_CLASS_DISPLAY_OTHER),
  553. },{
  554. .driver = "virtio-net-pci",
  555. .property = "vectors",
  556. .value = stringify(0),
  557. },{
  558. .driver = "ide-drive",
  559. .property = "ver",
  560. .value = "0.10",
  561. },{
  562. .driver = "scsi-disk",
  563. .property = "ver",
  564. .value = "0.10",
  565. },
  566. { /* end of list */ }
  567. },
  568. .hw_version = "0.10",
  569. };
  570. static QEMUMachine isapc_machine = {
  571. .name = "isapc",
  572. .desc = "ISA-only PC",
  573. .init = pc_init_isa,
  574. .max_cpus = 1,
  575. .compat_props = (GlobalProperty[]) {
  576. {
  577. .driver = "pc-sysfw",
  578. .property = "rom_only",
  579. .value = stringify(1),
  580. },
  581. { /* end of list */ }
  582. },
  583. };
  584. #ifdef CONFIG_XEN
  585. static QEMUMachine xenfv_machine = {
  586. .name = "xenfv",
  587. .desc = "Xen Fully-virtualized PC",
  588. .init = pc_xen_hvm_init,
  589. .max_cpus = HVM_MAX_VCPUS,
  590. .default_machine_opts = "accel=xen",
  591. };
  592. #endif
  593. static void pc_machine_init(void)
  594. {
  595. qemu_register_machine(&pc_machine_v1_4);
  596. qemu_register_machine(&pc_machine_v1_3);
  597. qemu_register_machine(&pc_machine_v1_2);
  598. qemu_register_machine(&pc_machine_v1_1);
  599. qemu_register_machine(&pc_machine_v1_0);
  600. qemu_register_machine(&pc_machine_v0_15);
  601. qemu_register_machine(&pc_machine_v0_14);
  602. qemu_register_machine(&pc_machine_v0_13);
  603. qemu_register_machine(&pc_machine_v0_12);
  604. qemu_register_machine(&pc_machine_v0_11);
  605. qemu_register_machine(&pc_machine_v0_10);
  606. qemu_register_machine(&isapc_machine);
  607. #ifdef CONFIG_XEN
  608. qemu_register_machine(&xenfv_machine);
  609. #endif
  610. }
  611. machine_init(pc_machine_init);