[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 82/85] hw/pci-host/astro: Map Astro chip into 64-bit I/O memory re
From: |
Richard Henderson |
Subject: |
[PULL 82/85] hw/pci-host/astro: Map Astro chip into 64-bit I/O memory region |
Date: |
Mon, 6 Nov 2023 19:04:04 -0800 |
From: Helge Deller <deller@gmx.de>
Map Astro into high F-region and add alias for 32-bit OS in low region.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 4b2d7caf2d..df61386bd9 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -19,6 +19,8 @@
#define TYPE_ASTRO_IOMMU_MEMORY_REGION "astro-iommu-memory-region"
+#define F_EXTEND(addr) ((addr) | MAKE_64BIT_MASK(32, 32))
+
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "qemu/units.h"
@@ -821,15 +823,16 @@ static void astro_realize(DeviceState *obj, Error **errp)
/* map elroys mmio */
map_size = LMMIO_DIST_BASE_SIZE / ROPES_PER_IOC;
- map_addr = (uint32_t) (LMMIO_DIST_BASE_ADDR + rope * map_size);
+ map_addr = F_EXTEND(LMMIO_DIST_BASE_ADDR + rope * map_size);
memory_region_init_alias(&elroy->pci_mmio_alias, OBJECT(elroy),
"pci-mmio-alias",
- &elroy->pci_mmio, map_addr, map_size);
+ &elroy->pci_mmio, (uint32_t) map_addr,
map_size);
memory_region_add_subregion(get_system_memory(), map_addr,
&elroy->pci_mmio_alias);
+ /* map elroys io */
map_size = IOS_DIST_BASE_SIZE / ROPES_PER_IOC;
- map_addr = (uint32_t) (IOS_DIST_BASE_ADDR + rope * map_size);
+ map_addr = F_EXTEND(IOS_DIST_BASE_ADDR + rope * map_size);
memory_region_add_subregion(get_system_memory(), map_addr,
&elroy->pci_io);
--
2.34.1
- [PULL 72/85] hw/hppa: Translate phys addresses for the cpu, (continued)
- [PULL 72/85] hw/hppa: Translate phys addresses for the cpu, Richard Henderson, 2023/11/06
- [PULL 78/85] target/hppa: Add unwind_breg to CPUHPPAState, Richard Henderson, 2023/11/06
- [PULL 77/85] target/hppa: Clear upper bits in mtctl for pa1.x, Richard Henderson, 2023/11/06
- [PULL 75/85] target/hppa: Add pa2.0 cpu local tlb flushes, Richard Henderson, 2023/11/06
- [PULL 71/85] include/hw/elf: Remove truncating signed casts, Richard Henderson, 2023/11/06
- [PULL 65/85] target/hppa: Implement HSHLADD, HSHRADD, Richard Henderson, 2023/11/06
- [PULL 61/85] target/hppa: Implement HADD, Richard Henderson, 2023/11/06
- [PULL 76/85] target/hppa: Avoid async_safe_run_on_cpu on uniprocessor system, Richard Henderson, 2023/11/06
- [PULL 79/85] target/hppa: Create raise_exception_with_ior, Richard Henderson, 2023/11/06
- [PULL 82/85] hw/pci-host/astro: Map Astro chip into 64-bit I/O memory region,
Richard Henderson <=
- [PULL 84/85] hw/hppa: Turn on 64-bit CPU for C3700 machine, Richard Henderson, 2023/11/06
- [PULL 85/85] hw/hppa: Allow C3700 with 64-bit and B160L with 32-bit CPU only, Richard Henderson, 2023/11/06
- [PULL 81/85] target/hppa: Improve interrupt logging, Richard Henderson, 2023/11/06
- [PULL 80/85] target/hppa: Update IIAOQ, IIASQ for pa2.0, Richard Henderson, 2023/11/06
- [PULL 83/85] hw/pci-host/astro: Trigger CPU irq on CPU HPA in high memory, Richard Henderson, 2023/11/06
- Re: [PULL 00/85] target/hppa patch queue, Stefan Hajnoczi, 2023/11/07