[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 10/30] spapr_pci: encode missing 64-bit memory address
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 10/30] spapr_pci: encode missing 64-bit memory address space |
Date: |
Tue, 7 Jul 2015 17:49:22 +0200 |
From: Nikunj A Dadhania <address@hidden>
The properties reg/assigned-resources need to encode 64-bit memory
address space as part of phys.hi dword.
00 if configuration space
01 if IO region,
10 if 32-bit MEM region
11 if 64-bit MEM region
Signed-off-by: Nikunj A Dadhania <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/spapr_pci.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index eab4cfb..870fe81 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -787,7 +787,13 @@ typedef struct ResourceProps {
* phys.hi = 0xYYXXXXZZ, where:
* 0xYY = npt000ss
* ||| |
- * ||| +-- space code: 1 if IO region, 2 if MEM region
+ * ||| +-- space code
+ * ||| |
+ * ||| + 00 if configuration space
+ * ||| + 01 if IO region,
+ * ||| + 10 if 32-bit MEM region
+ * ||| + 11 if 64-bit MEM region
+ * |||
* ||+------ for non-relocatable IO: 1 if aliased
* || for relocatable IO: 1 if below 64KB
* || for MEM: 1 if below 1MB
@@ -847,6 +853,8 @@ static void populate_resource_props(PCIDevice *d,
ResourceProps *rp)
reg->phys_hi = cpu_to_be32(dev_id | b_rrrrrrrr(pci_bar(d, i)));
if (d->io_regions[i].type & PCI_BASE_ADDRESS_SPACE_IO) {
reg->phys_hi |= cpu_to_be32(b_ss(1));
+ } else if (d->io_regions[i].type & PCI_BASE_ADDRESS_MEM_TYPE_64) {
+ reg->phys_hi |= cpu_to_be32(b_ss(3));
} else {
reg->phys_hi |= cpu_to_be32(b_ss(2));
}
--
1.8.1.4
- [Qemu-ppc] [PULL 00/30] ppc patch queue 2015-07-07 for 2.4, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 02/30] macio: remove nonexistent interrupt on pin 1, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 09/30] spapr: Add sPAPRMachineClass, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 10/30] spapr_pci: encode missing 64-bit memory address space,
Alexander Graf <=
- [Qemu-ppc] [PULL 01/30] linux-user, ppc: mftbl can be used by user application, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 03/30] target-ppc: fix hugepage support when using memory-backend-file, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 14/30] spapr_iommu: translate sPAPRTCEAccess to IOMMUAccessFlags, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 16/30] spapr: Consider max_cpus during xics initialization, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 18/30] cpus: Add a macro to walk CPUs in reverse, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 12/30] spapr_pci: set device node unit address as hex, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 04/30] spapr: ensure we have at least one XICS server, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 20/30] spapr: Consolidate cpu init code into a routine, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 28/30] sPAPR: Don't enable EEH on emulated PCI devices, Alexander Graf, 2015/07/07
- [Qemu-ppc] [PULL 29/30] sPAPR: Reenable EEH functionality on reboot, Alexander Graf, 2015/07/07