Revision f28359d8
b/hw/spapr.c | ||
---|---|---|
45 | 45 |
#include "kvm.h" |
46 | 46 |
#include "kvm_ppc.h" |
47 | 47 |
#include "pci.h" |
48 |
#include "vga-pci.h" |
|
48 | 49 |
|
49 | 50 |
#include "exec-memory.h" |
50 | 51 |
|
... | ... | |
82 | 83 |
#define PHANDLE_XICP 0x00001111 |
83 | 84 |
|
84 | 85 |
sPAPREnvironment *spapr; |
86 |
bool spapr_has_graphics; |
|
85 | 87 |
|
86 | 88 |
qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num, |
87 | 89 |
enum xics_irq_type type) |
... | ... | |
257 | 259 |
_FDT((fdt_property(fdt, "qemu,boot-kernel", &kprop, sizeof(kprop)))); |
258 | 260 |
} |
259 | 261 |
_FDT((fdt_property_string(fdt, "qemu,boot-device", boot_device))); |
262 |
_FDT((fdt_property_cell(fdt, "qemu,graphic-width", graphic_width))); |
|
263 |
_FDT((fdt_property_cell(fdt, "qemu,graphic-height", graphic_height))); |
|
264 |
_FDT((fdt_property_cell(fdt, "qemu,graphic-depth", graphic_depth))); |
|
260 | 265 |
|
261 | 266 |
_FDT((fdt_end_node(fdt))); |
262 | 267 |
|
... | ... | |
503 | 508 |
} |
504 | 509 |
} |
505 | 510 |
|
506 |
spapr_populate_chosen_stdout(fdt, spapr->vio_bus); |
|
511 |
if (!spapr_has_graphics) { |
|
512 |
spapr_populate_chosen_stdout(fdt, spapr->vio_bus); |
|
513 |
} |
|
507 | 514 |
|
508 | 515 |
_FDT((fdt_pack(fdt))); |
509 | 516 |
|
... | ... | |
556 | 563 |
cpu_reset(CPU(cpu)); |
557 | 564 |
} |
558 | 565 |
|
566 |
static int spapr_vga_init(PCIBus *pci_bus) |
|
567 |
{ |
|
568 |
if (std_vga_enabled) { |
|
569 |
pci_vga_init(pci_bus); |
|
570 |
} else { |
|
571 |
fprintf(stderr, "This vga model is not supported," |
|
572 |
"currently it only supports -vga std\n"); |
|
573 |
return 0; |
|
574 |
} |
|
575 |
return 1; |
|
576 |
} |
|
577 |
|
|
559 | 578 |
/* pSeries LPAR / sPAPR hardware init */ |
560 | 579 |
static void ppc_spapr_init(ram_addr_t ram_size, |
561 | 580 |
const char *boot_device, |
... | ... | |
710 | 729 |
spapr_vscsi_create(spapr->vio_bus); |
711 | 730 |
} |
712 | 731 |
|
732 |
/* Graphics */ |
|
733 |
if (spapr_vga_init(QLIST_FIRST(&spapr->phbs)->host_state.bus)) { |
|
734 |
spapr_has_graphics = true; |
|
735 |
} |
|
736 |
|
|
713 | 737 |
if (rma_size < (MIN_RMA_SLOF << 20)) { |
714 | 738 |
fprintf(stderr, "qemu: pSeries SLOF firmware requires >= " |
715 | 739 |
"%ldM guest RMA (Real Mode Area memory)\n", MIN_RMA_SLOF); |
Also available in: Unified diff