target/alpha update
One quite old queued patch, and two recent bug fixes.
r~
The following changes since commit c102d9471f8f02d9fbea72ec4505d7089173f470:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190107' into staging (2019-01-07 16:56:33 +0000)
are available in the Git repository at:
https://github.com/rth7680/qemu.git tags/pull-axp-20190108
for you to fetch changes up to ac89de40ef5d4eb1704aa830342a5371413a81dc:
pc-bios: Update palcode-clipper (2019-01-08 12:12:51 +1000)
----------------------------------------------------------------
Queued target/alpha patches
----------------------------------------------------------------
Peter Maydell (1):
hw/alpha/typhoon: Stop calling cpu_unassigned_access()
Richard Henderson (2):
target/alpha: Fix user-only initialization of fpcr
pc-bios: Update palcode-clipper
hw/alpha/typhoon.c | 47 +++++++++++++++++++++++++++-------------------- target/alpha/cpu.c | 6 +++--- pc-bios/palcode-clipper | Bin 152680 -> 155968 bytes roms/qemu-palcode | 2 +- 4 files changed, 31 insertions(+), 24 deletions(-)
[Qemu-devel] [PULL 1/3] hw/alpha/typhoon: Stop calling cpu_unassigned_access()
From: Peter Maydell <[email protected]>
The typhoon MemoryRegionOps callbacks directly call cpu_unassigned_access(), presumably as the old-fashioned way to provoke a CPU exception. This won't work since commit 6ad4d7eed05a1e235 when we switched Alpha over to the transaction_failed hook API, because now cpu_unassigned_access() is a no-op for Alpha.
Make the MemoryRegionOps callbacks use the read_with_attrs and write_with_attrs hooks, so they can signal a failure that should cause a CPU exception by returning MEMTX_ERROR.
Message-Id: <[email protected]>
--- hw/alpha/typhoon.c | 47 ++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-)
hw/alpha/typhoon.c +27 -20
@@ -75,7 +75,9 @@ static void cpu_irq_change(AlphaCPU *cpu, uint64_t req) } } -static uint64_t cchip_read (void *opaque,hwaddr addr,unsigned size) +static MemTxResult cchip_read (void *opaque,hwaddr addr, +uint64_t *data,unsigned size, +MemTxAttrs attrs) {CPUState *cpu = current_cpu;TyphoonState *s = opaque;
@@ -196,11 +198,11 @@ static uint64_t cchip_read(void *opaque, hwaddr addr, unsigned size)break ;default : -cpu_unassigned_access (cpu, addr, false, false,0 , size); -return -1 ; +return MEMTX_ERROR ; } -return ret; + *data = ret; +return MEMTX_OK ; }static uint64_t dchip_read (void *opaque,hwaddr addr,unsigned size)
@@ -209,7 +211,8 @@ static uint64_t dchip_read(void *opaque, hwaddr addr, unsigned size)return 0 ; } -static uint64_t pchip_read (void *opaque,hwaddr addr,unsigned size) +static MemTxResult pchip_read (void *opaque,hwaddr addr,uint64_t *data, +unsigned size,MemTxAttrs attrs) {TyphoonState *s = opaque;uint64_t ret =0 ;
@@ -294,15 +297,16 @@ static uint64_t pchip_read(void *opaque, hwaddr addr, unsigned size)break ;default : -cpu_unassigned_access (current_cpu, addr, false, false,0 , size); -return -1 ; +return MEMTX_ERROR ; } -return ret; + *data = ret; +return MEMTX_OK ; } -static void cchip_write (void *opaque,hwaddr addr, -uint64_t val,unsigned size) +static MemTxResult cchip_write (void *opaque,hwaddr addr, +uint64_t val,unsigned size, +MemTxAttrs attrs) {TyphoonState *s = opaque;uint64_t oldval, newval;
@@ -446,9 +450,10 @@ static void cchip_write(void *opaque, hwaddr addr,break ;default : -cpu_unassigned_access (current_cpu, addr, true, false,0 , size); -return ; +return MEMTX_ERROR ; } + +return MEMTX_OK ; } static void dchip_write(void *opaque, hwaddr addr,
@@ -457,8 +462,9 @@ static void dchip_write(void *opaque, hwaddr addr,/* Skip this. It's all related to DRAM timing and setup. */ } -static void pchip_write (void *opaque,hwaddr addr, -uint64_t val,unsigned size) +static MemTxResult pchip_write (void *opaque,hwaddr addr, +uint64_t val,unsigned size, +MemTxAttrs attrs) {TyphoonState *s = opaque;uint64_t oldval;
@@ -553,14 +559,15 @@ static void pchip_write(void *opaque, hwaddr addr,break ;default : -cpu_unassigned_access (current_cpu, addr, true, false,0 , size); -return ; +return MEMTX_ERROR ; } + +return MEMTX_OK ; }static const MemoryRegionOps cchip_ops = { - .read = cchip_read, - .write = cchip_write, + .read_with_attrs = cchip_read, + .write_with_attrs = cchip_write, .endianness =DEVICE_LITTLE_ENDIAN , .valid = { .min_access_size =8 ,
@@ -587,8 +594,8 @@ static const MemoryRegionOps dchip_ops = { };static const MemoryRegionOps pchip_ops = { - .read = pchip_read, - .write = pchip_write, + .read_with_attrs = pchip_read, + .write_with_attrs = pchip_write, .endianness =DEVICE_LITTLE_ENDIAN , .valid = { .min_access_size =8 ,
Signature · 1 line
2.17.2
[Qemu-devel] [PULL 2/3] target/alpha: Fix user-only initialization of fpcr
In reply to Richard HendersonWhen the representation of fpcr was changed, the user-only initialization was not updated to match. Oops.
--- target/alpha/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
target/alpha/cpu.c +3 -3
@@ -205,9 +205,9 @@ static void alpha_cpu_initfn(Object *obj) env->lock_addr =-1 ;#if defined(CONFIG_USER_ONLY ) env->flags =ENV_FLAG_PS_USER |ENV_FLAG_FEN ; -cpu_alpha_store_fpcr (env, (FPCR_INVD |FPCR_DZED |FPCR_OVFD - |FPCR_UNFD |FPCR_INED |FPCR_DNOD - |FPCR_DYN_NORMAL )); +cpu_alpha_store_fpcr (env, (uint64_t )(FPCR_INVD |FPCR_DZED |FPCR_OVFD + |FPCR_UNFD |FPCR_INED |FPCR_DNOD + |FPCR_DYN_NORMAL ) <<32 );#else env->flags =ENV_FLAG_PAL_MODE |ENV_FLAG_FEN ;#endif
Signature · 1 line
2.17.2
[Qemu-devel] [PULL 3/3] pc-bios: Update palcode-clipper
In reply to Richard HendersonDo not double-update the PC after OPCDEC.
--- pc-bios/palcode-clipper | Bin 152680 -> 155968 bytes roms/qemu-palcode | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-)
pc-bios/palcode-clipper binary +0 -0
roms/qemu-palcode +1 -1
@@ -1 +1 @@ -Subproject commit f3c7e44c70254975df2a00af39701eafbac4d471 +Subproject commit 51c237d7e20d05100eacadee2f61abc17e6bc097
Signature · 1 line
2.17.2
Peter Maydell
AppliedQuoted 22 lines · Richard Henderson
One quite old queued patch, and two recent bug fixes.
r~
The following changes since commit
c102d9471f8f02d9fbea72ec4505d7089173f470:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190107' into staging (2019-01-07 16:56:33 +0000)
are available in the Git repository at:
https://github.com/rth7680/qemu.git tags/pull-axp-20190108
for you to fetch changes up to
ac89de40ef5d4eb1704aa830342a5371413a81dc:pc-bios: Update palcode-clipper (2019-01-08 12:12:51 +1000)
----------------------------------------------------------------
Queued target/alpha patches
Quoted 7 lines
----------------------------------------------------------------
Peter Maydell (1):
hw/alpha/typhoon: Stop callingcpu_unassigned_access()Richard Henderson (2):
target/alpha: Fix user-only initialization of fpcr
pc-bios: Update palcode-clipper
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM