PCI: PCIe access should always be little endian
PATCH 1/1 PCI: PCIe access should always be little endian
PCIe busses are always little endian, so set the endianness of the memory region to little endian rather than native such that operations work as expected on big endian targets.
---
hw/pci/pcie_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pcie_host.c +1 -1
@@ -81,7 +81,7 @@ static uint64_t pcie_mmcfg_data_read(void *opaque,static const MemoryRegionOps pcie_mmcfg_ops = { .read = pcie_mmcfg_data_read, .write = pcie_mmcfg_data_write, - .endianness =DEVICE_NATIVE_ENDIAN , + .endianness =DEVICE_LITTLE_ENDIAN , };static void pcie_host_init (Object *obj)
Signature · 1 line
2.7.4
Quoted 5 lines · Matt Redfearn
PCIe busses are always little endian, so set the endianness of the memory region to little endian rather than native such that operations work as expected on big endian targets.
Signed-off-by Matt Redfearn <[email protected]>
Hi Matt,
Thanks for the patch.
Quoted 11 lines
---
hw/pci/pcie_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/pci/pcie_host.c +0
-0
hw/pci/pcie_host.c static uint64_t pcie_mmcfg_data_read(void *opaque, · line 87
Quoted 8 lines
hw/pci/pcie_host.c +1
-1@@ -81,7 +81,7 @@ static uint64_t pcie_mmcfg_data_read(void *opaque,static const MemoryRegionOps pcie_mmcfg_ops = { .read = pcie_mmcfg_data_read, .write = pcie_mmcfg_data_write, - .endianness =DEVICE_NATIVE_ENDIAN , + .endianness =DEVICE_LITTLE_ENDIAN , };static void pcie_host_init (Object *obj)
Thanks,
Marcel
ping?
Quoted 35 lines · Marcel Apfelbaum
Quoted 5 lines · Matt Redfearn
PCIe busses are always little endian, so set the endianness of the memory region to little endian rather than native such that operations work as expected on big endian targets.
Signed-off-by Matt Redfearn <[email protected]>Hi Matt,
Thanks for the patch.Quoted 10 lines
---
hw/pci/pcie_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/pci/pcie_host.c +0
-0hw/pci/pcie_host.c static uint64_t pcie_mmcfg_data_read(void *opaque, · line 87
Quoted 8 lines
hw/pci/pcie_host.c +1
-1@@ -81,7 +81,7 @@ static uint64_t pcie_mmcfg_data_read(void *opaque,static const MemoryRegionOps pcie_mmcfg_ops = { .read = pcie_mmcfg_data_read, .write = pcie_mmcfg_data_write, - .endianness =DEVICE_NATIVE_ENDIAN , + .endianness =DEVICE_LITTLE_ENDIAN , };static void pcie_host_init (Object *obj)Reviewed-by Marcel Apfelbaum <[email protected]>Thanks,
Marcel
Quoted 2 lines · Matt Redfearn
ping?
Hi Matt,
I think Michael is in PTO, he'll pick up
the patch as soon he is back.
Thanks,
Marcel
Quoted 38 lines · Marcel Apfelbaum
Quoted 35 lines · Matt Redfearn
Quoted 5 lines
PCIe busses are always little endian, so set the endianness of the memory region to little endian rather than native such that operations work as expected on big endian targets.
Signed-off-by Matt Redfearn <[email protected]>Hi Matt,
Thanks for the patch.Quoted 10 lines
---
hw/pci/pcie_host.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)hw/pci/pcie_host.c +0
-0hw/pci/pcie_host.c static uint64_t pcie_mmcfg_data_read(void *opaque, · line 87
Quoted 8 lines
hw/pci/pcie_host.c +1
-1@@ -81,7 +81,7 @@ static uint64_t pcie_mmcfg_data_read(void *opaque, static const MemoryRegionOps pcie_mmcfg_ops = { .read = pcie_mmcfg_data_read, .write = pcie_mmcfg_data_write, - .endianness = DEVICE_NATIVE_ENDIAN, + .endianness = DEVICE_LITTLE_ENDIAN, }; static void pcie_host_init(Object *obj)Reviewed-by Marcel Apfelbaum <[email protected]>Thanks,
Marcel