target-arm queue
Last target-arm pull before rc1. I don't know of any further outstanding ARM related issues which would need to be fixed for 2.0 so barring any late-breaking bug reports I think this should be it until release.
thanks
-- PMM
The following changes since commit 059b3527f0229f4d60fd77a317503d42abd5e50f:
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-2' into staging (2014-03-18 16:39:29 +0000)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20140319
for you to fetch changes up to 09e037354b6f940c18f417f23355cffd23f4fde5:
target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD) (2014-03-18 23:10:06 +0000)
----------------------------------------------------------------
target-arm queue:
* last few A64 Neon instructions
* fix some PL011 UART bugs causing occasional serial lockups
* fix the non-PCI AHCI device
----------------------------------------------------------------
Alex Bennée (2):
target-arm: A64: Add saturating int ops (SQNEG/SQABS)
target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD)
Rob Herring (4):
ahci: fix sysbus support
pl011: reset the fifo when enabled or disabled
pl011: fix UARTRSR accesses corrupting the UARTCR value
pl011: fix incorrect logic to set the RXFF flag
hw/char/pl011.c | 24 ++++-- hw/ide/ahci.c | 13 ++-- target-arm/helper.h | 34 ++++++--- target-arm/neon_helper.c | 187 +++++++++++++++++++++++++++++++++++++++++++++ target-arm/translate-a64.c | 160 +++++++++++++++++++++++++++++++++++--- 5 files changed, 383 insertions(+), 35 deletions(-)
[Qemu-devel] [PULL 6/6] target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD)
From: Alex Bennée <[email protected]>
Add the saturating accumulate operations USQADD and SUQADD to the A64 instruction set. This completes coverage of A64 Neon. These operations (which are unsigned + signed -> signed and signed + unsigned -> unsigned) don't exist in the A32/T32 instruction set, so require a complete new set of helper functions.
--- target-arm/helper.h | 20 ++++-- target-arm/neon_helper.c | 165 +++++++++++++++++++++++++++++++++++++++++++++ target-arm/translate-a64.c | 109 ++++++++++++++++++++++++++++-- 3 files changed, 284 insertions(+), 10 deletions(-)
target-arm/helper.h +14 -6
@@ -186,12 +186,20 @@ DEF_HELPER_FLAGS_2(rints, TCG_CALL_NO_RWG, f32, f32, ptr)DEF_HELPER_FLAGS_2 (rintd,TCG_CALL_NO_RWG , f64, f64, ptr) /* neon_helper.c */ -DEF_HELPER_3(neon_qadd_u8, i32, env, i32, i32) -DEF_HELPER_3(neon_qadd_s8, i32, env, i32, i32) -DEF_HELPER_3(neon_qadd_u16, i32, env, i32, i32) -DEF_HELPER_3(neon_qadd_s16, i32, env, i32, i32) -DEF_HELPER_3(neon_qadd_u32, i32, env, i32, i32) -DEF_HELPER_3(neon_qadd_s32, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_qadd_u8, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_qadd_s8, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_qadd_u16, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_qadd_s16, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_qadd_u32, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_qadd_s32, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_uqadd_s8, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_uqadd_s16, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_uqadd_s32, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_uqadd_s64, TCG_CALL_NO_RWG, i64, env, i64, i64) +DEF_HELPER_FLAGS_3(neon_sqadd_u8, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_sqadd_u16, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_sqadd_u32, TCG_CALL_NO_RWG, i32, env, i32, i32) +DEF_HELPER_FLAGS_3(neon_sqadd_u64, TCG_CALL_NO_RWG, i64, env, i64, i64) DEF_HELPER_3(neon_qsub_u8, i32, env, i32, i32) DEF_HELPER_3(neon_qsub_s8, i32, env, i32, i32)DEF_HELPER_3 (neon_qsub_u16, i32, env, i32, i32)
target-arm/neon_helper.c +165 -0
171 lines not on this page · raw message
target-arm/translate-a64.c +105 -4
133 lines not on this page · raw message
Signature · 1 line
1.9.0
[Qemu-devel] [PULL 3/6] pl011: fix UARTRSR accesses corrupting the UARTCR value
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
Offset 4 is UARTRSR/UARTECR, not the UARTCR. The UARTCR would be corrupted if the UARTRSR is ever written. Fix by implementing a correct model of the UARTRSR/UARTECR register. Reads of this register simply reflect the error bits in data register. Only breaks can be triggered in QEMU. With the pl011_can_receive function, we effectively have flow control between the host and the model. Framing and parity errors simply don't make sense in the model and will never occur.
Message-id: [email protected]
--- hw/char/pl011.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
hw/char/pl011.c +10 -7
@@ -20,6 +20,7 @@ typedef struct PL011State {uint32_t readbuff;uint32_t flags;uint32_t lcr; +uint32_t rsr;uint32_t cr;uint32_t dmacr;uint32_t int_enabled;
@@ -81,13 +82,14 @@ static uint64_t pl011_read(void *opaque, hwaddr offset, }if (s->read_count == s->read_trigger -1 ) s->int_level &= ~PL011_INT_RX ; + s->rsr = c >>8 ;pl011_update (s);if (s->chr) {qemu_chr_accept_input (s->chr); }return c; -case 1 :/* UARTCR */ -return 0 ; +case 1 :/* UARTRSR */ +return s->rsr;case 6 :/* UARTFR */ return s->flags;case 8 :/* UARTILPR */
@@ -146,8 +148,8 @@ static void pl011_write(void *opaque, hwaddr offset, s->int_level |=PL011_INT_TX ;pl011_update (s);break ; -case 1 :/* UARTCR */ - s->cr = value; +case 1 :/* UARTRSR/UARTECR */ + s->rsr =0 ;break ;case 6 :/* UARTFR */ /* Writes to Flag register are ignored. */
@@ -247,13 +249,14 @@ static const MemoryRegionOps pl011_ops = {static const VMStateDescription vmstate_pl011 = { .name ="pl011" , - .version_id =1 , - .minimum_version_id =1 , - .minimum_version_id_old =1 , + .version_id =2 , + .minimum_version_id =2 , + .minimum_version_id_old =2 , .fields = (VMStateField []) {VMSTATE_UINT32 (readbuff, PL011State),VMSTATE_UINT32 (flags, PL011State),VMSTATE_UINT32 (lcr, PL011State), +VMSTATE_UINT32 (rsr, PL011State),VMSTATE_UINT32 (cr, PL011State),VMSTATE_UINT32 (dmacr, PL011State),VMSTATE_UINT32 (int_enabled, PL011State),
Signature · 1 line
1.9.0
[Qemu-devel] [PULL 4/6] pl011: fix incorrect logic to set the RXFF flag
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
The receive fifo full bit should be set when 1 character is received and the fifo is disabled or when 16 characters are in the fifo.
Message-id: [email protected]
--- hw/char/pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/char/pl011.c +1 -1
@@ -221,7 +221,7 @@ static void pl011_put_fifo(void *opaque, uint32_t value) s->read_fifo[slot] = value; s->read_count++; s->flags &= ~PL011_FLAG_RXFE ; -if (s->cr &0x10 || s->read_count ==16 ) { +if (!(s->lcr &0x10 ) || s->read_count ==16 ) { s->flags |=PL011_FLAG_RXFF ; }if (s->read_count == s->read_trigger) {
Signature · 1 line
1.9.0
[Qemu-devel] [PULL 2/6] pl011: reset the fifo when enabled or disabled
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
Intermittent issues have been seen where no serial input occurs. It appears the pl011 gets in a state where the rx interrupt never fires because the rx interrupt only asserts when crossing the fifo trigger level. The fifo state appears to get out of sync when the pl011 is re-configured. This combined with the rx timeout interrupt not being modeled results in no more rx interrupts.
Disabling the fifo is the recommended way to clear the tx fifo in the TRM (section 3.3.8). The behavior in this case for the rx fifo is undefined in the TRM, but having fifo contents to be maintained during configuration changes is not likely expected behavior. Reseting the fifo state when the fifo size is changed is the simplest solution.
Message-id: [email protected]
--- hw/char/pl011.c | 5 +++++ 1 file changed, 5 insertions(+)
hw/char/pl011.c +5 -0
@@ -162,6 +162,11 @@ static void pl011_write(void *opaque, hwaddr offset, s->fbrd = value;break ;case 11 :/* UARTLCR_H */ +/* Reset the FIFO state on FIFO enable or disable */ +if ((s->lcr ^ value) &0x10 ) { + s->read_count =0 ; + s->read_pos =0 ; + } s->lcr = value;pl011_set_read_trigger (s);break ;
Signature · 1 line
1.9.0
[Qemu-devel] [PULL 5/6] target-arm: A64: Add saturating int ops (SQNEG/SQABS)
In reply to Peter MaydellFrom: Alex Bennée <[email protected]>
This mostly re-uses the existing NEON helpers with an additional two for the 64 bit case. I also took the opportunity to add TCG_CALL_NO_RWG options to the helpers as they don't modify globals (saturation flags are in the CPU Environment).
--- target-arm/helper.h | 14 +++++++------ target-arm/neon_helper.c | 22 ++++++++++++++++++++ target-arm/translate-a64.c | 51 ++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 75 insertions(+), 12 deletions(-)
target-arm/helper.h +8 -6
@@ -375,12 +375,14 @@ DEF_HELPER_2(neon_mull_s16, i64, i32, i32) DEF_HELPER_1(neon_negl_u16, i64, i64) DEF_HELPER_1(neon_negl_u32, i64, i64) -DEF_HELPER_2(neon_qabs_s8, i32, env, i32) -DEF_HELPER_2(neon_qabs_s16, i32, env, i32) -DEF_HELPER_2(neon_qabs_s32, i32, env, i32) -DEF_HELPER_2(neon_qneg_s8, i32, env, i32) -DEF_HELPER_2(neon_qneg_s16, i32, env, i32) -DEF_HELPER_2(neon_qneg_s32, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qabs_s8, TCG_CALL_NO_RWG, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qabs_s16, TCG_CALL_NO_RWG, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qabs_s32, TCG_CALL_NO_RWG, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qabs_s64, TCG_CALL_NO_RWG, i64, env, i64) +DEF_HELPER_FLAGS_2(neon_qneg_s8, TCG_CALL_NO_RWG, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qneg_s16, TCG_CALL_NO_RWG, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qneg_s32, TCG_CALL_NO_RWG, i32, env, i32) +DEF_HELPER_FLAGS_2(neon_qneg_s64, TCG_CALL_NO_RWG, i64, env, i64) DEF_HELPER_3(neon_abd_f32, i32, i32, i32, ptr)DEF_HELPER_3 (neon_ceq_f32, i32, i32, i32, ptr)
target-arm/neon_helper.c +22 -0
@@ -1776,6 +1776,28 @@ uint32_t HELPER(neon_qneg_s32)(CPUARMState *env, uint32_t x)return x; } +uint64_t HELPER (neon_qabs_s64 )(CPUARMState *env,uint64_t x) +{ +if (x ==SIGNBIT64 ) { +SET_QC (); + x = ~SIGNBIT64 ; + }else if ((int64_t )x <0 ) { + x = -x; + } +return x; +} + +uint64_t HELPER (neon_qneg_s64 )(CPUARMState *env,uint64_t x) +{ +if (x ==SIGNBIT64 ) { +SET_QC (); + x = ~SIGNBIT64 ; + }else { + x = -x; + } +return x; +} +/* NEON Float helpers. */ uint32_t HELPER (neon_abd_f32 )(uint32_t a,uint32_t b,void *fpstp) {
target-arm/translate-a64.c +45 -6
102 lines not on this page · raw message
Signature · 1 line
1.9.0
[Qemu-devel] [PULL 1/6] ahci: fix sysbus support
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
Non-PCI AHCI support is broken due to assertion failures when trying to convert AHCIState to a PCIDevice pointer as AHCIState can have different container structs. Fix this by using the non-asserting object cast and checking the returned pointer is not NULL.
The AddressSpace pointer is also being initialized to NULL and causing dma_memory_map call to fail. Fix this by initializing to address_space_memory for sysbus instances.
Also correct AHCI_VMSTATE to use the correct container SysbusAHCIState for sysbus instances.
Message-id: [email protected]
--- hw/ide/ahci.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
hw/ide/ahci.c +8 -5
@@ -118,11 +118,12 @@ static uint32_t ahci_port_read(AHCIState *s, int port, int offset)static void ahci_irq_raise (AHCIState *s,AHCIDevice *dev) {AHCIPCIState *d =container_of (s, AHCIPCIState, ahci); -PCIDevice *pci_dev =PCI_DEVICE (d); +PCIDevice *pci_dev = + (PCIDevice *)object_dynamic_cast (OBJECT (d),TYPE_PCI_DEVICE );DPRINTF (0 ,"raise irq\n" ); -if (msi_enabled (pci_dev)) { +if (pci_dev &&msi_enabled (pci_dev)) {msi_notify (pci_dev,0 ); }else {qemu_irq_raise (s->irq);
@@ -132,10 +133,12 @@ static void ahci_irq_raise(AHCIState *s, AHCIDevice *dev)static void ahci_irq_lower (AHCIState *s,AHCIDevice *dev) {AHCIPCIState *d =container_of (s, AHCIPCIState, ahci); +PCIDevice *pci_dev = + (PCIDevice *)object_dynamic_cast (OBJECT (d),TYPE_PCI_DEVICE );DPRINTF (0 ,"lower irq\n" ); -if (!msi_enabled (PCI_DEVICE (d))) { +if (!pci_dev || !msi_enabled (pci_dev)) {qemu_irq_lower (s->irq); } }
@@ -1311,7 +1314,7 @@ static const VMStateDescription vmstate_sysbus_ahci = { .name = "sysbus-ahci", .unmigratable = 1, /* Still buggy under I/O load */ .fields = (VMStateField []) { -VMSTATE_AHCI (ahci, AHCIPCIState), +VMSTATE_AHCI (ahci, SysbusAHCIState),VMSTATE_END_OF_LIST () }, };
@@ -1328,7 +1331,7 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp)SysBusDevice *sbd =SYS_BUS_DEVICE (dev);SysbusAHCIState *s =SYSBUS_AHCI (dev); -ahci_init (&s->ahci, dev,NULL , s->num_ports); +ahci_init (&s->ahci, dev, &address_space_memory, s->num_ports);sysbus_init_mmio (sbd, &s->ahci.mem);sysbus_init_irq (sbd, &s->ahci.irq);
Signature · 1 line
1.9.0
Peter Maydell
AppliedQuoted 3 lines · Peter Maydell
Last target-arm pull before rc1. I don't know of any further outstanding ARM related issues which would need to be fixed for 2.0 so barring any late-breaking bug reports I think this should be it until release.
Applied, thanks.
-- PMM