mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf
* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (40 commits) pseries: Increase default NVRAM size target-ppc: Don't use hwaddr to represent hardware state PPC: e500: pci: Export slot2irq calculation PPC: E500plat: Make a lot of PCI slots available PPC: E500: Move PCI slot information into params PPC: E500: Generate dt pci irq map dynamically PPC: E500: PCI: Make IRQ calculation more generic PPC: E500: PCI: Make first slot qdev settable openpic: Accelerate pending irq search openpic: fix minor coding style issues MSI-X: Fix endianness PPC: e500: Declare pci bridge as bridge PPC: e500: Add MSI support openpic: add Shared MSI support openpic: make brr1 model specific openpic: convert to qdev openpic: remove irq_out openpic: rename openpic_t to OpenPICState openpic: convert simple reg operations to builtin bitops openpic: remove unused type variable ...
This commit is contained in:
commit
6d4e18925a
25 changed files with 1061 additions and 1026 deletions
35
hw/spapr.c
35
hw/spapr.c
|
@ -657,6 +657,36 @@ static void spapr_cpu_reset(void *opaque)
|
|||
(spapr->htab_shift - 18);
|
||||
}
|
||||
|
||||
static void spapr_create_nvram(sPAPREnvironment *spapr)
|
||||
{
|
||||
QemuOpts *machine_opts;
|
||||
DeviceState *dev;
|
||||
|
||||
dev = qdev_create(&spapr->vio_bus->bus, "spapr-nvram");
|
||||
|
||||
machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
|
||||
if (machine_opts) {
|
||||
const char *drivename;
|
||||
|
||||
drivename = qemu_opt_get(machine_opts, "nvram");
|
||||
if (drivename) {
|
||||
BlockDriverState *bs;
|
||||
|
||||
bs = bdrv_find(drivename);
|
||||
if (!bs) {
|
||||
fprintf(stderr, "No such block device \"%s\" for nvram\n",
|
||||
drivename);
|
||||
exit(1);
|
||||
}
|
||||
qdev_prop_set_drive_nofail(dev, "drive", bs);
|
||||
}
|
||||
}
|
||||
|
||||
qdev_init_nofail(dev);
|
||||
|
||||
spapr->nvram = (struct sPAPRNVRAM *)dev;
|
||||
}
|
||||
|
||||
/* Returns whether we want to use VGA or not */
|
||||
static int spapr_vga_init(PCIBus *pci_bus)
|
||||
{
|
||||
|
@ -801,7 +831,7 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
|
|||
|
||||
/* Set up Interrupt Controller */
|
||||
spapr->icp = xics_system_init(XICS_IRQS);
|
||||
spapr->next_irq = 16;
|
||||
spapr->next_irq = XICS_IRQ_BASE;
|
||||
|
||||
/* Set up EPOW events infrastructure */
|
||||
spapr_events_init(spapr);
|
||||
|
@ -818,6 +848,9 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
|
|||
}
|
||||
}
|
||||
|
||||
/* We always have at least the nvram device on VIO */
|
||||
spapr_create_nvram(spapr);
|
||||
|
||||
/* Set up PCI */
|
||||
spapr_pci_rtas_init();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue