mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
ppc patch queue 2018-09-25
Here are the accumulated ppc target patches for the last several weeks. Highlights are: * A number of 40p / PReP cleanups * Preliminary irq rework on the pseries machine towards the new XIVE interrupt controller There are a few patches which make small changes to generic device and arm code as prerequisites to the 40p interrupt routing cleanup. They have acks from the relevant maintainers. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlup3PYACgkQbDjKyiDZ s5IcYQ//fp79LhIXUKfJuGasVg1K8X795s3nD8vZ76z7FV2kNyHvOCcTsLn0Ccrp WJLdXdZ0ErY87vJPfHckii9pXOX8J38nV5EFCElSLslx6gCndQZdQX2WY3luwIzq afiKMERwTkCcqFXXPgweijhhuAU+roay8xdO/ZBO52ogzGaZalTFjG4l9a0DZMSm ZceDrLrKw6GOaxntLptcn2+Ncuwpm0WSpLyL+bGNAzSAbqdn1dhHQ9UBrcSMteWj df8J7CX63CFL2MwbQE3RyXeKaomdHabG+QgEVMlS4dpXVUx++ciMtrwZTX1mMDlI DA9+5u6TcRMz34hN8lWk2O05scOVp8965BcfdeRBYAOTDS4ztiZJ9spKkIV0lHfe rkgo7F1OsqoQhs9QrLYp0zZYn1OIhHWrbhk/DQptCJMRHk8mct4v2FcyGecU0e1Z 7SlJErxHXmar83PCCJXhtYHthDxN+dTHUW0bbrF4IjysfK+poX5hvvFEjyHGPIJL duytwgEnnrBOFM7f7mdfH1LKeKzm1ji8nu7g2IsPAXC0xuFaq+d0fZWUWjymSPku k5k5UUPs8KLtP9XY2qhO0vxBWl5d+CTam19FWVqHjRAp5WqjmoLxWnkofupcT0Yv LcoHH2Ad9K8e0F4nA4UCYdJwfGH3qO+eBzmBR4+HZOuT1gVvRuw= =A62f -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20180925' into staging ppc patch queue 2018-09-25 Here are the accumulated ppc target patches for the last several weeks. Highlights are: * A number of 40p / PReP cleanups * Preliminary irq rework on the pseries machine towards the new XIVE interrupt controller There are a few patches which make small changes to generic device and arm code as prerequisites to the 40p interrupt routing cleanup. They have acks from the relevant maintainers. # gpg: Signature made Tue 25 Sep 2018 08:00:06 BST # gpg: using RSA key 6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-3.1-20180925: 40p: add fixed IRQ routing for LSI SCSI device lsi53c895a: add optional external IRQ via qdev scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline() scsi: add lsi53c8xx_handle_legacy_cmdline() function sm501: Adjust endianness of pixel value in rectangle fill spapr_pci: add an extra 'nr_msis' argument to spapr_populate_pci_dt spapr: increase the size of the IRQ number space spapr: introduce a spapr_irq class 'nr_msis' attribute 40p: use OR gate to wire up raven PCI interrupts raven: some minor IRQ-related tidy-ups hw/ppc: on 40p machine, change default firmware to OpenBIOS target/ppc/cpu-models: Re-group the 970 CPUs together again Record history of ppcemb target in common.json Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
506e4a00de
17 changed files with 117 additions and 69 deletions
|
@ -32,6 +32,7 @@
|
|||
#include "hw/pci/pci_host.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "hw/loader.h"
|
||||
#include "hw/or-irq.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "elf.h"
|
||||
|
||||
|
@ -55,7 +56,8 @@ typedef struct RavenPCIState {
|
|||
typedef struct PRePPCIState {
|
||||
PCIHostState parent_obj;
|
||||
|
||||
qemu_irq irq[PCI_NUM_PINS];
|
||||
qemu_or_irq *or_irq;
|
||||
qemu_irq pci_irqs[PCI_NUM_PINS];
|
||||
PCIBus pci_bus;
|
||||
AddressSpace pci_io_as;
|
||||
MemoryRegion pci_io;
|
||||
|
@ -69,6 +71,7 @@ typedef struct PRePPCIState {
|
|||
RavenPCIState pci_dev;
|
||||
|
||||
int contiguous_map;
|
||||
bool is_legacy_prep;
|
||||
} PREPPCIState;
|
||||
|
||||
#define BIOS_SIZE (1 * MiB)
|
||||
|
@ -194,9 +197,9 @@ static int raven_map_irq(PCIDevice *pci_dev, int irq_num)
|
|||
|
||||
static void raven_set_irq(void *opaque, int irq_num, int level)
|
||||
{
|
||||
qemu_irq *pic = opaque;
|
||||
PREPPCIState *s = opaque;
|
||||
|
||||
qemu_set_irq(pic[irq_num] , level);
|
||||
qemu_set_irq(s->pci_irqs[irq_num], level);
|
||||
}
|
||||
|
||||
static AddressSpace *raven_pcihost_set_iommu(PCIBus *bus, void *opaque,
|
||||
|
@ -222,14 +225,28 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
|
|||
MemoryRegion *address_space_mem = get_system_memory();
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PCI_NUM_PINS; i++) {
|
||||
sysbus_init_irq(dev, &s->irq[i]);
|
||||
if (s->is_legacy_prep) {
|
||||
for (i = 0; i < PCI_NUM_PINS; i++) {
|
||||
sysbus_init_irq(dev, &s->pci_irqs[i]);
|
||||
}
|
||||
} else {
|
||||
/* According to PReP specification section 6.1.6 "System Interrupt
|
||||
* Assignments", all PCI interrupts are routed via IRQ 15 */
|
||||
s->or_irq = OR_IRQ(object_new(TYPE_OR_IRQ));
|
||||
object_property_set_int(OBJECT(s->or_irq), PCI_NUM_PINS, "num-lines",
|
||||
&error_fatal);
|
||||
object_property_set_bool(OBJECT(s->or_irq), true, "realized",
|
||||
&error_fatal);
|
||||
sysbus_init_irq(dev, &s->or_irq->out_irq);
|
||||
|
||||
for (i = 0; i < PCI_NUM_PINS; i++) {
|
||||
s->pci_irqs[i] = qdev_get_gpio_in(DEVICE(s->or_irq), i);
|
||||
}
|
||||
}
|
||||
|
||||
qdev_init_gpio_in(d, raven_change_gpio, 1);
|
||||
|
||||
pci_bus_irqs(&s->pci_bus, raven_set_irq, raven_map_irq, s->irq,
|
||||
PCI_NUM_PINS);
|
||||
pci_bus_irqs(&s->pci_bus, raven_set_irq, raven_map_irq, s, PCI_NUM_PINS);
|
||||
|
||||
memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, s,
|
||||
"pci-conf-idx", 4);
|
||||
|
@ -383,6 +400,9 @@ static Property raven_pcihost_properties[] = {
|
|||
DEFINE_PROP_UINT32("elf-machine", PREPPCIState, pci_dev.elf_machine,
|
||||
EM_NONE),
|
||||
DEFINE_PROP_STRING("bios-name", PREPPCIState, pci_dev.bios_name),
|
||||
/* Temporary workaround until legacy prep machine is removed */
|
||||
DEFINE_PROP_BOOL("is-legacy-prep", PREPPCIState, is_legacy_prep,
|
||||
false),
|
||||
DEFINE_PROP_END_OF_LIST()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue