Rename target_phys_addr_t to Phys
PATCH 1/1 Rename target_phys_addr_t to Phys
The name 'Phys' conveys exactly the same information as 'target_phys_addr_t':
- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming convention
As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of target_phys_addr_t to the new name. All hail Phys!
--- HACKING | 2 +- cpu-all.h | 2 +- cpu-common.h | 64 +++++++++--------- cpu-defs.h | 2 +- disas.h | 2 +- dma-helpers.c | 2 +- dma.h | 2 +- exec-all.h | 6 +- exec-obsolete.h | 4 +- exec.c | 140 +++++++++++++++++++------------------- hw/a9mpcore.c | 4 +- hw/alpha_pci.c | 12 ++-- hw/alpha_typhoon.c | 12 ++-- hw/an5206.c | 2 +- hw/apb_pci.c | 24 +++--- hw/apb_pci.h | 4 +- hw/apic.c | 14 ++-- hw/arm-misc.h | 10 ++-- hw/arm11mpcore.c | 8 +- hw/arm_boot.c | 10 ++-- hw/arm_gic.c | 20 +++--- hw/arm_l2x0.c | 4 +- hw/arm_mptimer.c | 12 ++-- hw/arm_sysctl.c | 4 +- hw/arm_timer.c | 12 ++-- hw/armv7m.c | 12 ++-- hw/axis_dev88.c | 8 +- hw/bonito.c | 38 +++++----- hw/cirrus_vga.c | 16 ++-- hw/cris-boot.h | 2 +- hw/cs4231.c | 4 +- hw/cs4231a.c | 4 +- hw/cuda.c | 12 ++-- hw/dma.c | 4 +- hw/dp8393x.c | 18 +++--- hw/ds1225y.c | 4 +- hw/dummy_m68k.c | 2 +- hw/e1000.c | 8 +- hw/eccmemctl.c | 8 +- hw/eepro100.c | 4 +- hw/elf_ops.h | 2 +- hw/empty_slot.c | 6 +- hw/empty_slot.h | 2 +- hw/escc.c | 8 +- hw/escc.h | 4 +- hw/esp.c | 8 +- hw/esp.h | 2 +- hw/etraxfs.h | 2 +- hw/etraxfs_dma.c | 22 +++--- hw/etraxfs_dma.h | 2 +- hw/etraxfs_eth.c | 4 +- hw/etraxfs_pic.c | 4 +- hw/etraxfs_ser.c | 4 +- hw/etraxfs_timer.c | 4 +- hw/fdc.c | 8 +- hw/fdc.h | 4 +- hw/flash.h | 8 +- hw/framebuffer.c | 6 +- hw/framebuffer.h | 2 +- hw/fw_cfg.c | 16 ++-- hw/fw_cfg.h | 2 +- hw/g364fb.c | 4 +- hw/grlib.h | 6 +- hw/grlib_apbuart.c | 4 +- hw/grlib_gptimer.c | 8 +- hw/grlib_irqmp.c | 4 +- hw/gt64xxx.c | 20 +++--- hw/heathrow_pic.c | 4 +- hw/hpet.c | 8 +- hw/i8259.c | 8 +- hw/ide.h | 2 +- hw/ide/ahci.c | 18 +++--- hw/ide/cmd646.c | 12 ++-- hw/ide/macio.c | 12 ++-- hw/ide/mmio.c | 10 ++-- hw/ide/piix.c | 4 +- hw/ide/via.c | 4 +- hw/integratorcp.c | 14 ++-- hw/intel-hda.c | 26 ++++---- hw/ioapic.c | 4 +- hw/isa-bus.c | 2 +- hw/isa.h | 6 +- hw/isa_mmio.c | 16 ++-- hw/ivshmem.c | 4 +- hw/jazz_led.c | 14 ++-- hw/lan9118.c | 4 +- hw/lance.c | 4 +- hw/lm32_boards.c | 38 +++++----- hw/lm32_hwsetup.h | 2 +- hw/lm32_sys.c | 4 +- hw/lm32_timer.c | 4 +- hw/lm32_uart.c | 4 +- hw/lm4549.c | 4 +- hw/lm4549.h | 4 +- hw/loader.c | 30 ++++---- hw/loader.h | 22 +++--- hw/lsi53c895a.c | 12 ++-- hw/m48t59.c | 14 ++-- hw/mac_dbdma.c | 4 +- hw/mac_dbdma.h | 2 +- hw/mac_nvram.c | 8 +- hw/mainstone.c | 2 +- hw/marvell_88w8618_audio.c | 4 +- hw/mcf.h | 10 ++-- hw/mcf5206.c | 20 +++--- hw/mcf5208.c | 10 ++-- hw/mcf_fec.c | 6 +- hw/mcf_intc.c | 6 +- hw/mcf_uart.c | 6 +- hw/milkymist-ac97.c | 4 +- hw/milkymist-hpdmc.c | 4 +- hw/milkymist-hw.h | 24 +++--- hw/milkymist-memcard.c | 4 +- hw/milkymist-minimac2.c | 6 +- hw/milkymist-pfpu.c | 8 +- hw/milkymist-softusb.c | 4 +- hw/milkymist-sysctl.c | 4 +- hw/milkymist-tmu2.c | 8 +- hw/milkymist-uart.c | 4 +- hw/milkymist-vgafb.c | 4 +- hw/milkymist.c | 16 ++-- hw/mips.h | 8 +- hw/mips_jazz.c | 8 +- hw/mips_malta.c | 6 +- hw/mips_r4k.c | 4 +- hw/mipsnet.c | 4 +- hw/mpc8544_guts.c | 4 +- hw/msix.c | 4 +- hw/mst_fpga.c | 4 +- hw/multiboot.c | 16 ++-- hw/musicpal.c | 32 +++++----- hw/ne2000.c | 4 +- hw/nvram.h | 2 +- hw/omap.h | 70 ++++++++++---------- hw/omap1.c | 148 ++++++++++++++++++++-------------------- hw/omap2.c | 28 ++++---- hw/omap_dma.c | 24 +++--- hw/omap_dss.c | 36 +++++----- hw/omap_gpio.c | 16 ++-- hw/omap_gpmc.c | 16 ++-- hw/omap_gptimer.c | 8 +- hw/omap_i2c.c | 8 +- hw/omap_intc.c | 8 +- hw/omap_l4.c | 16 ++-- hw/omap_lcdc.c | 8 +- hw/omap_mmc.c | 6 +- hw/omap_sdrc.c | 6 +- hw/omap_spi.c | 4 +- hw/omap_sx1.c | 4 +- hw/omap_synctimer.c | 6 +- hw/omap_tap.c | 4 +- hw/omap_uart.c | 10 ++-- hw/onenand.c | 8 +- hw/opencores_eth.c | 8 +- hw/openpic.c | 52 +++++++------- hw/openpic.h | 2 +- hw/palm.c | 8 +- hw/parallel.c | 14 ++-- hw/pc.c | 4 +- hw/pc.h | 18 +++--- hw/pc_piix.c | 2 +- hw/pci.h | 2 +- hw/pci_host.c | 8 +- hw/pcie_host.c | 10 ++-- hw/pcie_host.h | 8 +- hw/pckbd.c | 8 +- hw/pcnet-pci.c | 20 +++--- hw/pcnet.c | 34 +++++----- hw/pcnet.h | 4 +- hw/petalogix_ml605_mmu.c | 10 ++-- hw/petalogix_s3adsp1800_mmu.c | 10 ++-- hw/pflash_cfi01.c | 48 +++++++------- hw/pflash_cfi02.c | 40 ++++++------ hw/piix_pci.c | 16 ++-- hw/pl011.c | 4 +- hw/pl022.c | 4 +- hw/pl031.c | 4 +- hw/pl041.c | 6 +- hw/pl050.c | 4 +- hw/pl061.c | 4 +- hw/pl080.c | 4 +- hw/pl110.c | 4 +- hw/pl181.c | 4 +- hw/pl190.c | 4 +- hw/ppc405.h | 12 ++-- hw/ppc405_boards.c | 28 ++++---- hw/ppc405_uc.c | 64 +++++++++--------- hw/ppc440.c | 4 +- hw/ppc440_bamboo.c | 10 ++-- hw/ppc4xx.h | 16 ++-- hw/ppc4xx_devs.c | 28 ++++---- hw/ppc4xx_pci.c | 16 ++-- hw/ppc_mac.h | 4 +- hw/ppc_newworld.c | 8 +- hw/ppc_oldworld.c | 2 +- hw/ppc_prep.c | 34 +++++----- hw/ppce500_mpc8544ds.c | 16 ++-- hw/ppce500_pci.c | 4 +- hw/ppce500_spin.c | 16 ++-- hw/prep_pci.c | 14 ++-- hw/pxa.h | 24 +++--- hw/pxa2xx.c | 42 ++++++------ hw/pxa2xx_dma.c | 16 ++-- hw/pxa2xx_gpio.c | 6 +- hw/pxa2xx_keypad.c | 6 +- hw/pxa2xx_lcd.c | 26 ++++---- hw/pxa2xx_mmci.c | 18 +++--- hw/pxa2xx_pcmcia.c | 14 ++-- hw/pxa2xx_pic.c | 10 ++-- hw/pxa2xx_timer.c | 4 +- hw/qdev-addr.c | 16 ++-- hw/qdev-addr.h | 4 +- hw/qxl.c | 4 +- hw/r2d.c | 6 +- hw/rc4030.c | 34 +++++----- hw/realview.c | 4 +- hw/rtl8139.c | 16 ++-- hw/s390-virtio-bus.c | 2 +- hw/s390-virtio.c | 4 +- hw/sbi.c | 4 +- hw/serial.c | 6 +- hw/sh.h | 4 +- hw/sh7750.c | 24 +++--- hw/sh_intc.c | 4 +- hw/sh_pci.c | 4 +- hw/sh_serial.c | 6 +- hw/sh_timer.c | 10 ++-- hw/sharpsl.h | 2 +- hw/slavio_intctl.c | 8 +- hw/slavio_misc.c | 32 +++++----- hw/slavio_timer.c | 4 +- hw/sm501.c | 18 +++--- hw/smc91c111.c | 12 ++-- hw/soc_dma.c | 8 +- hw/soc_dma.h | 10 ++-- hw/spapr.c | 14 ++-- hw/spapr.h | 8 +- hw/spapr_pci.c | 4 +- hw/spapr_pci.h | 2 +- hw/spapr_rtas.c | 4 +- hw/sparc32_dma.c | 8 +- hw/sparc32_dma.h | 4 +- hw/spitz.c | 4 +- hw/stellaris.c | 16 ++-- hw/stellaris_enet.c | 4 +- hw/strongarm.c | 28 ++++---- hw/sun4c_intctl.c | 4 +- hw/sun4m.c | 84 ++++++++++++------------ hw/sun4m.h | 6 +- hw/sun4m_iommu.c | 26 ++++---- hw/sun4u.c | 6 +- hw/sysbus.c | 20 +++--- hw/sysbus.h | 18 +++--- hw/tc6393xb.c | 16 ++-- hw/tcx.c | 10 ++-- hw/tusb6010.c | 12 ++-- hw/unin_pci.c | 4 +- hw/usb-ehci.c | 22 +++--- hw/usb-libhw.c | 2 +- hw/usb-musb.c | 12 ++-- hw/usb-ohci.c | 8 +- hw/versatile_pci.c | 6 +- hw/versatilepb.c | 4 +- hw/vga-isa-mm.c | 20 +++--- hw/vga.c | 10 ++-- hw/vga_int.h | 4 +- hw/vhost.c | 18 +++--- hw/virtex_ml507.c | 12 ++-- hw/virtio-pci.c | 4 +- hw/virtio.c | 76 +++++++++++----------- hw/virtio.h | 28 ++++---- hw/vmware_vga.c | 4 +- hw/wdt_i6300esb.c | 12 ++-- hw/xen_platform.c | 4 +- hw/xilinx.h | 10 ++-- hw/xilinx_axidma.c | 10 ++-- hw/xilinx_axienet.c | 4 +- hw/xilinx_ethlite.c | 4 +- hw/xilinx_intc.c | 4 +- hw/xilinx_timer.c | 6 +- hw/xilinx_uartlite.c | 4 +- hw/xtensa_lx60.c | 12 ++-- hw/zaurus.c | 6 +- kvm-all.c | 26 ++++---- kvm-stub.c | 4 +- kvm.h | 6 +- memory.c | 64 +++++++++--------- memory.h | 44 ++++++------ monitor.c | 30 ++++---- softmmu_template.h | 12 ++-- target-alpha/cpu.h | 2 +- target-alpha/helper.c | 2 +- target-alpha/op_helper.c | 2 +- target-arm/helper.c | 2 +- target-cris/helper.c | 2 +- target-i386/helper.c | 6 +- target-i386/kvm.c | 6 +- target-i386/op_helper.c | 6 +- target-lm32/helper.c | 2 +- target-m68k/helper.c | 2 +- target-microblaze/cpu.h | 2 +- target-microblaze/helper.c | 2 +- target-microblaze/op_helper.c | 2 +- target-mips/cpu.h | 12 ++-- target-mips/helper.c | 18 +++--- target-mips/op_helper.c | 6 +- target-ppc/cpu.h | 24 +++--- target-ppc/helper.c | 46 ++++++------ target-ppc/op_helper.c | 2 +- target-s390x/cpu.h | 2 +- target-s390x/helper.c | 8 +- target-s390x/op_helper.c | 10 ++-- target-sh4/cpu.h | 16 ++-- target-sh4/helper.c | 18 +++--- target-sparc/cpu.h | 4 +- target-sparc/ldst_helper.c | 40 ++++++------ target-sparc/mmu_helper.c | 38 +++++----- target-xtensa/helper.c | 2 +- targphys.h | 8 +- xen-all.c | 32 +++++----- xen-mapcache.c | 32 +++++----- xen-mapcache.h | 6 +- xtensa-semi.c | 6 +- 323 files changed, 1959 insertions(+), 1959 deletions(-)
HACKING +1 -1
@@ -32,7 +32,7 @@ mandatory for VMState fields. Don't use Linux kernel internal types like u32, __u32 or __le32. -Use target_phys_addr_t for guest physical addresses except pcibus_t +Use Phys for guest physical addresses except pcibus_t for PCI addresses. In addition, ram_addr_t is a QEMU internal address space that maps guest RAM physical addresses into an intermediate address space that can map to host virtual address spaces. Generally
cpu-all.h +1 -1
@@ -465,7 +465,7 @@ int cpu_str_to_log_mask(const char *str);/* Return the physical page corresponding to a virtual one. Use it only for debugging because no protection checks are done. Return -1 if no page found. */ -target_phys_addr_t cpu_get_phys_page_debug (CPUState *env,target_ulong addr); +Phys cpu_get_phys_page_debug (CPUState *env,target_ulong addr);/* memory API */
cpu-common.h +32 -32
96 lines not on this page · raw message
cpu-defs.h +1 -1
@@ -113,7 +113,7 @@ extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << CPU_TLB_ENTRY_BIT#define CPU_COMMON_TLB \/* The meaning of the MMU modes is defined in the target code. */ \ CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \ - target_phys_addr_t iotlb[NB_MMU_MODES][CPU_TLB_SIZE]; \ + Phys iotlb[NB_MMU_MODES][CPU_TLB_SIZE]; \ target_ulong tlb_flush_addr; \ target_ulong tlb_flush_mask;
disas.h +1 -1
@@ -22,7 +22,7 @@ struct elf64_sym;#if defined(CONFIG_USER_ONLY )typedef const char *(*lookup_symbol_t )(struct syminfo *s,target_ulong orig_addr);#else -typedef const char *(*lookup_symbol_t )(struct syminfo *s,target_phys_addr_t orig_addr); +typedef const char *(*lookup_symbol_t )(struct syminfo *s,Phys orig_addr);#endif struct syminfo {
dma-helpers.c +1 -1
@@ -106,7 +106,7 @@ static void dma_complete(DMAAIOCB *dbs, int ret)static void dma_bdrv_cb (void *opaque,int ret) {DMAAIOCB *dbs = (DMAAIOCB *)opaque; -target_phys_addr_t cur_addr, cur_len; +Phys cur_addr, cur_len;void *mem;trace_dma_bdrv_cb (dbs, ret);
dma.h +1 -1
@@ -18,7 +18,7 @@typedef struct ScatterGatherEntry ScatterGatherEntry ;#if defined(TARGET_PHYS_ADDR_BITS ) -typedef target_phys_addr_t dma_addr_t ; +typedef Phys dma_addr_t ;#define DMA_ADDR_FMT TARGET_FMT_plx
exec-all.h +3 -3
@@ -100,7 +100,7 @@ void tlb_flush_page(CPUState *env, target_ulong addr);void tlb_flush (CPUState *env,int flush_global);#if !defined(CONFIG_USER_ONLY )void tlb_set_page (CPUState *env,target_ulong vaddr, -target_phys_addr_t paddr,int prot, +Phys paddr,int prot,int mmu_idx,target_ulong size);#endif
@@ -299,8 +299,8 @@ extern void *tci_tb_ptr;#if !defined(CONFIG_USER_ONLY ) -uint64_t io_mem_read (int index,target_phys_addr_t addr,unsigned size); -void io_mem_write (int index,target_phys_addr_t addr,uint64_t value, +uint64_t io_mem_read (int index,Phys addr,unsigned size); +void io_mem_write (int index,Phys addr,uint64_t value,unsigned size);extern struct MemoryRegion *io_mem_region[IO_MEM_NB_ENTRIES ];
exec-obsolete.h +2 -2
@@ -39,8 +39,8 @@ struct MemoryRegionSection;void cpu_register_physical_memory_log (struct MemoryRegionSection *section,bool readable,bool readonly); -void qemu_register_coalesced_mmio (target_phys_addr_t addr,ram_addr_t size); -void qemu_unregister_coalesced_mmio (target_phys_addr_t addr,ram_addr_t size); +void qemu_register_coalesced_mmio (Phys addr,ram_addr_t size); +void qemu_unregister_coalesced_mmio (Phys addr,ram_addr_t size);int cpu_physical_memory_set_dirty_tracking (int enable);
exec.c +70 -70
493 lines not on this page · raw message
hw/a9mpcore.c +2 -2
@@ -39,7 +39,7 @@DeviceState *mptimer; } a9mp_priv_state; -static uint64_t a9_scu_read (void *opaque,target_phys_addr_t offset, +static uint64_t a9_scu_read (void *opaque,Phys offset,unsigned size) {a9mp_priv_state *s = (a9mp_priv_state *)opaque;
@@ -70,7 +70,7 @@ static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset, } } -static void a9_scu_write (void *opaque,target_phys_addr_t offset, +static void a9_scu_write (void *opaque,Phys offset,uint64_t value,unsigned size) {a9mp_priv_state *s = (a9mp_priv_state *)opaque;
hw/alpha_pci.c +6 -6
@@ -16,7 +16,7 @@/* PCI IO reads/writes, to byte-word addressable memory. */ /* ??? Doesn't handle multiple PCI busses. */ -static uint64_t bw_io_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t bw_io_read (void *opaque,Phys addr,unsigned size) {switch (size) {case 1 :
@@ -29,7 +29,7 @@ static uint64_t bw_io_read(void *opaque, target_phys_addr_t addr, unsigned size)abort (); } -static void bw_io_write (void *opaque,target_phys_addr_t addr, +static void bw_io_write (void *opaque,Phys addr,uint64_t val,unsigned size) {switch (size) {
@@ -58,14 +58,14 @@ static void bw_io_write(void *opaque, target_phys_addr_t addr, };/* PCI config space reads/writes, to byte-word addressable memory. */ -static uint64_t bw_conf1_read (void *opaque,target_phys_addr_t addr, +static uint64_t bw_conf1_read (void *opaque,Phys addr,unsigned size) {PCIBus *b = opaque;return pci_data_read (b, addr, size); } -static void bw_conf1_write (void *opaque,target_phys_addr_t addr, +static void bw_conf1_write (void *opaque,Phys addr,uint64_t val,unsigned size) {PCIBus *b = opaque;
@@ -84,12 +84,12 @@ static void bw_conf1_write(void *opaque, target_phys_addr_t addr,/* PCI/EISA Interrupt Acknowledge Cycle. */ -static uint64_t iack_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t iack_read (void *opaque,Phys addr,unsigned size) {return pic_read_irq (isa_pic); } -static void special_write (void *opaque,target_phys_addr_t addr, +static void special_write (void *opaque,Phys addr,uint64_t val,unsigned size) {qemu_log ("pci: special write cycle" );
hw/alpha_typhoon.c +6 -6
@@ -64,7 +64,7 @@ static void cpu_irq_change(CPUState *env, uint64_t req) } } -static uint64_t cchip_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t cchip_read (void *opaque,Phys addr,unsigned size) {CPUState *env = cpu_single_env;TyphoonState *s = opaque;
@@ -197,13 +197,13 @@ static uint64_t cchip_read(void *opaque, target_phys_addr_t addr, unsigned size)return ret; } -static uint64_t dchip_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t dchip_read (void *opaque,Phys addr,unsigned size) {/* Skip this. It's all related to DRAM timing and setup. */ return 0 ; } -static uint64_t pchip_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t pchip_read (void *opaque,Phys addr,unsigned size) {TyphoonState *s = opaque;uint64_t ret =0 ;
@@ -300,7 +300,7 @@ static uint64_t pchip_read(void *opaque, target_phys_addr_t addr, unsigned size)return ret; } -static void cchip_write (void *opaque,target_phys_addr_t addr, +static void cchip_write (void *opaque,Phys addr,uint64_t v32,unsigned size) {TyphoonState *s = opaque;
@@ -457,13 +457,13 @@ static void cchip_write(void *opaque, target_phys_addr_t addr, } } -static void dchip_write (void *opaque,target_phys_addr_t addr, +static void dchip_write (void *opaque,Phys addr,uint64_t val,unsigned size) {/* Skip this. It's all related to DRAM timing and setup. */ } -static void pchip_write (void *opaque,target_phys_addr_t addr, +static void pchip_write (void *opaque,Phys addr,uint64_t v32,unsigned size) {TyphoonState *s = opaque;
hw/an5206.c +1 -1
@@ -27,7 +27,7 @@ static void an5206_init(ram_addr_t ram_size,CPUState *env;int kernel_size;uint64_t elf_entry; -target_phys_addr_t entry; +Phys entry;MemoryRegion *address_space_mem =get_system_memory ();MemoryRegion *ram =g_new (MemoryRegion,1 );MemoryRegion *sram =g_new (MemoryRegion,1 );
hw/apb_pci.c +12 -12
@@ -82,7 +82,7 @@unsigned int nr_resets; } APBState; -static void apb_config_writel (void *opaque,target_phys_addr_t addr, +static void apb_config_writel (void *opaque,Phys addr,uint64_t val,unsigned size) {APBState *s = opaque;
@@ -131,7 +131,7 @@ static void apb_config_writel (void *opaque, target_phys_addr_t addr, }static uint64_t apb_config_readl (void *opaque, -target_phys_addr_t addr,unsigned size) +Phys addr,unsigned size) {APBState *s = opaque;uint32_t val;
@@ -184,7 +184,7 @@ static uint64_t apb_config_readl (void *opaque, .endianness = DEVICE_NATIVE_ENDIAN, }; -static void apb_pci_config_write (void *opaque,target_phys_addr_t addr, +static void apb_pci_config_write (void *opaque,Phys addr,uint64_t val,unsigned size) {APBState *s = opaque;
@@ -194,7 +194,7 @@ static void apb_pci_config_write(void *opaque, target_phys_addr_t addr,pci_data_write (s->bus, addr, val, size); } -static uint64_t apb_pci_config_read (void *opaque,target_phys_addr_t addr, +static uint64_t apb_pci_config_read (void *opaque,Phys addr,unsigned size) {uint32_t ret;
@@ -206,25 +206,25 @@ static uint64_t apb_pci_config_read(void *opaque, target_phys_addr_t addr,return ret; } -static void pci_apb_iowriteb (void *opaque,target_phys_addr_t addr, +static void pci_apb_iowriteb (void *opaque,Phys addr,uint32_t val) {cpu_outb (addr &IOPORTS_MASK , val); } -static void pci_apb_iowritew (void *opaque,target_phys_addr_t addr, +static void pci_apb_iowritew (void *opaque,Phys addr,uint32_t val) {cpu_outw (addr &IOPORTS_MASK ,bswap16 (val)); } -static void pci_apb_iowritel (void *opaque,target_phys_addr_t addr, +static void pci_apb_iowritel (void *opaque,Phys addr,uint32_t val) {cpu_outl (addr &IOPORTS_MASK ,bswap32 (val)); } -static uint32_t pci_apb_ioreadb (void *opaque,target_phys_addr_t addr) +static uint32_t pci_apb_ioreadb (void *opaque,Phys addr) {uint32_t val;
@@ -232,7 +232,7 @@ static uint32_t pci_apb_ioreadb (void *opaque, target_phys_addr_t addr)return val; } -static uint32_t pci_apb_ioreadw (void *opaque,target_phys_addr_t addr) +static uint32_t pci_apb_ioreadw (void *opaque,Phys addr) {uint32_t val;
@@ -240,7 +240,7 @@ static uint32_t pci_apb_ioreadw (void *opaque, target_phys_addr_t addr)return val; } -static uint32_t pci_apb_ioreadl (void *opaque,target_phys_addr_t addr) +static uint32_t pci_apb_ioreadl (void *opaque,Phys addr) {uint32_t val;
@@ -314,8 +314,8 @@ static int apb_pci_bridge_initfn(PCIDevice *dev)return 0 ; } -PCIBus *pci_apb_init (target_phys_addr_t special_base, -target_phys_addr_t mem_base, +PCIBus *pci_apb_init (Phys special_base, +Phys mem_base,qemu_irq *pic,PCIBus **bus2,PCIBus **bus3) {DeviceState *dev;
hw/apb_pci.h +2 -2
@@ -3,7 +3,7 @@#include "qemu-common.h" -PCIBus *pci_apb_init (target_phys_addr_t special_base, -target_phys_addr_t mem_base, +PCIBus *pci_apb_init (Phys special_base, +Phys mem_base,qemu_irq *pic,PCIBus **bus2,PCIBus **bus3);#endif
hw/apic.c +7 -7
@@ -689,25 +689,25 @@ static void apic_timer(void *opaque)apic_timer_update (s, s->next_time); } -static uint32_t apic_mem_readb (void *opaque,target_phys_addr_t addr) +static uint32_t apic_mem_readb (void *opaque,Phys addr) {return 0 ; } -static uint32_t apic_mem_readw (void *opaque,target_phys_addr_t addr) +static uint32_t apic_mem_readw (void *opaque,Phys addr) {return 0 ; } -static void apic_mem_writeb (void *opaque,target_phys_addr_t addr,uint32_t val) +static void apic_mem_writeb (void *opaque,Phys addr,uint32_t val) { } -static void apic_mem_writew (void *opaque,target_phys_addr_t addr,uint32_t val) +static void apic_mem_writew (void *opaque,Phys addr,uint32_t val) { } -static uint32_t apic_mem_readl (void *opaque,target_phys_addr_t addr) +static uint32_t apic_mem_readl (void *opaque,Phys addr) {DeviceState *d;APICState *s;
@@ -787,7 +787,7 @@ static uint32_t apic_mem_readl(void *opaque, target_phys_addr_t addr)return val; } -static void apic_send_msi (target_phys_addr_t addr,uint32_t data) +static void apic_send_msi (Phys addr,uint32_t data) {uint8_t dest = (addr &MSI_ADDR_DEST_ID_MASK ) >>MSI_ADDR_DEST_ID_SHIFT ;uint8_t vector = (data &MSI_DATA_VECTOR_MASK ) >>MSI_DATA_VECTOR_SHIFT ;
@@ -798,7 +798,7 @@ static void apic_send_msi(target_phys_addr_t addr, uint32_t data)apic_deliver_irq (dest, dest_mode, delivery, vector, trigger_mode); } -static void apic_mem_writel (void *opaque,target_phys_addr_t addr,uint32_t val) +static void apic_mem_writel (void *opaque,Phys addr,uint32_t val) {DeviceState *d;APICState *s;
hw/arm-misc.h +5 -5
@@ -29,16 +29,16 @@ struct arm_boot_info {const char *kernel_filename;const char *kernel_cmdline;const char *initrd_filename; -target_phys_addr_t loader_start; -target_phys_addr_t smp_loader_start; -target_phys_addr_t smp_priv_base; +Phys loader_start; +Phys smp_loader_start; +Phys smp_priv_base;int nb_cpus;int board_id;int (*atag_board)(const struct arm_boot_info *info,void *p);/* Used internally by arm_boot.c */ int is_linux; -target_phys_addr_t initrd_size; -target_phys_addr_t entry; +Phys initrd_size; +Phys entry; };void arm_load_kernel (CPUState *env,struct arm_boot_info *info);
hw/arm11mpcore.c +4 -4
@@ -41,7 +41,7 @@/* Per-CPU private memory mapped IO. */ -static uint64_t mpcore_scu_read (void *opaque,target_phys_addr_t offset, +static uint64_t mpcore_scu_read (void *opaque,Phys offset,unsigned size) {mpcore_priv_state *s = (mpcore_priv_state *)opaque;
@@ -63,7 +63,7 @@ static uint64_t mpcore_scu_read(void *opaque, target_phys_addr_t offset, } } -static void mpcore_scu_write (void *opaque,target_phys_addr_t offset, +static void mpcore_scu_write (void *opaque,Phys offset,uint64_t value,unsigned size) {mpcore_priv_state *s = (mpcore_priv_state *)opaque;
@@ -107,7 +107,7 @@ static void mpcore_priv_map_setup(mpcore_priv_state *s)* at 0x200, 0x300... */ for (i =0 ; i < (s->num_cpu +1 ); i++) { -target_phys_addr_t offset =0x100 + (i *0x100 ); +Phys offset =0x100 + (i *0x100 );memory_region_add_subregion (&s->container, offset, &s->gic.cpuiomem[i]); }/* Add the regions for timer and watchdog for "current CPU" and
@@ -117,7 +117,7 @@ static void mpcore_priv_map_setup(mpcore_priv_state *s) s, (s->num_cpu + 1) * 2);for (i =0 ; i < (s->num_cpu +1 ) *2 ; i++) {/* Timers at 0x600, 0x700, ...; watchdogs at 0x620, 0x720, ... */ -target_phys_addr_t offset =0x600 + (i >>1 ) *0x100 + (i &1 ) *0x20 ; +Phys offset =0x600 + (i >>1 ) *0x100 + (i &1 ) *0x20 ;memory_region_add_subregion (&s->container, offset,sysbus_mmio_get_region (busdev, i)); }
hw/arm_boot.c +5 -5
@@ -50,9 +50,9 @@ }while (0 ) static void set_kernel_args(const struct arm_boot_info *info, -int initrd_size,target_phys_addr_t base) +int initrd_size,Phys base) { -target_phys_addr_t p; +Phys p; p = base +KERNEL_ARGS_ADDR ;/* ATAG_CORE */
@@ -103,9 +103,9 @@ static void set_kernel_args(const struct arm_boot_info *info, }static void set_kernel_args_old (const struct arm_boot_info *info, -int initrd_size,target_phys_addr_t base) +int initrd_size,Phys base) { -target_phys_addr_t p; +Phys p;const char *s;
@@ -210,7 +210,7 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info)int n;int is_linux =0 ;uint64_t elf_entry; -target_phys_addr_t entry; +Phys entry;int big_endian;/* Load the kernel. */
hw/arm_gic.c +10 -10
@@ -262,7 +262,7 @@ static void gic_complete_irq(gic_state * s, int cpu, int irq) } } -static uint32_t gic_dist_readb (void *opaque,target_phys_addr_t offset) +static uint32_t gic_dist_readb (void *opaque,Phys offset) {gic_state *s = (gic_state *)opaque;uint32_t res;
@@ -376,7 +376,7 @@ static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset)return 0 ; } -static uint32_t gic_dist_readw (void *opaque,target_phys_addr_t offset) +static uint32_t gic_dist_readw (void *opaque,Phys offset) {uint32_t val; val =gic_dist_readb (opaque, offset);
@@ -384,7 +384,7 @@ static uint32_t gic_dist_readw(void *opaque, target_phys_addr_t offset)return val; } -static uint32_t gic_dist_readl (void *opaque,target_phys_addr_t offset) +static uint32_t gic_dist_readl (void *opaque,Phys offset) {uint32_t val;#ifdef NVIC
@@ -399,7 +399,7 @@ static uint32_t gic_dist_readl(void *opaque, target_phys_addr_t offset)return val; } -static void gic_dist_writeb (void *opaque,target_phys_addr_t offset, +static void gic_dist_writeb (void *opaque,Phys offset,uint32_t value) {gic_state *s = (gic_state *)opaque;
@@ -545,14 +545,14 @@ static void gic_dist_writeb(void *opaque, target_phys_addr_t offset,hw_error ("gic_dist_writeb: Bad offset %x\n" , (int )offset); } -static void gic_dist_writew (void *opaque,target_phys_addr_t offset, +static void gic_dist_writew (void *opaque,Phys offset,uint32_t value) {gic_dist_writeb (opaque, offset, value &0xff );gic_dist_writeb (opaque, offset +1 , value >>8 ); } -static void gic_dist_writel (void *opaque,target_phys_addr_t offset, +static void gic_dist_writel (void *opaque,Phys offset,uint32_t value) {gic_state *s = (gic_state *)opaque;
@@ -648,14 +648,14 @@ static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value) }/* Wrappers to read/write the GIC CPU interface for the current CPU */ -static uint64_t gic_thiscpu_read (void *opaque,target_phys_addr_t addr, +static uint64_t gic_thiscpu_read (void *opaque,Phys addr,unsigned size) {gic_state *s = (gic_state *)opaque;return gic_cpu_read (s,gic_get_current_cpu (), addr &0xff ); } -static void gic_thiscpu_write (void *opaque,target_phys_addr_t addr, +static void gic_thiscpu_write (void *opaque,Phys addr,uint64_t value,unsigned size) {gic_state *s = (gic_state *)opaque;
@@ -665,7 +665,7 @@ static void gic_thiscpu_write(void *opaque, target_phys_addr_t addr,/* Wrappers to read/write the GIC CPU interface for a specific CPU. * These just decode the opaque pointer into gic_state* + cpu id. */ -static uint64_t gic_do_cpu_read (void *opaque,target_phys_addr_t addr, +static uint64_t gic_do_cpu_read (void *opaque,Phys addr,unsigned size) {gic_state **backref = (gic_state **)opaque;
@@ -674,7 +674,7 @@ static uint64_t gic_do_cpu_read(void *opaque, target_phys_addr_t addr,return gic_cpu_read (s, id, addr &0xff ); } -static void gic_do_cpu_write (void *opaque,target_phys_addr_t addr, +static void gic_do_cpu_write (void *opaque,Phys addr,uint64_t value,unsigned size) {gic_state **backref = (gic_state **)opaque;
hw/arm_l2x0.c +2 -2
@@ -51,7 +51,7 @@ }; -static uint64_t l2x0_priv_read (void *opaque,target_phys_addr_t offset, +static uint64_t l2x0_priv_read (void *opaque,Phys offset,unsigned size) {uint32_t cache_data;
@@ -93,7 +93,7 @@ static uint64_t l2x0_priv_read(void *opaque, target_phys_addr_t offset,return 0 ; } -static void l2x0_priv_write (void *opaque,target_phys_addr_t offset, +static void l2x0_priv_write (void *opaque,Phys offset,uint64_t value,unsigned size) {l2x0_state *s = (l2x0_state *)opaque;
hw/arm_mptimer.c +6 -6
@@ -92,7 +92,7 @@ static void timerblock_tick(void *opaque)timerblock_update_irq (tb); } -static uint64_t timerblock_read (void *opaque,target_phys_addr_t addr, +static uint64_t timerblock_read (void *opaque,Phys addr,unsigned size) {timerblock *tb = (timerblock *)opaque;
@@ -121,7 +121,7 @@ static uint64_t timerblock_read(void *opaque, target_phys_addr_t addr, } } -static void timerblock_write (void *opaque,target_phys_addr_t addr, +static void timerblock_write (void *opaque,Phys addr,uint64_t value,unsigned size) {timerblock *tb = (timerblock *)opaque;
@@ -161,7 +161,7 @@ static void timerblock_write(void *opaque, target_phys_addr_t addr,/* Wrapper functions to implement the "read timer/watchdog for * the current CPU" memory regions. */ -static uint64_t arm_thistimer_read (void *opaque,target_phys_addr_t addr, +static uint64_t arm_thistimer_read (void *opaque,Phys addr,unsigned size) {arm_mptimer_state *s = (arm_mptimer_state *)opaque;
@@ -169,7 +169,7 @@ static uint64_t arm_thistimer_read(void *opaque, target_phys_addr_t addr,return timerblock_read (&s->timerblock[id *2 ], addr, size); } -static void arm_thistimer_write (void *opaque,target_phys_addr_t addr, +static void arm_thistimer_write (void *opaque,Phys addr,uint64_t value,unsigned size) {arm_mptimer_state *s = (arm_mptimer_state *)opaque;
@@ -177,7 +177,7 @@ static void arm_thistimer_write(void *opaque, target_phys_addr_t addr,timerblock_write (&s->timerblock[id *2 ], addr, value, size); } -static uint64_t arm_thiswdog_read (void *opaque,target_phys_addr_t addr, +static uint64_t arm_thiswdog_read (void *opaque,Phys addr,unsigned size) {arm_mptimer_state *s = (arm_mptimer_state *)opaque;
@@ -185,7 +185,7 @@ static uint64_t arm_thiswdog_read(void *opaque, target_phys_addr_t addr,return timerblock_read (&s->timerblock[id *2 +1 ], addr, size); } -static void arm_thiswdog_write (void *opaque,target_phys_addr_t addr, +static void arm_thiswdog_write (void *opaque,Phys addr,uint64_t value,unsigned size) {arm_mptimer_state *s = (arm_mptimer_state *)opaque;
hw/arm_sysctl.c +2 -2
@@ -92,7 +92,7 @@ static void arm_sysctl_reset(DeviceState *d) } } -static uint64_t arm_sysctl_read (void *opaque,target_phys_addr_t offset, +static uint64_t arm_sysctl_read (void *opaque,Phys offset,unsigned size) {arm_sysctl_state *s = (arm_sysctl_state *)opaque;
@@ -189,7 +189,7 @@ static uint64_t arm_sysctl_read(void *opaque, target_phys_addr_t offset, } } -static void arm_sysctl_write (void *opaque,target_phys_addr_t offset, +static void arm_sysctl_write (void *opaque,Phys offset,uint64_t val,unsigned size) {arm_sysctl_state *s = (arm_sysctl_state *)opaque;
hw/arm_timer.c +6 -6
@@ -44,7 +44,7 @@ static void arm_timer_update(arm_timer_state *s) } } -static uint32_t arm_timer_read (void *opaque,target_phys_addr_t offset) +static uint32_t arm_timer_read (void *opaque,Phys offset) {arm_timer_state *s = (arm_timer_state *)opaque;
@@ -86,7 +86,7 @@ static void arm_timer_recalibrate(arm_timer_state *s, int reload)ptimer_set_limit (s->timer, limit, reload); } -static void arm_timer_write (void *opaque,target_phys_addr_t offset, +static void arm_timer_write (void *opaque,Phys offset,uint32_t value) {arm_timer_state *s = (arm_timer_state *)opaque;
@@ -201,7 +201,7 @@ static void sp804_set_irq(void *opaque, int irq, int level)qemu_set_irq (s->irq, s->level[0 ] || s->level[1 ]); } -static uint64_t sp804_read (void *opaque,target_phys_addr_t offset, +static uint64_t sp804_read (void *opaque,Phys offset,unsigned size) {sp804_state *s = (sp804_state *)opaque;
@@ -229,7 +229,7 @@ static uint64_t sp804_read(void *opaque, target_phys_addr_t offset,return 0 ; } -static void sp804_write (void *opaque,target_phys_addr_t offset, +static void sp804_write (void *opaque,Phys offset,uint64_t value,unsigned size) {sp804_state *s = (sp804_state *)opaque;
@@ -304,7 +304,7 @@ static int sp804_init(SysBusDevice *dev)arm_timer_state *timer[3 ]; } icp_pit_state; -static uint64_t icp_pit_read (void *opaque,target_phys_addr_t offset, +static uint64_t icp_pit_read (void *opaque,Phys offset,unsigned size) {icp_pit_state *s = (icp_pit_state *)opaque;
@@ -319,7 +319,7 @@ static uint64_t icp_pit_read(void *opaque, target_phys_addr_t offset,return arm_timer_read (s->timer[n], offset &0xff ); } -static void icp_pit_write (void *opaque,target_phys_addr_t offset, +static void icp_pit_write (void *opaque,Phys offset,uint64_t value,unsigned size) {icp_pit_state *s = (icp_pit_state *)opaque;
hw/armv7m.c +6 -6
@@ -25,14 +25,14 @@ static inline uint32_t bitband_addr(void * opaque, uint32_t addr) } -static uint32_t bitband_readb (void *opaque,target_phys_addr_t offset) +static uint32_t bitband_readb (void *opaque,Phys offset) {uint8_t v;cpu_physical_memory_read (bitband_addr (opaque, offset), &v,1 );return (v & (1 << ((offset >>2 ) &7 ))) !=0 ; } -static void bitband_writeb (void *opaque,target_phys_addr_t offset, +static void bitband_writeb (void *opaque,Phys offset,uint32_t value) {uint32_t addr;
@@ -48,7 +48,7 @@ static void bitband_writeb(void *opaque, target_phys_addr_t offset,cpu_physical_memory_write (addr, &v,1 ); } -static uint32_t bitband_readw (void *opaque,target_phys_addr_t offset) +static uint32_t bitband_readw (void *opaque,Phys offset) {uint32_t addr;uint16_t mask;
@@ -60,7 +60,7 @@ static uint32_t bitband_readw(void *opaque, target_phys_addr_t offset)return (v & mask) !=0 ; } -static void bitband_writew (void *opaque,target_phys_addr_t offset, +static void bitband_writew (void *opaque,Phys offset,uint32_t value) {uint32_t addr;
@@ -77,7 +77,7 @@ static void bitband_writew(void *opaque, target_phys_addr_t offset,cpu_physical_memory_write (addr, (uint8_t *)&v,2 ); } -static uint32_t bitband_readl (void *opaque,target_phys_addr_t offset) +static uint32_t bitband_readl (void *opaque,Phys offset) {uint32_t addr;uint32_t mask;
@@ -89,7 +89,7 @@ static uint32_t bitband_readl(void *opaque, target_phys_addr_t offset)return (v & mask) !=0 ; } -static void bitband_writel (void *opaque,target_phys_addr_t offset, +static void bitband_writel (void *opaque,Phys offset,uint32_t value) {uint32_t addr;
hw/axis_dev88.c +4 -4
@@ -47,7 +47,7 @@ struct nand_state_t };static struct nand_state_t nand_state; -static uint64_t nand_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t nand_read (void *opaque,Phys addr,unsigned size) {struct nand_state_t *s = opaque;uint32_t r;
@@ -62,7 +62,7 @@ static uint64_t nand_read(void *opaque, target_phys_addr_t addr, unsigned size) }static void -nand_write (void *opaque,target_phys_addr_t addr,uint64_t value, +nand_write (void *opaque,Phys addr,uint64_t value,unsigned size) {struct nand_state_t *s = opaque;
@@ -166,7 +166,7 @@ static void tempsensor_clkedge(struct tempsensor_t *s,uint32_t regs[0x5c /4 ]; } gpio_state; -static uint64_t gpio_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t gpio_read (void *opaque,Phys addr,unsigned size) {struct gpio_state_t *s = opaque;uint32_t r =0 ;
@@ -195,7 +195,7 @@ static uint64_t gpio_read(void *opaque, target_phys_addr_t addr, unsigned size)D (printf ("%s %x=%x\n" , __func__, addr, r)); } -static void gpio_write (void *opaque,target_phys_addr_t addr,uint64_t value, +static void gpio_write (void *opaque,Phys addr,uint64_t value,unsigned size) {struct gpio_state_t *s = opaque;
hw/bonito.c +19 -19
@@ -205,19 +205,19 @@MemoryRegion iomem_ldma;MemoryRegion iomem_cop; -target_phys_addr_t bonito_pciio_start; -target_phys_addr_t bonito_pciio_length; +Phys bonito_pciio_start; +Phys bonito_pciio_length;int bonito_pciio_handle; -target_phys_addr_t bonito_localio_start; -target_phys_addr_t bonito_localio_length; +Phys bonito_localio_start; +Phys bonito_localio_length;int bonito_localio_handle; } PCIBonitoState;PCIBonitoState * bonito_state; -static void bonito_writel (void *opaque,target_phys_addr_t addr, +static void bonito_writel (void *opaque,Phys addr,uint64_t val,unsigned size) {PCIBonitoState *s = opaque;
@@ -280,7 +280,7 @@ static void bonito_writel(void *opaque, target_phys_addr_t addr, } } -static uint64_t bonito_readl (void *opaque,target_phys_addr_t addr, +static uint64_t bonito_readl (void *opaque,Phys addr,unsigned size) {PCIBonitoState *s = opaque;
@@ -307,7 +307,7 @@ static uint64_t bonito_readl(void *opaque, target_phys_addr_t addr, }, }; -static void bonito_pciconf_writel (void *opaque,target_phys_addr_t addr, +static void bonito_pciconf_writel (void *opaque,Phys addr,uint64_t val,unsigned size) {PCIBonitoState *s = opaque;
@@ -316,7 +316,7 @@ static void bonito_pciconf_writel(void *opaque, target_phys_addr_t addr, s->dev.config_write (&s->dev, addr, val,4 ); } -static uint64_t bonito_pciconf_readl (void *opaque,target_phys_addr_t addr, +static uint64_t bonito_pciconf_readl (void *opaque,Phys addr,unsigned size) {
@@ -338,7 +338,7 @@ static uint64_t bonito_pciconf_readl(void *opaque, target_phys_addr_t addr, }, }; -static uint64_t bonito_ldma_readl (void *opaque,target_phys_addr_t addr, +static uint64_t bonito_ldma_readl (void *opaque,Phys addr,unsigned size) {uint32_t val;
@@ -349,7 +349,7 @@ static uint64_t bonito_ldma_readl(void *opaque, target_phys_addr_t addr,return val; } -static void bonito_ldma_writel (void *opaque,target_phys_addr_t addr, +static void bonito_ldma_writel (void *opaque,Phys addr,uint64_t val,unsigned size) {PCIBonitoState *s = opaque;
@@ -367,7 +367,7 @@ static void bonito_ldma_writel(void *opaque, target_phys_addr_t addr, }, }; -static uint64_t bonito_cop_readl (void *opaque,target_phys_addr_t addr, +static uint64_t bonito_cop_readl (void *opaque,Phys addr,unsigned size) {uint32_t val;
@@ -378,7 +378,7 @@ static uint64_t bonito_cop_readl(void *opaque, target_phys_addr_t addr,return val; } -static void bonito_cop_writel (void *opaque,target_phys_addr_t addr, +static void bonito_cop_writel (void *opaque,Phys addr,uint64_t val,unsigned size) {PCIBonitoState *s = opaque;
@@ -396,7 +396,7 @@ static void bonito_cop_writel(void *opaque, target_phys_addr_t addr, }, }; -static uint32_t bonito_sbridge_pciaddr (void *opaque,target_phys_addr_t addr) +static uint32_t bonito_sbridge_pciaddr (void *opaque,Phys addr) {PCIBonitoState *s = opaque;uint32_t cfgaddr;
@@ -431,7 +431,7 @@ static uint32_t bonito_sbridge_pciaddr(void *opaque, target_phys_addr_t addr)return pciaddr; } -static void bonito_spciconf_writeb (void *opaque,target_phys_addr_t addr, +static void bonito_spciconf_writeb (void *opaque,Phys addr,uint32_t val) {PCIBonitoState *s = opaque;
@@ -455,7 +455,7 @@ static void bonito_spciconf_writeb(void *opaque, target_phys_addr_t addr,pci_set_word (s->dev.config +PCI_STATUS , status); } -static void bonito_spciconf_writew (void *opaque,target_phys_addr_t addr, +static void bonito_spciconf_writew (void *opaque,Phys addr,uint32_t val) {PCIBonitoState *s = opaque;
@@ -481,7 +481,7 @@ static void bonito_spciconf_writew(void *opaque, target_phys_addr_t addr,pci_set_word (s->dev.config +PCI_STATUS , status); } -static void bonito_spciconf_writel (void *opaque,target_phys_addr_t addr, +static void bonito_spciconf_writel (void *opaque,Phys addr,uint32_t val) {PCIBonitoState *s = opaque;
@@ -507,7 +507,7 @@ static void bonito_spciconf_writel(void *opaque, target_phys_addr_t addr,pci_set_word (s->dev.config +PCI_STATUS , status); } -static uint32_t bonito_spciconf_readb (void *opaque,target_phys_addr_t addr) +static uint32_t bonito_spciconf_readb (void *opaque,Phys addr) {PCIBonitoState *s = opaque;uint32_t pciaddr;
@@ -531,7 +531,7 @@ static uint32_t bonito_spciconf_readb(void *opaque, target_phys_addr_t addr)return pci_data_read (s->pcihost->bus, s->pcihost->config_reg,1 ); } -static uint32_t bonito_spciconf_readw (void *opaque,target_phys_addr_t addr) +static uint32_t bonito_spciconf_readw (void *opaque,Phys addr) {PCIBonitoState *s = opaque;uint32_t pciaddr;
@@ -557,7 +557,7 @@ static uint32_t bonito_spciconf_readw(void *opaque, target_phys_addr_t addr)return pci_data_read (s->pcihost->bus, s->pcihost->config_reg,2 ); } -static uint32_t bonito_spciconf_readl (void *opaque,target_phys_addr_t addr) +static uint32_t bonito_spciconf_readl (void *opaque,Phys addr) {PCIBonitoState *s = opaque;uint32_t pciaddr;
hw/cirrus_vga.c +8 -8
@@ -1954,7 +1954,7 @@ static void cirrus_mem_writeb_mode4and5_16bpp(CirrusVGAState * s,***************************************/ static uint64_t cirrus_vga_mem_read (void *opaque, -target_phys_addr_t addr, +Phys addr,uint32_t size) {CirrusVGAState *s = opaque;
@@ -1998,7 +1998,7 @@ static uint64_t cirrus_vga_mem_read(void *opaque, }static void cirrus_vga_mem_write (void *opaque, -target_phys_addr_t addr, +Phys addr,uint64_t mem_value,uint32_t size) {
@@ -2247,7 +2247,7 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)* ***************************************/ -static uint64_t cirrus_linear_read (void *opaque,target_phys_addr_t addr, +static uint64_t cirrus_linear_read (void *opaque,Phys addr,unsigned size) {CirrusVGAState *s = opaque;
@@ -2276,7 +2276,7 @@ static uint64_t cirrus_linear_read(void *opaque, target_phys_addr_t addr,return ret; } -static void cirrus_linear_write (void *opaque,target_phys_addr_t addr, +static void cirrus_linear_write (void *opaque,Phys addr,uint64_t val,unsigned size) {CirrusVGAState *s = opaque;
@@ -2325,7 +2325,7 @@ static void cirrus_linear_write(void *opaque, target_phys_addr_t addr,static uint64_t cirrus_linear_bitblt_read (void *opaque, -target_phys_addr_t addr, +Phys addr,unsigned size) {CirrusVGAState *s = opaque;
@@ -2338,7 +2338,7 @@ static uint64_t cirrus_linear_bitblt_read(void *opaque, }static void cirrus_linear_bitblt_write (void *opaque, -target_phys_addr_t addr, +Phys addr,uint64_t val,unsigned size) {
@@ -2628,7 +2628,7 @@ static void cirrus_vga_ioport_write(void *opaque, uint32_t addr, uint32_t val)* ***************************************/ -static uint64_t cirrus_mmio_read (void *opaque,target_phys_addr_t addr, +static uint64_t cirrus_mmio_read (void *opaque,Phys addr,unsigned size) {CirrusVGAState *s = opaque;
@@ -2640,7 +2640,7 @@ static uint64_t cirrus_mmio_read(void *opaque, target_phys_addr_t addr, } } -static void cirrus_mmio_write (void *opaque,target_phys_addr_t addr, +static void cirrus_mmio_write (void *opaque,Phys addr,uint64_t val,unsigned size) {CirrusVGAState *s = opaque;
hw/cris-boot.h +1 -1
@@ -5,7 +5,7 @@ struct cris_load_infoconst char *cmdline;int image_size; -target_phys_addr_t entry; +Phys entry; };void cris_load_image (CPUState *env,struct cris_load_info *li);
hw/cs4231.c +2 -2
@@ -55,7 +55,7 @@ static void cs_reset(DeviceState *d) s->dregs[25 ] =CS_VER ; } -static uint64_t cs_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t cs_mem_read (void *opaque,Phys addr,unsigned size) {CSState *s = opaque;
@@ -82,7 +82,7 @@ static uint64_t cs_mem_read(void *opaque, target_phys_addr_t addr,return ret; } -static void cs_mem_write (void *opaque,target_phys_addr_t addr, +static void cs_mem_write (void *opaque,Phys addr,uint64_t val,unsigned size) {CSState *s = opaque;
hw/cs4231a.c +2 -2
@@ -346,7 +346,7 @@ static void cs_reset_voices (CSState *s, uint32_t val) } } -static uint64_t cs_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t cs_read (void *opaque,Phys addr,unsigned size) {CSState *s = opaque;uint32_t saddr, iaddr, ret;
@@ -383,7 +383,7 @@ static uint64_t cs_read (void *opaque, target_phys_addr_t addr, unsigned size)return ret; } -static void cs_write (void *opaque,target_phys_addr_t addr, +static void cs_write (void *opaque,Phys addr,uint64_t val64,unsigned size) {CSState *s = opaque;
hw/cuda.c +6 -6
@@ -252,7 +252,7 @@ static void cuda_timer1(void *opaque)cuda_update_irq (s); } -static uint32_t cuda_readb (void *opaque,target_phys_addr_t addr) +static uint32_t cuda_readb (void *opaque,Phys addr) {CUDAState *s = opaque;uint32_t val;
@@ -325,7 +325,7 @@ static uint32_t cuda_readb(void *opaque, target_phys_addr_t addr)return val; } -static void cuda_writeb (void *opaque,target_phys_addr_t addr,uint32_t val) +static void cuda_writeb (void *opaque,Phys addr,uint32_t val) {CUDAState *s = opaque;
@@ -616,20 +616,20 @@ static void cuda_receive_packet_from_host(CUDAState *s, } } -static void cuda_writew (void *opaque,target_phys_addr_t addr,uint32_t value) +static void cuda_writew (void *opaque,Phys addr,uint32_t value) { } -static void cuda_writel (void *opaque,target_phys_addr_t addr,uint32_t value) +static void cuda_writel (void *opaque,Phys addr,uint32_t value) { } -static uint32_t cuda_readw (void *opaque,target_phys_addr_t addr) +static uint32_t cuda_readw (void *opaque,Phys addr) {return 0 ; } -static uint32_t cuda_readl (void *opaque,target_phys_addr_t addr) +static uint32_t cuda_readl (void *opaque,Phys addr) {return 0 ; }
hw/dma.c +2 -2
@@ -411,7 +411,7 @@ void DMA_register_channel (int nchan,int DMA_read_memory (int nchan,void *buf,int pos,int len) {struct dma_regs *r = &dma_controllers[nchan >3 ].regs[nchan &3 ]; -target_phys_addr_t addr = ((r->pageh &0x7f ) <<24 ) | (r->page <<16 ) | r->now[ADDR ]; +Phys addr = ((r->pageh &0x7f ) <<24 ) | (r->page <<16 ) | r->now[ADDR ];if (r->mode &0x20 ) {int i;
@@ -433,7 +433,7 @@ int DMA_read_memory (int nchan, void *buf, int pos, int len)int DMA_write_memory (int nchan,void *buf,int pos,int len) {struct dma_regs *r = &dma_controllers[nchan >3 ].regs[nchan &3 ]; -target_phys_addr_t addr = ((r->pageh &0x7f ) <<24 ) | (r->page <<16 ) | r->now[ADDR ]; +Phys addr = ((r->pageh &0x7f ) <<24 ) | (r->page <<16 ) | r->now[ADDR ];if (r->mode &0x20 ) {int i;
hw/dp8393x.c +9 -9
@@ -168,7 +168,7 @@int loopback_packet;/* Memory access */ -void (*memory_rw)(void *opaque,target_phys_addr_t addr,uint8_t *buf,int len,int is_write); +void (*memory_rw)(void *opaque,Phys addr,uint8_t *buf,int len,int is_write);void * mem_opaque; } dp8393xState;
@@ -603,7 +603,7 @@ static void dp8393x_watchdog(void *opaque)dp8393x_update_irq (s); } -static uint32_t dp8393x_readw (void *opaque,target_phys_addr_t addr) +static uint32_t dp8393x_readw (void *opaque,Phys addr) {dp8393xState *s = opaque;int reg;
@@ -616,13 +616,13 @@ static uint32_t dp8393x_readw(void *opaque, target_phys_addr_t addr)return read_register (s, reg); } -static uint32_t dp8393x_readb (void *opaque,target_phys_addr_t addr) +static uint32_t dp8393x_readb (void *opaque,Phys addr) {uint16_t v =dp8393x_readw (opaque, addr & ~0x1 );return (v >> (8 * (addr &0x1 ))) &0xff ; } -static uint32_t dp8393x_readl (void *opaque,target_phys_addr_t addr) +static uint32_t dp8393x_readl (void *opaque,Phys addr) {uint32_t v; v =dp8393x_readw (opaque, addr);
@@ -630,7 +630,7 @@ static uint32_t dp8393x_readl(void *opaque, target_phys_addr_t addr)return v; } -static void dp8393x_writew (void *opaque,target_phys_addr_t addr,uint32_t val) +static void dp8393x_writew (void *opaque,Phys addr,uint32_t val) {dp8393xState *s = opaque;int reg;
@@ -644,7 +644,7 @@ static void dp8393x_writew(void *opaque, target_phys_addr_t addr, uint32_t val)write_register (s, reg, (uint16_t )val); } -static void dp8393x_writeb (void *opaque,target_phys_addr_t addr,uint32_t val) +static void dp8393x_writeb (void *opaque,Phys addr,uint32_t val) {uint16_t old_val =dp8393x_readw (opaque, addr & ~0x1 );
@@ -659,7 +659,7 @@ static void dp8393x_writeb(void *opaque, target_phys_addr_t addr, uint32_t val)dp8393x_writew (opaque, addr & ~0x1 , val); } -static void dp8393x_writel (void *opaque,target_phys_addr_t addr,uint32_t val) +static void dp8393x_writel (void *opaque,Phys addr,uint32_t val) {dp8393x_writew (opaque, addr, val &0xffff );dp8393x_writew (opaque, addr +2 , (val >>16 ) &0xffff );
@@ -879,10 +879,10 @@ static void nic_cleanup(VLANClientState *nc) .cleanup = nic_cleanup, }; -void dp83932_init (NICInfo *nd,target_phys_addr_t base,int it_shift, +void dp83932_init (NICInfo *nd,Phys base,int it_shift,MemoryRegion *address_space,qemu_irq irq,void * mem_opaque, -void (*memory_rw)(void *opaque,target_phys_addr_t addr,uint8_t *buf,int len,int is_write)) +void (*memory_rw)(void *opaque,Phys addr,uint8_t *buf,int len,int is_write)) {dp8393xState *s;
hw/ds1225y.c +2 -2
@@ -34,7 +34,7 @@uint8_t *contents; } NvRamState; -static uint64_t nvram_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t nvram_read (void *opaque,Phys addr,unsigned size) {NvRamState *s = opaque;uint32_t val;
@@ -44,7 +44,7 @@ static uint64_t nvram_read(void *opaque, target_phys_addr_t addr, unsigned size)return val; } -static void nvram_write (void *opaque,target_phys_addr_t addr,uint64_t val, +static void nvram_write (void *opaque,Phys addr,uint64_t val,unsigned size) {NvRamState *s = opaque;
hw/dummy_m68k.c +1 -1
@@ -26,7 +26,7 @@ static void dummy_m68k_init(ram_addr_t ram_size,MemoryRegion *ram =g_new (MemoryRegion,1 );int kernel_size;uint64_t elf_entry; -target_phys_addr_t entry; +Phys entry;if (!cpu_model) cpu_model ="cfv4e" ;
hw/e1000.c +4 -4
@@ -901,7 +901,7 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = {enum {NWRITEOPS =ARRAY_SIZE (macreg_writeops) };static void -e1000_mmio_write (void *opaque,target_phys_addr_t addr,uint64_t val, +e1000_mmio_write (void *opaque,Phys addr,uint64_t val,unsigned size) {E1000State *s = opaque;
@@ -918,7 +918,7 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = { }static uint64_t -e1000_mmio_read (void *opaque,target_phys_addr_t addr,unsigned size) +e1000_mmio_read (void *opaque,Phys addr,unsigned size) {E1000State *s = opaque;unsigned int index = (addr &0x1ffff ) >>2 ;
@@ -941,7 +941,7 @@ static void (*macreg_writeops[])(E1000State *, int, uint32_t) = { }, }; -static uint64_t e1000_io_read (void *opaque,target_phys_addr_t addr, +static uint64_t e1000_io_read (void *opaque,Phys addr,unsigned size) {E1000State *s = opaque;
@@ -950,7 +950,7 @@ static uint64_t e1000_io_read(void *opaque, target_phys_addr_t addr,return 0 ; } -static void e1000_io_write (void *opaque,target_phys_addr_t addr, +static void e1000_io_write (void *opaque,Phys addr,uint64_t val,unsigned size) {E1000State *s = opaque;
hw/eccmemctl.c +4 -4
@@ -129,7 +129,7 @@uint32_t version; } ECCState; -static void ecc_mem_write (void *opaque,target_phys_addr_t addr,uint64_t val, +static void ecc_mem_write (void *opaque,Phys addr,uint64_t val,unsigned size) {ECCState *s = opaque;
@@ -172,7 +172,7 @@ static void ecc_mem_write(void *opaque, target_phys_addr_t addr, uint64_t val, } } -static uint64_t ecc_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t ecc_mem_read (void *opaque,Phys addr,unsigned size) {ECCState *s = opaque;
@@ -229,7 +229,7 @@ static uint64_t ecc_mem_read(void *opaque, target_phys_addr_t addr, }, }; -static void ecc_diag_mem_write (void *opaque,target_phys_addr_t addr, +static void ecc_diag_mem_write (void *opaque,Phys addr,uint64_t val,unsigned size) {ECCState *s = opaque;
@@ -238,7 +238,7 @@ static void ecc_diag_mem_write(void *opaque, target_phys_addr_t addr, s->diag[addr &ECC_DIAG_MASK ] = val; } -static uint64_t ecc_diag_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t ecc_diag_mem_read (void *opaque,Phys addr,unsigned size) {ECCState *s = opaque;
hw/eepro100.c +2 -2
@@ -1569,7 +1569,7 @@ static void eepro100_write4(EEPRO100State * s, uint32_t addr, uint32_t val) } } -static uint64_t eepro100_read (void *opaque,target_phys_addr_t addr, +static uint64_t eepro100_read (void *opaque,Phys addr,unsigned size) {EEPRO100State *s = opaque;
@@ -1582,7 +1582,7 @@ static uint64_t eepro100_read(void *opaque, target_phys_addr_t addr, } } -static void eepro100_write (void *opaque,target_phys_addr_t addr, +static void eepro100_write (void *opaque,Phys addr,uint64_t data,unsigned size) {EEPRO100State *s = opaque;
hw/elf_ops.h +1 -1
@@ -74,7 +74,7 @@ static int glue(symfind, SZ)(const void *s0, const void *s1) }static const char *glue (lookup_symbol ,SZ )(struct syminfo *s, -target_phys_addr_t orig_addr) +Phys orig_addr) {struct elf_sym *syms =glue (s->disas_symtab.elf,SZ );struct elf_sym key;
hw/empty_slot.c +3 -3
@@ -28,14 +28,14 @@uint64_t size; } EmptySlot; -static uint64_t empty_slot_read (void *opaque,target_phys_addr_t addr, +static uint64_t empty_slot_read (void *opaque,Phys addr,unsigned size) {DPRINTF ("read from " TARGET_FMT_plx"\n" , addr);return 0 ; } -static void empty_slot_write (void *opaque,target_phys_addr_t addr, +static void empty_slot_write (void *opaque,Phys addr,uint64_t val,unsigned size) {DPRINTF ("write 0x%x to " TARGET_FMT_plx"\n" , (unsigned )val, addr);
@@ -47,7 +47,7 @@ static void empty_slot_write(void *opaque, target_phys_addr_t addr, .endianness = DEVICE_NATIVE_ENDIAN, }; -void empty_slot_init (target_phys_addr_t addr,uint64_t slot_size) +void empty_slot_init (Phys addr,uint64_t slot_size) {if (slot_size >0 ) {/* Only empty slots larger than 0 byte need handling. */
hw/empty_slot.h +1 -1
@@ -1,2 +1,2 @@/* empty_slot.c */ -void empty_slot_init (target_phys_addr_t addr,uint64_t slot_size); +void empty_slot_init (Phys addr,uint64_t slot_size);
hw/escc.c +4 -4
@@ -463,7 +463,7 @@ static void escc_update_parameters(ChannelState *s)qemu_chr_fe_ioctl (s->chr,CHR_IOCTL_SERIAL_SET_PARAMS , &ssp); } -static void escc_mem_write (void *opaque,target_phys_addr_t addr, +static void escc_mem_write (void *opaque,Phys addr,uint64_t val,unsigned size) {SerialState *serial = opaque;
@@ -565,7 +565,7 @@ static void escc_mem_write(void *opaque, target_phys_addr_t addr, } } -static uint64_t escc_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t escc_mem_read (void *opaque,Phys addr,unsigned size) {SerialState *serial = opaque;
@@ -683,7 +683,7 @@ static void serial_event(void *opaque, int event) } }; -MemoryRegion *escc_init (target_phys_addr_t base,qemu_irq irqA,qemu_irq irqB, +MemoryRegion *escc_init (Phys base,qemu_irq irqA,qemu_irq irqB,CharDriverState *chrA,CharDriverState *chrB,int clock,int it_shift) {
@@ -846,7 +846,7 @@ static void sunmouse_event(void *opaque,put_queue (s,0 ); } -void slavio_serial_ms_kbd_init (target_phys_addr_t base,qemu_irq irq, +void slavio_serial_ms_kbd_init (Phys base,qemu_irq irq,int disabled,int clock,int it_shift) {DeviceState *dev;
hw/escc.h +2 -2
@@ -1,8 +1,8 @@/* escc.c */ #define ESCC_SIZE 4 -MemoryRegion *escc_init (target_phys_addr_t base,qemu_irq irqA,qemu_irq irqB, +MemoryRegion *escc_init (Phys base,qemu_irq irqA,qemu_irq irqB,CharDriverState *chrA,CharDriverState *chrB,int clock,int it_shift); -void slavio_serial_ms_kbd_init (target_phys_addr_t base,qemu_irq irq, +void slavio_serial_ms_kbd_init (Phys base,qemu_irq irq,int disabled,int clock,int it_shift);
hw/esp.c +4 -4
@@ -505,7 +505,7 @@ static void esp_gpio_demux(void *opaque, int irq, int level) } } -static uint64_t esp_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t esp_mem_read (void *opaque,Phys addr,unsigned size) {ESPState *s = opaque;
@@ -547,7 +547,7 @@ static uint64_t esp_mem_read(void *opaque, target_phys_addr_t addr,return s->rregs[saddr]; } -static void esp_mem_write (void *opaque,target_phys_addr_t addr, +static void esp_mem_write (void *opaque,Phys addr,uint64_t val,unsigned size) {ESPState *s = opaque;
@@ -665,7 +665,7 @@ static void esp_mem_write(void *opaque, target_phys_addr_t addr, s->wregs[saddr] = val; } -static bool esp_mem_accepts (void *opaque,target_phys_addr_t addr, +static bool esp_mem_accepts (void *opaque,Phys addr,unsigned size,bool is_write) {return (size ==1 ) || (is_write && size ==4 );
@@ -700,7 +700,7 @@ static bool esp_mem_accepts(void *opaque, target_phys_addr_t addr, } }; -void esp_init(target_phys_addr_t espaddr, int it_shift, +void esp_init(Phys espaddr, int it_shift, ESPDMAMemoryReadWriteFunc dma_memory_read, ESPDMAMemoryReadWriteFunc dma_memory_write, void *dma_opaque, qemu_irq irq, qemu_irq *reset,
hw/esp.h +1 -1
@@ -4,7 +4,7 @@/* esp.c */ #define ESP_MAX_DEVS 7typedef void (*ESPDMAMemoryReadWriteFunc )(void *opaque,uint8_t *buf,int len); -void esp_init(target_phys_addr_t espaddr, int it_shift, +void esp_init(Phys espaddr, int it_shift, ESPDMAMemoryReadWriteFunc dma_memory_read, ESPDMAMemoryReadWriteFunc dma_memory_write, void *dma_opaque, qemu_irq irq, qemu_irq *reset,
hw/etraxfs.h +1 -1
@@ -29,7 +29,7 @@ qemu_irq *cris_pic_init_cpu(CPUState *env);/* Instantiate an ETRAXFS Ethernet MAC. */ static inline DeviceState * -etraxfs_eth_init (NICInfo *nd,target_phys_addr_t base,int phyaddr, +etraxfs_eth_init (NICInfo *nd,Phys base,int phyaddr,void *dma_out,void *dma_in) {DeviceState *dev;
hw/etraxfs_dma.c +11 -11
@@ -212,7 +212,7 @@ static inline int channel_en(struct fs_dma_ctrl *ctrl, int c) && ctrl->channels[c].client; } -static inline int fs_channel (target_phys_addr_t addr) +static inline int fs_channel (Phys addr) {/* Every channel has a 0x2000 ctrl register map. */ return addr >>13 ;
@@ -221,7 +221,7 @@ static inline int fs_channel(target_phys_addr_t addr)#ifdef USE_THIS_DEAD_CODE static void channel_load_g (struct fs_dma_ctrl *ctrl,int c) { -target_phys_addr_t addr =channel_reg (ctrl, c,RW_GROUP ); +Phys addr =channel_reg (ctrl, c,RW_GROUP );/* Load and decode. FIXME: handle endianness. */ cpu_physical_memory_read (addr,
@@ -253,7 +253,7 @@ static void dump_d(int ch, struct dma_descr_data *d)static void channel_load_c (struct fs_dma_ctrl *ctrl,int c) { -target_phys_addr_t addr =channel_reg (ctrl, c,RW_GROUP_DOWN ); +Phys addr =channel_reg (ctrl, c,RW_GROUP_DOWN );/* Load and decode. FIXME: handle endianness. */ cpu_physical_memory_read (addr,
@@ -270,7 +270,7 @@ static void channel_load_c(struct fs_dma_ctrl *ctrl, int c)static void channel_load_d (struct fs_dma_ctrl *ctrl,int c) { -target_phys_addr_t addr =channel_reg (ctrl, c,RW_SAVED_DATA ); +Phys addr =channel_reg (ctrl, c,RW_SAVED_DATA );/* Load and decode. FIXME: handle endianness. */ D (printf ("%s ch=%d addr=" TARGET_FMT_plx"\n" , __func__, c, addr));
@@ -284,7 +284,7 @@ static void channel_load_d(struct fs_dma_ctrl *ctrl, int c)static void channel_store_c (struct fs_dma_ctrl *ctrl,int c) { -target_phys_addr_t addr =channel_reg (ctrl, c,RW_GROUP_DOWN ); +Phys addr =channel_reg (ctrl, c,RW_GROUP_DOWN );/* Encode and store. FIXME: handle endianness. */ D (printf ("%s ch=%d addr=" TARGET_FMT_plx"\n" , __func__, c, addr));
@@ -296,7 +296,7 @@ static void channel_store_c(struct fs_dma_ctrl *ctrl, int c)static void channel_store_d (struct fs_dma_ctrl *ctrl,int c) { -target_phys_addr_t addr =channel_reg (ctrl, c,RW_SAVED_DATA ); +Phys addr =channel_reg (ctrl, c,RW_SAVED_DATA );/* Encode and store. FIXME: handle endianness. */ D (printf ("%s ch=%d addr=" TARGET_FMT_plx"\n" , __func__, c, addr));
@@ -557,14 +557,14 @@ static inline int channel_in_run(struct fs_dma_ctrl *ctrl, int c)return 0 ; } -static uint32_t dma_rinvalid (void *opaque,target_phys_addr_t addr) +static uint32_t dma_rinvalid (void *opaque,Phys addr) {hw_error ("Unsupported short raccess. reg=" TARGET_FMT_plx"\n" , addr);return 0 ; }static uint64_t -dma_read (void *opaque,target_phys_addr_t addr,unsigned int size) +dma_read (void *opaque,Phys addr,unsigned int size) {struct fs_dma_ctrl *ctrl = opaque;int c;
@@ -596,7 +596,7 @@ static uint32_t dma_rinvalid (void *opaque, target_phys_addr_t addr) }static void -dma_winvalid (void *opaque,target_phys_addr_t addr,uint32_t value) +dma_winvalid (void *opaque,Phys addr,uint32_t value) {hw_error ("Unsupported short waccess. reg=" TARGET_FMT_plx"\n" , addr); }
@@ -611,7 +611,7 @@ static uint32_t dma_rinvalid (void *opaque, target_phys_addr_t addr) }static void -dma_write (void *opaque,target_phys_addr_t addr, +dma_write (void *opaque,Phys addr,uint64_t val64,unsigned int size) {struct fs_dma_ctrl *ctrl = opaque;
@@ -746,7 +746,7 @@ static void DMA_run(void *opaque)qemu_bh_schedule_idle (etraxfs_dmac->bh); } -void *etraxfs_dmac_init (target_phys_addr_t base,int nr_channels) +void *etraxfs_dmac_init (Phys base,int nr_channels) {struct fs_dma_ctrl *ctrl =NULL ;
hw/etraxfs_dma.h +1 -1
@@ -13,7 +13,7 @@ struct etraxfs_dma_client } client; }; -void *etraxfs_dmac_init (target_phys_addr_t base,int nr_channels); +void *etraxfs_dmac_init (Phys base,int nr_channels);void etraxfs_dmac_connect (void *opaque,int channel,qemu_irq *line,int input); void etraxfs_dmac_connect_client(void *opaque, int c,
hw/etraxfs_eth.c +2 -2
@@ -374,7 +374,7 @@ static void eth_validate_duplex(struct fs_eth *eth) }static uint64_t -eth_read (void *opaque,target_phys_addr_t addr,unsigned int size) +eth_read (void *opaque,Phys addr,unsigned int size) {struct fs_eth *eth = opaque;uint32_t r =0 ;
@@ -418,7 +418,7 @@ static void eth_update_ma(struct fs_eth *eth, int ma) }static void -eth_write (void *opaque,target_phys_addr_t addr, +eth_write (void *opaque,Phys addr,uint64_t val64,unsigned int size) {struct fs_eth *eth = opaque;
hw/etraxfs_pic.c +2 -2
@@ -79,7 +79,7 @@ static void pic_update(struct etrax_pic *fs) }static uint64_t -pic_read (void *opaque,target_phys_addr_t addr,unsigned int size) +pic_read (void *opaque,Phys addr,unsigned int size) {struct etrax_pic *fs = opaque;uint32_t rval;
@@ -89,7 +89,7 @@ static void pic_update(struct etrax_pic *fs)return rval; } -static void pic_write (void *opaque,target_phys_addr_t addr, +static void pic_write (void *opaque,Phys addr,uint64_t value,unsigned int size) {struct etrax_pic *fs = opaque;
hw/etraxfs_ser.c +2 -2
@@ -75,7 +75,7 @@ static void ser_update_irq(struct etrax_serial *s) }static uint64_t -ser_read (void *opaque,target_phys_addr_t addr,unsigned int size) +ser_read (void *opaque,Phys addr,unsigned int size) {struct etrax_serial *s = opaque;D (CPUState *env = s->env);
@@ -110,7 +110,7 @@ static void ser_update_irq(struct etrax_serial *s) }static void -ser_write (void *opaque,target_phys_addr_t addr, +ser_write (void *opaque,Phys addr,uint64_t val64,unsigned int size) {struct etrax_serial *s = opaque;
hw/etraxfs_timer.c +2 -2
@@ -74,7 +74,7 @@ struct etrax_timer { };static uint64_t -timer_read (void *opaque,target_phys_addr_t addr,unsigned int size) +timer_read (void *opaque,Phys addr,unsigned int size) {struct etrax_timer *t = opaque;uint32_t r =0 ;
@@ -241,7 +241,7 @@ static inline void timer_watchdog_update(struct etrax_timer *t, uint32_t value) }static void -timer_write (void *opaque,target_phys_addr_t addr, +timer_write (void *opaque,Phys addr,uint64_t val64,unsigned int size) {struct etrax_timer *t = opaque;
hw/fdc.c +4 -4
@@ -492,13 +492,13 @@ static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value) } } -static uint64_t fdctrl_read_mem (void *opaque,target_phys_addr_t reg, +static uint64_t fdctrl_read_mem (void *opaque,Phys reg,unsigned ize) {return fdctrl_read (opaque, (uint32_t )reg); } -static void fdctrl_write_mem (void *opaque,target_phys_addr_t reg, +static void fdctrl_write_mem (void *opaque,Phys reg,uint64_t value,unsigned size) {fdctrl_write (opaque, (uint32_t )reg, value);
@@ -1805,7 +1805,7 @@ static int fdctrl_connect_drives(FDCtrl *fdctrl) }void fdctrl_init_sysbus (qemu_irq irq,int dma_chann, -target_phys_addr_t mmio_base,DriveInfo **fds) +Phys mmio_base,DriveInfo **fds) {FDCtrl *fdctrl;DeviceState *dev;
@@ -1826,7 +1826,7 @@ void fdctrl_init_sysbus(qemu_irq irq, int dma_chann,sysbus_mmio_map (&sys->busdev,0 , mmio_base); } -void sun4m_fdctrl_init (qemu_irq irq,target_phys_addr_t io_base, +void sun4m_fdctrl_init (qemu_irq irq,Phys io_base,DriveInfo **fds,qemu_irq *fdc_tc) {DeviceState *dev;
hw/fdc.h +2 -2
@@ -28,8 +28,8 @@ static inline ISADevice *fdctrl_init_isa(ISABus *bus, DriveInfo **fds) }void fdctrl_init_sysbus (qemu_irq irq,int dma_chann, -target_phys_addr_t mmio_base,DriveInfo **fds); -void sun4m_fdctrl_init (qemu_irq irq,target_phys_addr_t io_base, +Phys mmio_base,DriveInfo **fds); +void sun4m_fdctrl_init (qemu_irq irq,Phys io_base,DriveInfo **fds,qemu_irq *fdc_tc);void fdc_get_bs (BlockDriverState *bs[],ISADevice *dev);
hw/flash.h +4 -4
@@ -5,18 +5,18 @@typedef struct pflash_t pflash_t ;/* pflash_cfi01.c */ -pflash_t *pflash_cfi01_register (target_phys_addr_t base, +pflash_t *pflash_cfi01_register (Phys base,DeviceState *qdev,const char *name, -target_phys_addr_t size, +Phys size,BlockDriverState *bs,uint32_t sector_len,int nb_blocs,int width,uint16_t id0,uint16_t id1,uint16_t id2,uint16_t id3,int be);/* pflash_cfi02.c */ -pflash_t *pflash_cfi02_register(target_phys_addr_t base, +pflash_t *pflash_cfi02_register(Phys base, DeviceState *qdev, const char *name, - target_phys_addr_t size, + Phys size, BlockDriverState *bs, uint32_t sector_len, int nb_blocs, int nb_mappings, int width, uint16_t id0, uint16_t id1,
hw/framebuffer.c +3 -3
@@ -23,7 +23,7 @@ void framebuffer_update_display( DisplayState *ds, MemoryRegion *address_space, - target_phys_addr_t base, + Phys base, int cols, /* Width in pixels. */ int rows, /* Leight in pixels. */ int src_width, /* Length of source line, in bytes. */
@@ -35,7 +35,7 @@ void framebuffer_update_display(int *first_row,/* Input and output. */ int *last_row /* Output only */) { - target_phys_addr_t src_len; + Phys src_len;uint8_t *dest;uint8_t *src;uint8_t *src_base;
@@ -84,7 +84,7 @@ void framebuffer_update_display( dest += i * dest_row_pitch;for (; i < rows; i++) { -target_phys_addr_t dirty_offset; +Phys dirty_offset; dirty =0 ; dirty_offset =0 ;while (addr + dirty_offset <TARGET_PAGE_ALIGN (addr + src_width)) {
hw/framebuffer.h +1 -1
@@ -10,7 +10,7 @@ typedef void (*drawfn)(void *, uint8_t *, const uint8_t *, int, int); void framebuffer_update_display( DisplayState *ds, MemoryRegion *address_space, - target_phys_addr_t base, + Phys base, int cols, int rows, int src_width,
hw/fw_cfg.c +8 -8
@@ -234,37 +234,37 @@ static uint8_t fw_cfg_read(FWCfgState *s)return ret; } -static uint64_t fw_cfg_data_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t fw_cfg_data_mem_read (void *opaque,Phys addr,unsigned size) {return fw_cfg_read (opaque); } -static void fw_cfg_data_mem_write (void *opaque,target_phys_addr_t addr, +static void fw_cfg_data_mem_write (void *opaque,Phys addr,uint64_t value,unsigned size) {fw_cfg_write (opaque, (uint8_t )value); } -static void fw_cfg_ctl_mem_write (void *opaque,target_phys_addr_t addr, +static void fw_cfg_ctl_mem_write (void *opaque,Phys addr,uint64_t value,unsigned size) {fw_cfg_select (opaque, (uint16_t )value); } -static bool fw_cfg_ctl_mem_valid (void *opaque,target_phys_addr_t addr, +static bool fw_cfg_ctl_mem_valid (void *opaque,Phys addr,unsigned size,bool is_write) {return is_write && size ==2 ; } -static uint64_t fw_cfg_comb_read (void *opaque,target_phys_addr_t addr, +static uint64_t fw_cfg_comb_read (void *opaque,Phys addr,unsigned size) {return fw_cfg_read (opaque); } -static void fw_cfg_comb_write (void *opaque,target_phys_addr_t addr, +static void fw_cfg_comb_write (void *opaque,Phys addr,uint64_t value,unsigned size) {switch (size) {
@@ -277,7 +277,7 @@ static void fw_cfg_comb_write(void *opaque, target_phys_addr_t addr, } } -static bool fw_cfg_comb_valid (void *opaque,target_phys_addr_t addr, +static bool fw_cfg_comb_valid (void *opaque,Phys addr,unsigned size,bool is_write) {return (size ==1 ) || (is_write && size ==2 );
@@ -470,7 +470,7 @@ static void fw_cfg_machine_ready(struct Notifier *n, void *data) }FWCfgState *fw_cfg_init (uint32_t ctl_port,uint32_t data_port, -target_phys_addr_t ctl_addr,target_phys_addr_t data_addr) +Phys ctl_addr,Phys data_addr) {DeviceState *dev;SysBusDevice *d;
hw/fw_cfg.h +1 -1
@@ -63,7 +63,7 @@ int fw_cfg_add_callback(FWCfgState *s, uint16_t key, FWCfgCallback callback,int fw_cfg_add_file (FWCfgState *s,const char *filename,uint8_t *data,uint32_t len);FWCfgState *fw_cfg_init (uint32_t ctl_port,uint32_t data_port, -target_phys_addr_t crl_addr,target_phys_addr_t data_addr); +Phys crl_addr,Phys data_addr);#endif /* NO_QEMU_PROTOS */
hw/g364fb.c +2 -2
@@ -335,7 +335,7 @@ static void g364fb_screen_dump(void *opaque, const char *filename)/* called for accesses to io ports */ static uint64_t g364fb_ctrl_read (void *opaque, -target_phys_addr_t addr, +Phys addr,unsigned int size) {G364State *s = opaque;
@@ -399,7 +399,7 @@ static void g364_invalidate_cursor_position(G364State *s) }static void g364fb_ctrl_write (void *opaque, -target_phys_addr_t addr, +Phys addr,uint64_t val,unsigned int size) {
hw/grlib.h +3 -3
@@ -41,7 +41,7 @@ void grlib_irqmp_set_irq(void *opaque, int irq, int level);void grlib_irqmp_ack (DeviceState *dev,int intno);static inline -DeviceState *grlib_irqmp_create(target_phys_addr_t base, +DeviceState *grlib_irqmp_create(Phys base, CPUState *env, qemu_irq **cpu_irqs, uint32_t nr_irqs,
@@ -73,7 +73,7 @@ DeviceState *grlib_irqmp_create(target_phys_addr_t base,/* GPTimer */ static inline -DeviceState *grlib_gptimer_create(target_phys_addr_t base, +DeviceState *grlib_gptimer_create(Phys base, uint32_t nr_timers, uint32_t freq, qemu_irq *cpu_irqs,
@@ -103,7 +103,7 @@ DeviceState *grlib_gptimer_create(target_phys_addr_t base,/* APB UART */ static inline -DeviceState *grlib_apbuart_create (target_phys_addr_t base, +DeviceState *grlib_apbuart_create (Phys base,CharDriverState *serial,qemu_irq irq) {
hw/grlib_apbuart.c +2 -2
@@ -103,7 +103,7 @@ static void grlib_apbuart_event(void *opaque, int event) }static void -grlib_apbuart_write (void *opaque,target_phys_addr_t addr, +grlib_apbuart_write (void *opaque,Phys addr,uint64_t value,unsigned size) {UART *uart = opaque;
@@ -137,7 +137,7 @@ static void grlib_apbuart_event(void *opaque, int event)trace_grlib_apbuart_writel_unknown (addr, value); } -static bool grlib_apbuart_accepts (void *opaque,target_phys_addr_t addr, +static bool grlib_apbuart_accepts (void *opaque,Phys addr,unsigned size,bool is_write) {return is_write && size ==4 ;
hw/grlib_gptimer.c +4 -4
@@ -154,11 +154,11 @@ static void grlib_gptimer_hit(void *opaque) } } -static uint64_t grlib_gptimer_read (void *opaque,target_phys_addr_t addr, +static uint64_t grlib_gptimer_read (void *opaque,Phys addr,unsigned size) {GPTimerUnit *unit = opaque; -target_phys_addr_t timer_addr; +Phys timer_addr;int id;uint32_t value =0 ;
@@ -213,11 +213,11 @@ static uint64_t grlib_gptimer_read(void *opaque, target_phys_addr_t addr,return 0 ; } -static void grlib_gptimer_write (void *opaque,target_phys_addr_t addr, +static void grlib_gptimer_write (void *opaque,Phys addr,uint64_t value,unsigned size) {GPTimerUnit *unit = opaque; -target_phys_addr_t timer_addr; +Phys timer_addr;int id; addr &=0xff ;
hw/grlib_irqmp.c +2 -2
@@ -162,7 +162,7 @@ void grlib_irqmp_set_irq(void *opaque, int irq, int level) } } -static uint64_t grlib_irqmp_read (void *opaque,target_phys_addr_t addr, +static uint64_t grlib_irqmp_read (void *opaque,Phys addr,unsigned size) {IRQMP *irqmp = opaque;
@@ -226,7 +226,7 @@ static uint64_t grlib_irqmp_read(void *opaque, target_phys_addr_t addr,return 0 ; } -static void grlib_irqmp_write (void *opaque,target_phys_addr_t addr, +static void grlib_irqmp_write (void *opaque,Phys addr,uint64_t value,unsigned size) {IRQMP *irqmp = opaque;
hw/gt64xxx.c +10 -10
@@ -225,8 +225,8 @@#define GT_PCI1_SERR1MASK (0xca8 >> 2)#define PCI_MAPPING_ENTRY (regname) \ - target_phys_addr_t regname ##_start; \ - target_phys_addr_t regname ##_length; \ + Phys regname ##_start; \ + Phys regname ##_length; \ MemoryRegion regname ##_mem typedef struct GT64120State {
@@ -240,11 +240,11 @@/* Adjust range to avoid touching space which isn't mappable via PCI */ /* XXX: Hardcoded values for Malta: 0x1e000000 - 0x1f100000 0x1fc00000 - 0x1fd00000 */ -static void check_reserved_space (target_phys_addr_t *start, -target_phys_addr_t *length) +static void check_reserved_space (Phys *start, +Phys *length) { -target_phys_addr_t begin = *start; -target_phys_addr_t end = *start + *length; +Phys begin = *start; +Phys end = *start + *length;if (end >=0x1e000000LL && end <0x1f100000LL ) end =0x1e000000LL ;
@@ -266,8 +266,8 @@ static void check_reserved_space (target_phys_addr_t *start,static void gt64120_isd_mapping (GT64120State *s) { -target_phys_addr_t start = s->regs[GT_ISD ] <<21 ; -target_phys_addr_t length =0x1000 ; +Phys start = s->regs[GT_ISD ] <<21 ; +Phys length =0x1000 ;if (s->ISD_length) {memory_region_del_subregion (get_system_memory (), &s->ISD_mem);
@@ -306,7 +306,7 @@ static void gt64120_pci_mapping(GT64120State *s) } } -static void gt64120_writel (void *opaque,target_phys_addr_t addr, +static void gt64120_writel (void *opaque,Phys addr,uint64_t val,unsigned size) {GT64120State *s = opaque;
@@ -586,7 +586,7 @@ static void gt64120_writel (void *opaque, target_phys_addr_t addr, }static uint64_t gt64120_readl (void *opaque, -target_phys_addr_t addr,unsigned size) +Phys addr,unsigned size) {GT64120State *s = opaque;uint32_t val;
hw/heathrow_pic.c +2 -2
@@ -63,7 +63,7 @@ static void heathrow_pic_update(HeathrowPICS *s) } } -static void pic_write (void *opaque,target_phys_addr_t addr, +static void pic_write (void *opaque,Phys addr,uint64_t value,unsigned size) {HeathrowPICS *s = opaque;
@@ -91,7 +91,7 @@ static void pic_write(void *opaque, target_phys_addr_t addr, } } -static uint64_t pic_read (void *opaque,target_phys_addr_t addr, +static uint64_t pic_read (void *opaque,Phys addr,unsigned size) {HeathrowPICS *s = opaque;
hw/hpet.c +4 -4
@@ -342,20 +342,20 @@ static void hpet_del_timer(HPETTimer *t) }#ifdef HPET_DEBUG -static uint32_t hpet_ram_readb (void *opaque,target_phys_addr_t addr) +static uint32_t hpet_ram_readb (void *opaque,Phys addr) {printf ("qemu: hpet_read b at %" PRIx64"\n" , addr);return 0 ; } -static uint32_t hpet_ram_readw (void *opaque,target_phys_addr_t addr) +static uint32_t hpet_ram_readw (void *opaque,Phys addr) {printf ("qemu: hpet_read w at %" PRIx64"\n" , addr);return 0 ; }#endif -static uint64_t hpet_ram_read (void *opaque,target_phys_addr_t addr, +static uint64_t hpet_ram_read (void *opaque,Phys addr,unsigned size) {HPETState *s = opaque;
@@ -427,7 +427,7 @@ static uint64_t hpet_ram_read(void *opaque, target_phys_addr_t addr,return 0 ; } -static void hpet_ram_write (void *opaque,target_phys_addr_t addr, +static void hpet_ram_write (void *opaque,Phys addr,uint64_t value,unsigned size) {int i;
hw/i8259.c +4 -4
@@ -275,7 +275,7 @@ static void pic_reset(DeviceState *dev) s->elcr =0 ; } -static void pic_ioport_write (void *opaque,target_phys_addr_t addr64, +static void pic_ioport_write (void *opaque,Phys addr64,uint64_t val64,unsigned size) {PicState *s = opaque;
@@ -369,7 +369,7 @@ static void pic_ioport_write(void *opaque, target_phys_addr_t addr64, } } -static uint64_t pic_ioport_read (void *opaque,target_phys_addr_t addr, +static uint64_t pic_ioport_read (void *opaque,Phys addr,unsigned size) {PicState *s = opaque;
@@ -404,14 +404,14 @@ int pic_get_output(PicState *s)return (pic_get_irq (s) >=0 ); } -static void elcr_ioport_write (void *opaque,target_phys_addr_t addr, +static void elcr_ioport_write (void *opaque,Phys addr,uint64_t val,unsigned size) {PicState *s = opaque; s->elcr = val & s->elcr_mask; } -static uint64_t elcr_ioport_read (void *opaque,target_phys_addr_t addr, +static uint64_t elcr_ioport_read (void *opaque,Phys addr,unsigned size) {PicState *s = opaque;
hw/ide.h +1 -1
@@ -24,7 +24,7 @@ MemoryRegion *pmac_ide_init (DriveInfo **hd_table, qemu_irq irq, void *dbdma, int channel, qemu_irq dma_irq);/* ide-mmio.c */ -void mmio_ide_init (target_phys_addr_t membase,target_phys_addr_t membase2, +void mmio_ide_init (Phys membase,Phys membase2,MemoryRegion *address_space,qemu_irq irq,int shift,DriveInfo *hd0,DriveInfo *hd1);
hw/ide/ahci.c +9 -9
@@ -172,7 +172,7 @@ static void ahci_trigger_irq(AHCIState *s, AHCIDevice *d,static void map_page (uint8_t **ptr,uint64_t addr,uint32_t wanted) { -target_phys_addr_t len = wanted; +Phys len = wanted;if (*ptr) {cpu_physical_memory_unmap (*ptr, len,1 , len);
@@ -276,7 +276,7 @@ static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val) } } -static uint64_t ahci_mem_read (void *opaque,target_phys_addr_t addr, +static uint64_t ahci_mem_read (void *opaque,Phys addr,unsigned size) {AHCIState *s = opaque;
@@ -314,7 +314,7 @@ static uint64_t ahci_mem_read(void *opaque, target_phys_addr_t addr, -static void ahci_mem_write (void *opaque,target_phys_addr_t addr, +static void ahci_mem_write (void *opaque,Phys addr,uint64_t val,unsigned size) {AHCIState *s = opaque;
@@ -370,7 +370,7 @@ static void ahci_mem_write(void *opaque, target_phys_addr_t addr, .endianness = DEVICE_LITTLE_ENDIAN, }; -static uint64_t ahci_idp_read (void *opaque,target_phys_addr_t addr, +static uint64_t ahci_idp_read (void *opaque,Phys addr,unsigned size) {AHCIState *s = opaque;
@@ -386,7 +386,7 @@ static uint64_t ahci_idp_read(void *opaque, target_phys_addr_t addr, } } -static void ahci_idp_write (void *opaque,target_phys_addr_t addr, +static void ahci_idp_write (void *opaque,Phys addr,uint64_t val,unsigned size) {AHCIState *s = opaque;
@@ -629,7 +629,7 @@ static void ahci_write_fis_d2h(AHCIDevice *ad, uint8_t *cmd_fis)AHCIPortRegs *pr = &ad->port_regs;uint8_t *d2h_fis;int i; -target_phys_addr_t cmd_len =0x80 ; +Phys cmd_len =0x80 ;int cmd_mapped =0 ;if (!ad->res_fis || !(pr->cmd &PORT_CMD_FIS_RX )) {
@@ -681,8 +681,8 @@ static int ahci_populate_sglist(AHCIDevice *ad, QEMUSGList *sglist)uint32_t opts =le32_to_cpu (cmd->opts);uint64_t prdt_addr =le64_to_cpu (cmd->tbl_addr) +0x80 ;int sglist_alloc_hint = opts >>AHCI_CMD_HDR_PRDT_LEN ; -target_phys_addr_t prdt_len = (sglist_alloc_hint *sizeof (AHCI_SG )); -target_phys_addr_t real_prdt_len = prdt_len; +Phys prdt_len = (sglist_alloc_hint *sizeof (AHCI_SG )); +Phys real_prdt_len = prdt_len;uint8_t *prdt;int i;int r =0 ;
@@ -829,7 +829,7 @@ static int handle_cmd(AHCIState *s, int port, int slot)uint64_t tbl_addr;AHCICmdHdr *cmd;uint8_t *cmd_fis; -target_phys_addr_t cmd_len; +Phys cmd_len;if (s->dev[port].port.ifs[0 ].status & (BUSY_STAT |DRQ_STAT )) {/* Engine currently busy, try again later */
hw/ide/cmd646.c +6 -6
@@ -43,7 +43,7 @@static void cmd646_update_irq (PCIIDEState *d); -static uint64_t cmd646_cmd_read (void *opaque,target_phys_addr_t addr, +static uint64_t cmd646_cmd_read (void *opaque,Phys addr,unsigned size) {CMD646BAR *cmd646bar = opaque;
@@ -54,7 +54,7 @@ static uint64_t cmd646_cmd_read(void *opaque, target_phys_addr_t addr,return ide_status_read (cmd646bar->bus, addr +2 ); } -static void cmd646_cmd_write (void *opaque,target_phys_addr_t addr, +static void cmd646_cmd_write (void *opaque,Phys addr,uint64_t data,unsigned size) {CMD646BAR *cmd646bar = opaque;
@@ -71,7 +71,7 @@ static void cmd646_cmd_write(void *opaque, target_phys_addr_t addr, .endianness = DEVICE_LITTLE_ENDIAN, }; -static uint64_t cmd646_data_read (void *opaque,target_phys_addr_t addr, +static uint64_t cmd646_data_read (void *opaque,Phys addr,unsigned size) {CMD646BAR *cmd646bar = opaque;
@@ -88,7 +88,7 @@ static uint64_t cmd646_data_read(void *opaque, target_phys_addr_t addr,return ((uint64_t )1 << (size *8 )) -1 ; } -static void cmd646_data_write (void *opaque,target_phys_addr_t addr, +static void cmd646_data_write (void *opaque,Phys addr,uint64_t data,unsigned size) {CMD646BAR *cmd646bar = opaque;
@@ -121,7 +121,7 @@ static void setup_cmd646_bar(PCIIDEState *d, int bus_num)memory_region_init_io (&bar->data, &cmd646_data_ops, bar,"cmd646-data" ,8 ); } -static uint64_t bmdma_read (void *opaque,target_phys_addr_t addr, +static uint64_t bmdma_read (void *opaque,Phys addr,unsigned size) {BMDMAState *bm = opaque;
@@ -159,7 +159,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr,return val; } -static void bmdma_write (void *opaque,target_phys_addr_t addr, +static void bmdma_write (void *opaque,Phys addr,uint64_t val,unsigned size) {BMDMAState *bm = opaque;
hw/ide/macio.c +6 -6
@@ -198,7 +198,7 @@ static void pmac_ide_flush(DBDMA_io *io)/* PowerMac IDE memory IO */ static void pmac_ide_writeb (void *opaque, -target_phys_addr_t addr,uint32_t val) +Phys addr,uint32_t val) {MACIOIDEState *d = opaque;
@@ -216,7 +216,7 @@ static void pmac_ide_writeb (void *opaque, } } -static uint32_t pmac_ide_readb (void *opaque,target_phys_addr_t addr) +static uint32_t pmac_ide_readb (void *opaque,Phys addr) {uint8_t retval;MACIOIDEState *d = opaque;
@@ -238,7 +238,7 @@ static uint32_t pmac_ide_readb (void *opaque,target_phys_addr_t addr) }static void pmac_ide_writew (void *opaque, -target_phys_addr_t addr,uint32_t val) +Phys addr,uint32_t val) {MACIOIDEState *d = opaque;
@@ -249,7 +249,7 @@ static void pmac_ide_writew (void *opaque, } } -static uint32_t pmac_ide_readw (void *opaque,target_phys_addr_t addr) +static uint32_t pmac_ide_readw (void *opaque,Phys addr) {uint16_t retval;MACIOIDEState *d = opaque;
@@ -265,7 +265,7 @@ static uint32_t pmac_ide_readw (void *opaque,target_phys_addr_t addr) }static void pmac_ide_writel (void *opaque, -target_phys_addr_t addr,uint32_t val) +Phys addr,uint32_t val) {MACIOIDEState *d = opaque;
@@ -276,7 +276,7 @@ static void pmac_ide_writel (void *opaque, } } -static uint32_t pmac_ide_readl (void *opaque,target_phys_addr_t addr) +static uint32_t pmac_ide_readl (void *opaque,Phys addr) {uint32_t retval;MACIOIDEState *d = opaque;
hw/ide/mmio.c +5 -5
@@ -47,7 +47,7 @@ static void mmio_ide_reset(void *opaque)ide_bus_reset (&s->bus); } -static uint64_t mmio_ide_read (void *opaque,target_phys_addr_t addr, +static uint64_t mmio_ide_read (void *opaque,Phys addr,unsigned size) {MMIOState *s = opaque;
@@ -58,7 +58,7 @@ static uint64_t mmio_ide_read(void *opaque, target_phys_addr_t addr,return ide_data_readw (&s->bus,0 ); } -static void mmio_ide_write (void *opaque,target_phys_addr_t addr, +static void mmio_ide_write (void *opaque,Phys addr,uint64_t val,unsigned size) {MMIOState *s = opaque;
@@ -75,14 +75,14 @@ static void mmio_ide_write(void *opaque, target_phys_addr_t addr, .endianness = DEVICE_NATIVE_ENDIAN, }; -static uint64_t mmio_ide_status_read (void *opaque,target_phys_addr_t addr, +static uint64_t mmio_ide_status_read (void *opaque,Phys addr,unsigned size) {MMIOState *s= opaque;return ide_status_read (&s->bus,0 ); } -static void mmio_ide_cmd_write (void *opaque,target_phys_addr_t addr, +static void mmio_ide_cmd_write (void *opaque,Phys addr,uint64_t val,unsigned size) {MMIOState *s = opaque;
@@ -107,7 +107,7 @@ static void mmio_ide_cmd_write(void *opaque, target_phys_addr_t addr, } }; -void mmio_ide_init (target_phys_addr_t membase,target_phys_addr_t membase2, +void mmio_ide_init (Phys membase,Phys membase2,MemoryRegion *address_space,qemu_irq irq,int shift,DriveInfo *hd0,DriveInfo *hd1)
hw/ide/piix.c +2 -2
@@ -32,7 +32,7 @@#include <hw/ide/pci.h> -static uint64_t bmdma_read (void *opaque,target_phys_addr_t addr,unsigned size) +static uint64_t bmdma_read (void *opaque,Phys addr,unsigned size) {BMDMAState *bm = opaque;uint32_t val;
@@ -58,7 +58,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr, unsigned size)return val; } -static void bmdma_write (void *opaque,target_phys_addr_t addr, +static void bmdma_write (void *opaque,Phys addr,uint64_t val,unsigned size) {BMDMAState *bm = opaque;
hw/ide/via.c +2 -2
@@ -33,7 +33,7 @@#include <hw/ide/pci.h> -static uint64_t bmdma_read (void *opaque,target_phys_addr_t addr, +static uint64_t bmdma_read (void *opaque,Phys addr,unsigned size) {BMDMAState *bm = opaque;
@@ -60,7 +60,7 @@ static uint64_t bmdma_read(void *opaque, target_phys_addr_t addr,return val; } -static void bmdma_write (void *opaque,target_phys_addr_t addr, +static void bmdma_write (void *opaque,Phys addr,uint64_t val,unsigned size) {BMDMAState *bm = opaque;
hw/integratorcp.c +7 -7
@@ -40,7 +40,7 @@0xe ,4 ,0x1c ,1 ,2 ,0x20 ,0xc0 ,0 ,0 ,0 ,0 ,0x30 ,0x28 ,0x30 ,0x28 ,0x40 }; -static uint64_t integratorcm_read (void *opaque,target_phys_addr_t offset, +static uint64_t integratorcm_read (void *opaque,Phys offset,unsigned size) {integratorcm_state *s = (integratorcm_state *)opaque;
@@ -153,7 +153,7 @@ static void integratorcm_update(integratorcm_state *s)hw_error ("Core module interrupt\n" ); } -static void integratorcm_write (void *opaque,target_phys_addr_t offset, +static void integratorcm_write (void *opaque,Phys offset,uint64_t value,unsigned size) {integratorcm_state *s = (integratorcm_state *)opaque;
@@ -308,7 +308,7 @@ static void icp_pic_set_irq(void *opaque, int irq, int level)icp_pic_update (s); } -static uint64_t icp_pic_read (void *opaque,target_phys_addr_t offset, +static uint64_t icp_pic_read (void *opaque,Phys offset,unsigned size) {icp_pic_state *s = (icp_pic_state *)opaque;
@@ -337,7 +337,7 @@ static uint64_t icp_pic_read(void *opaque, target_phys_addr_t offset, } } -static void icp_pic_write (void *opaque,target_phys_addr_t offset, +static void icp_pic_write (void *opaque,Phys offset,uint64_t value,unsigned size) {icp_pic_state *s = (icp_pic_state *)opaque;
@@ -394,7 +394,7 @@ static int icp_pic_init(SysBusDevice *dev)/* CP control registers. */ -static uint64_t icp_control_read (void *opaque,target_phys_addr_t offset, +static uint64_t icp_control_read (void *opaque,Phys offset,unsigned size) {switch (offset >>2 ) {
@@ -412,7 +412,7 @@ static uint64_t icp_control_read(void *opaque, target_phys_addr_t offset, } } -static void icp_control_write (void *opaque,target_phys_addr_t offset, +static void icp_control_write (void *opaque,Phys offset,uint64_t value,unsigned size) {switch (offset >>2 ) {
@@ -432,7 +432,7 @@ static void icp_control_write(void *opaque, target_phys_addr_t offset, .endianness = DEVICE_NATIVE_ENDIAN, }; -static void icp_control_init (target_phys_addr_t base) +static void icp_control_init (Phys base) {MemoryRegion *io;
hw/intel-hda.c +13 -13
@@ -211,9 +211,9 @@ struct IntelHDAReg {/* --------------------------------------------------------------------- */ -static target_phys_addr_t intel_hda_addr (uint32_t lbase,uint32_t ubase) +static Phys intel_hda_addr (uint32_t lbase,uint32_t ubase) { -target_phys_addr_t addr; +Phys addr;#if TARGET_PHYS_ADDR_BITS ==32 addr = lbase;
@@ -304,7 +304,7 @@ static int intel_hda_send_command(IntelHDAState *d, uint32_t verb)static void intel_hda_corb_run (IntelHDAState *d) { -target_phys_addr_t addr; +Phys addr;uint32_t rp, verb;if (d->ics &ICH6_IRS_BUSY ) {
@@ -341,7 +341,7 @@ static void intel_hda_response(HDACodecDevice *dev, bool solicited, uint32_t res {HDACodecBus *bus =DO_UPCAST (HDACodecBus, qbus, dev->qdev.parent_bus);IntelHDAState *d =container_of (bus, IntelHDAState, codecs); -target_phys_addr_t addr; +Phys addr;uint32_t wp, ex;if (d->ics &ICH6_IRS_BUSY ) {
@@ -390,7 +390,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output, {HDACodecBus *bus =DO_UPCAST (HDACodecBus, qbus, dev->qdev.parent_bus);IntelHDAState *d =container_of (bus, IntelHDAState, codecs); -target_phys_addr_t addr; +Phys addr;uint32_t s, copy, left;IntelHDAStream *st;bool irq = false;
@@ -462,7 +462,7 @@ static bool intel_hda_xfer(HDACodecDevice *dev, uint32_t stnr, bool output,static void intel_hda_parse_bdl (IntelHDAState *d,IntelHDAStream *st) { -target_phys_addr_t addr; +Phys addr;uint8_t buf[16 ];uint32_t i;
@@ -895,7 +895,7 @@ static void intel_hda_set_st_ctl(IntelHDAState *d, const IntelHDAReg *reg, uint3 }; -static const IntelHDAReg *intel_hda_reg_find (IntelHDAState *d,target_phys_addr_t addr) +static const IntelHDAReg *intel_hda_reg_find (IntelHDAState *d,Phys addr) {const IntelHDAReg *reg;
@@ -1038,7 +1038,7 @@ static void intel_hda_regs_reset(IntelHDAState *d)/* --------------------------------------------------------------------- */ -static void intel_hda_mmio_writeb (void *opaque,target_phys_addr_t addr,uint32_t val) +static void intel_hda_mmio_writeb (void *opaque,Phys addr,uint32_t val) {IntelHDAState *d = opaque;const IntelHDAReg *reg =intel_hda_reg_find (d, addr);
@@ -1046,7 +1046,7 @@ static void intel_hda_mmio_writeb(void *opaque, target_phys_addr_t addr, uint32_intel_hda_reg_write (d, reg, val,0xff ); } -static void intel_hda_mmio_writew (void *opaque,target_phys_addr_t addr,uint32_t val) +static void intel_hda_mmio_writew (void *opaque,Phys addr,uint32_t val) {IntelHDAState *d = opaque;const IntelHDAReg *reg =intel_hda_reg_find (d, addr);
@@ -1054,7 +1054,7 @@ static void intel_hda_mmio_writew(void *opaque, target_phys_addr_t addr, uint32_intel_hda_reg_write (d, reg, val,0xffff ); } -static void intel_hda_mmio_writel (void *opaque,target_phys_addr_t addr,uint32_t val) +static void intel_hda_mmio_writel (void *opaque,Phys addr,uint32_t val) {IntelHDAState *d = opaque;const IntelHDAReg *reg =intel_hda_reg_find (d, addr);
@@ -1062,7 +1062,7 @@ static void intel_hda_mmio_writel(void *opaque, target_phys_addr_t addr, uint32_intel_hda_reg_write (d, reg, val,0xffffffff ); } -static uint32_t intel_hda_mmio_readb (void *opaque,target_phys_addr_t addr) +static uint32_t intel_hda_mmio_readb (void *opaque,Phys addr) {IntelHDAState *d = opaque;const IntelHDAReg *reg =intel_hda_reg_find (d, addr);
@@ -1070,7 +1070,7 @@ static uint32_t intel_hda_mmio_readb(void *opaque, target_phys_addr_t addr)return intel_hda_reg_read (d, reg,0xff ); } -static uint32_t intel_hda_mmio_readw (void *opaque,target_phys_addr_t addr) +static uint32_t intel_hda_mmio_readw (void *opaque,Phys addr) {IntelHDAState *d = opaque;const IntelHDAReg *reg =intel_hda_reg_find (d, addr);
@@ -1078,7 +1078,7 @@ static uint32_t intel_hda_mmio_readw(void *opaque, target_phys_addr_t addr)return intel_hda_reg_read (d, reg,0xffff ); } -static uint32_t intel_hda_mmio_readl (void *opaque,target_phys_addr_t addr) +static uint32_t intel_hda_mmio_readl (void *opaque,Phys addr) {IntelHDAState *d = opaque;const IntelHDAReg *reg =intel_hda_reg_find (d, addr);
hw/ioapic.c +2 -2
@@ -197,7 +197,7 @@ void ioapic_eoi_broadcast(int vector) }static uint64_t -ioapic_mem_read (void *opaque,target_phys_addr_t addr,unsigned int size) +ioapic_mem_read (void *opaque,Phys addr,unsigned int size) {IOAPICState *s = opaque;int index;
@@ -239,7 +239,7 @@ void ioapic_eoi_broadcast(int vector) }static void -ioapic_mem_write (void *opaque,target_phys_addr_t addr,uint64_t val, +ioapic_mem_write (void *opaque,Phys addr,uint64_t val,unsigned int size) {IOAPICState *s = opaque;
hw/isa-bus.c +1 -1
@@ -23,7 +23,7 @@#include "exec-memory.h" static ISABus *isabus; -target_phys_addr_t isa_mem_base =0 ; +Phys isa_mem_base =0 ;static void isabus_dev_print (Monitor *mon,DeviceState *dev,int indent);static char *isabus_get_fw_dev_path (DeviceState *dev);
hw/isa.h +3 -3
@@ -71,10 +71,10 @@ void isa_register_portio_list(ISADevice *dev, uint16_t start,const MemoryRegionPortio *portio, void *opaque, const char *name); -extern target_phys_addr_t isa_mem_base; +extern Phys isa_mem_base; -void isa_mmio_setup (MemoryRegion *mr,target_phys_addr_t size); -void isa_mmio_init (target_phys_addr_t base,target_phys_addr_t size); +void isa_mmio_setup (MemoryRegion *mr,Phys size); +void isa_mmio_init (Phys base,Phys size);/* dma.c */ int DMA_get_channel_mode (int nchan);
hw/isa_mmio.c +8 -8
@@ -26,35 +26,35 @@#include "isa.h" #include "exec-memory.h" -static void isa_mmio_writeb (void *opaque,target_phys_addr_t addr, +static void isa_mmio_writeb (void *opaque,Phys addr,uint32_t val) {cpu_outb (addr &IOPORTS_MASK , val); } -static void isa_mmio_writew (void *opaque,target_phys_addr_t addr, +static void isa_mmio_writew (void *opaque,Phys addr,uint32_t val) {cpu_outw (addr &IOPORTS_MASK , val); } -static void isa_mmio_writel (void *opaque,target_phys_addr_t addr, +static void isa_mmio_writel (void *opaque,Phys addr,uint32_t val) {cpu_outl (addr &IOPORTS_MASK , val); } -static uint32_t isa_mmio_readb (void *opaque,target_phys_addr_t addr) +static uint32_t isa_mmio_readb (void *opaque,Phys addr) {return cpu_inb (addr &IOPORTS_MASK ); } -static uint32_t isa_mmio_readw (void *opaque,target_phys_addr_t addr) +static uint32_t isa_mmio_readw (void *opaque,Phys addr) {return cpu_inw (addr &IOPORTS_MASK ); } -static uint32_t isa_mmio_readl (void *opaque,target_phys_addr_t addr) +static uint32_t isa_mmio_readl (void *opaque,Phys addr) {return cpu_inl (addr &IOPORTS_MASK ); }
@@ -67,12 +67,12 @@ static uint32_t isa_mmio_readl(void *opaque, target_phys_addr_t addr) .endianness = DEVICE_LITTLE_ENDIAN, }; -void isa_mmio_setup (MemoryRegion *mr,target_phys_addr_t size) +void isa_mmio_setup (MemoryRegion *mr,Phys size) {memory_region_init_io (mr, &isa_mmio_ops,NULL ,"isa-mmio" , size); } -void isa_mmio_init (target_phys_addr_t base,target_phys_addr_t size) +void isa_mmio_init (Phys base,Phys size) {MemoryRegion *mr =g_malloc (sizeof (*mr));
hw/ivshmem.c +2 -2
@@ -160,7 +160,7 @@ static uint32_t ivshmem_IntrStatus_read(IVShmemState *s)return ret; } -static void ivshmem_io_write (void *opaque,target_phys_addr_t addr, +static void ivshmem_io_write (void *opaque,Phys addr,uint64_t val,unsigned size) {IVShmemState *s = opaque;
@@ -204,7 +204,7 @@ static void ivshmem_io_write(void *opaque, target_phys_addr_t addr, } } -static uint64_t ivshmem_io_read (void *opaque,target_phys_addr_t addr, +static uint64_t ivshmem_io_read (void *opaque,Phys addr,unsigned size) {
hw/jazz_led.c +7 -7
@@ -49,7 +49,7 @@screen_state_t state; } LedState; -static uint32_t led_readb (void *opaque,target_phys_addr_t addr) +static uint32_t led_readb (void *opaque,Phys addr) {LedState *s = opaque;uint32_t val;
@@ -68,7 +68,7 @@ static uint32_t led_readb(void *opaque, target_phys_addr_t addr)return val; } -static uint32_t led_readw (void *opaque,target_phys_addr_t addr) +static uint32_t led_readw (void *opaque,Phys addr) {uint32_t v;#ifdef TARGET_WORDS_BIGENDIAN
@@ -81,7 +81,7 @@ static uint32_t led_readw(void *opaque, target_phys_addr_t addr)return v; } -static uint32_t led_readl (void *opaque,target_phys_addr_t addr) +static uint32_t led_readl (void *opaque,Phys addr) {uint32_t v;#ifdef TARGET_WORDS_BIGENDIAN
@@ -98,7 +98,7 @@ static uint32_t led_readl(void *opaque, target_phys_addr_t addr)return v; } -static void led_writeb (void *opaque,target_phys_addr_t addr,uint32_t val) +static void led_writeb (void *opaque,Phys addr,uint32_t val) {LedState *s = opaque;
@@ -115,7 +115,7 @@ static void led_writeb(void *opaque, target_phys_addr_t addr, uint32_t val) } } -static void led_writew (void *opaque,target_phys_addr_t addr,uint32_t val) +static void led_writew (void *opaque,Phys addr,uint32_t val) {#ifdef TARGET_WORDS_BIGENDIAN led_writeb (opaque, addr, (val >>8 ) &0xff );
@@ -126,7 +126,7 @@ static void led_writew(void *opaque, target_phys_addr_t addr, uint32_t val)#endif } -static void led_writel (void *opaque,target_phys_addr_t addr,uint32_t val) +static void led_writel (void *opaque,Phys addr,uint32_t val) {#ifdef TARGET_WORDS_BIGENDIAN led_writeb (opaque, addr, (val >>24 ) &0xff );
@@ -304,7 +304,7 @@ static void jazz_led_text_update(void *opaque, console_ch_t *chardata)dpy_update (s->ds,0 ,0 ,2 ,1 ); } -void jazz_led_init (MemoryRegion *address_space,target_phys_addr_t base) +void jazz_led_init (MemoryRegion *address_space,Phys base) {LedState *s;
hw/lan9118.c +2 -2
@@ -895,7 +895,7 @@ static void lan9118_tick(void *opaque)lan9118_update (s); }
Lines of this file are not shown. View the raw message.
hw/omap.h +35 -35
70 lines not on this page · raw message
hw/omap1.c +74 -74
148 lines not on this page · raw message
hw/openpic.c +26 -26
52 lines not on this page · raw message
hw/pflash_cfi01.c +24 -24
48 lines not on this page · raw message
hw/ppc405_uc.c +32 -32
64 lines not on this page · raw message
hw/pxa2xx.c +21 -21
42 lines not on this page · raw message
hw/sun4m.c +42 -42
84 lines not on this page · raw message
hw/virtio.c +38 -38
76 lines not on this page · raw message
memory.c +32 -32
64 lines not on this page · raw message
memory.h +22 -22
44 lines not on this page · raw message
target-ppc/helper.c +23 -23
46 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.7.1
Part of the diff is not shown here. View the raw message.
Quoted 11 lines · Avi Kivity
The name 'Phys' conveys exactly the same information as '
target_phys_addr_t':- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming conventionAs it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of
target_phys_addr_tto the new name. All hail Phys!323 files changed, 1959 insertions(+), 1959 deletions(-)
Seems like gratuitous churn to me...
-- PMM
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Avi Kivity
The name 'Phys' conveys exactly the same information as '
target_phys_addr_t':- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming convention
Quoted 8 lines
Quoted 5 lines
As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of
target_phys_addr_tto the new name. All hail Phys!323 files changed, 1959 insertions(+), 1959 deletions(-)Seems like gratuitous churn to me...
It will generate noise, but improve readability by a little bit.
Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Avi Kivity
The name 'Phys' conveys exactly the same information as '
target_phys_addr_t':- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming convention
Quoted 7 lines
Quoted 5 lines
As it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of
target_phys_addr_tto the new name. All hail Phys!323 files changed, 1959 insertions(+), 1959 deletions(-)Seems like gratuitous churn to me...
Agreed. I don't really like using CamelCase for scalar values either.
target_phys_addr_t should exist IMHO in the device model code. I think it would be more useful to introduce a hw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.
I think the only reason we don't fix target_phys_addr_t at u64 is because of sensitivity around the TLB softmmu, right? A hw_addr for hw/*.c should be a reasonable compromise.
Making the build faster (by killing libhw32/libhw64) would be a good justification for this type of change IMHO.
Regards,
Anthony Liguori
Quoted 3 lines
-- PMM
Quoted 1 line · Anthony Liguori
target_phys_addr_tshould exist IMHO in the device model code.
(I assume "should not" ?)
Quoted 4 lines
I think it
would be more useful to introduce ahw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.
A lot of the usage of target_phys_addr_t in hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...
-- PMM
Quoted 4 lines · Peter Maydell
Quoted 1 line · Anthony Liguori
target_phys_addr_tshould exist IMHO in the device model code.(I assume "should not" ?)
Yes, sorry.
Quoted 9 lines
Quoted 5 lines
I think it
would be more useful to introduce ahw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.A lot of the usage of
target_phys_addr_tin hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...
Exactly, which is why using target_phys_addr_t (and subsequently building the device twice) doesn't make a lot of sense.
Regards,
Anthony Liguori
Quoted 3 lines
-- PMM
Quoted 7 lines · Anthony Liguori
Quoted 3 lines · Peter Maydell
A lot of the usage of
target_phys_addr_tin hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...Exactly, which is why using
target_phys_addr_t(and subsequently building the device twice) doesn't make a lot of sense.
So should we have a hw_offset type for this? That would cut out a lot of the noise and let us find out how much code in hw/ is actually using physaddrs...
-- PMM
Am 05.01.2012 01:24, schrieb Peter Maydell:
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Peter Maydell
Quoted 3 lines
A lot of the usage of
target_phys_addr_tin hw/ is actually not handling addresses at all, but merely offsets into device IO regions (ie as parameters to device read/write functions)...
Quoted 8 lines
Quoted 2 lines
Exactly, which is why using
target_phys_addr_t(and subsequently building the device twice) doesn't make a lot of sense.So should we have a
hw_offsettype for this? That would cut out a lot of the noise and let us find out how much code in hw/ is actually using physaddrs...-- PMM
Hardware offsets are hardware: you can count the address lines or get the values from the vendor's manual (you cannot count when serial protocolsare used). A 32 bit PCI card will take 32 bit offsets (or smaller), even when itis used in a 64 bit host.
It should be possible to model that in QEMU, too. uint8_t, uint16_t, uint32_t and uint64_t are good enough to describe the typical offset ranges of any hardware.
Cheers,
Stefan Weil
Quoted 25 lines · Anthony Liguori
Quoted 16 lines · Peter Maydell
Quoted 14 lines · Avi Kivity
The name 'Phys' conveys exactly the same information as '
target_phys_addr_t':- it has to be a physical address (no such thing as physical data)
- it has to be a target address (qemu doesn't do host physical addresses)
- the fact that it's a type is implied by the naming conventionAs it's 4 characters vs. 18, and C standard compliant to boot, Phys is a clear winner. Rename all instances of
target_phys_addr_tto the new name.
All hail Phys!Quoted 4 lines
Quoted 1 line
323 files changed, 1959 insertions(+), 1959 deletions(-)Seems like gratuitous churn to me...
Agreed. I don't really like using CamelCase for scalar values either.
Quoted 8 lines
target_phys_addr_tshould exist IMHO in the device model code. I think it would be more useful to introduce ahw_addr, fix it at u64, make the device model and memory API use that, and then make it so we didn't do the silliness around libhw32/libhw64.I think the only reason we don't fix
target_phys_addr_tat u64 is because of sensitivity around the TLB softmmu, right? Ahw_addrfor hw/*.c should be a reasonable compromise.
IOTLB could be pushed to memory system, that way for example the TLB could be shared between CPUs. Obviously each CPU needs individual mappings.
Quoted 2 lines
Making the build faster (by killing libhw32/libhw64) would be a good justification for this type of change IMHO.
The original reason was to avoid 64 bit arithmetic on 32 bit hosts. Now that 128 bit arithmetic is used for memory API, it probably does not make so much sense.
Quoted 9 lines
Regards,
Anthony Liguori
Quoted 3 lines
-- PMM
Quoted 6 lines · Blue Swirl
Quoted 2 lines
Making the build faster (by killing libhw32/libhw64) would be a good justification for this type of change IMHO.
The original reason was to avoid 64 bit arithmetic on 32 bit hosts. Now that 128 bit arithmetic is used for memory API, it probably does not make so much sense.
128 bit arithmetic is only used when changing the physical memory map; not during runtime. However I agree that we should move to 64 bit addresses exclusively.
Signature · 1 line
error compiling committee.c: too many arguments to function