target-arm queue
v2 pull:
* dropped the ast2500 patches
* fix ast2400 memory controller format string bug
thanks
-- PMM
The following changes since commit 2926375cffce464fde6b4dabaed1e133d549af39:
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-09-06 17:18:17 +0100)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20160906-1
for you to fetch changes up to c827c06a4dd6c768eeb3aaa6af6cfd29663116af:
block: m25p80: Fix vmstate structure name (2016-09-06 19:52:18 +0100)
----------------------------------------------------------------
target-arm queue:
* fix incorrect LPAE bit in FSR for alignment faults
* ACPI: fix the AML ID format for CPU devices to work for large numbers of CPUs
* ast2400: add memory controller device model
* m25p80: fix the vmstate structure name (migration break)
----------------------------------------------------------------
Cédric Le Goater (1):
ast2400: add a memory controller device model
Marcin Krzeminski (1):
block: m25p80: Fix vmstate structure name
Sergey Sorokin (1):
target-arm: Fix lpae bit in FSR on an alignment fault
Wei Huang (1):
ARM: ACPI: fix the AML ID format for CPU devices
hw/arm/ast2400.c | 15 +++ hw/arm/virt-acpi-build.c | 2 +- hw/block/m25p80.c | 29 +++-- hw/misc/Makefile.objs | 2 +- hw/misc/aspeed_sdmc.c | 263 ++++++++++++++++++++++++++++++++++++++++++ include/hw/arm/ast2400.h | 2 + include/hw/misc/aspeed_sdmc.h | 31 +++++ target-arm/op_helper.c | 2 +- 8 files changed, 328 insertions(+), 18 deletions(-) create mode 100644 hw/misc/aspeed_sdmc.c create mode 100644 include/hw/misc/aspeed_sdmc.h
[Qemu-devel] [PULL 3/4] ARM: ACPI: fix the AML ID format for CPU devices
From: Wei Huang <[email protected]>
Current QEMU will stall guest VM booting under ACPI mode when vcpu count is >= 12. Analyzing the booting log, it turns out that DSDT table can't be loaded correctly due to "Invalid character(s) in name (0x62303043),
repaired: [C00*]". This is because existing QEMU uses a lower case AML ID for CPU devices (e.g. C000, C001, ..., C00a, C00b). The ACPI code inside guest VM detects this lower case character as an invalid character (see acpi_ut_valid_acpi_char() in drivers/acpi/acpica/utstring.c file) and converts it to "*". This causes duplicated IDs (i.e. "C00a" ==>"C00*" and "C00b" ==> "C00*"). So ACPI refuses to load the table.
This patch fixes the problem by changing the format with a upper case character. It matches the CPU ID formats used in other parts of QEMU code.
Message-id: [email protected]
--- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/virt-acpi-build.c +1 -1
@@ -53,7 +53,7 @@ static void acpi_dsdt_add_cpus(Aml *scope, int smp_cpus)uint16_t i;for (i =0 ; i < smp_cpus; i++) { -Aml *dev =aml_device ("C%03x" , i); +Aml *dev =aml_device ("C%.03X" , i);aml_append (dev,aml_name_decl ("_HID" ,aml_string ("ACPI0007" )));aml_append (dev,aml_name_decl ("_UID" ,aml_int (i)));aml_append (scope, dev);
Signature · 1 line
2.7.4
[Qemu-devel] [PULL 2/4] target-arm: Fix lpae bit in FSR on an alignment fault
In reply to Peter MaydellFrom: Sergey Sorokin <[email protected]>
If an alignment fault occurred and target EL is using AArch32, then DFSR/IFSR bit LPAE[9] must be set correctly.
Message-id: [email protected]
--- target-arm/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-arm/op_helper.c +1 -1
@@ -194,7 +194,7 @@ void arm_cpu_do_unaligned_access(CPUState *cs, vaddr vaddr,* the LPAE long descriptor format, or the short descriptor format */ if (arm_s1_regime_using_lpae_format (env,cpu_mmu_index (env, false))) { - env->exception.fsr =0x21 ; + env->exception.fsr = (1 <<9 ) |0x21 ; }else { env->exception.fsr =0x1 ; }
Signature · 1 line
2.7.4
[Qemu-devel] [PULL 4/4] block: m25p80: Fix vmstate structure name
In reply to Peter MaydellFrom: Marcin Krzeminski <[email protected]>
Correct bad name of the vmstate structure. Since this breaks compatibility also update vmstate version back to 0 and make all fields independent of the VMState version.
Message-id: [email protected]
--- hw/block/m25p80.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-)
hw/block/m25p80.c +14 -15
@@ -1189,9 +1189,9 @@ static Property m25p80_properties[] = { };static const VMStateDescription vmstate_m25p80 = { - .name ="xilinx_spi" , - .version_id =3 , - .minimum_version_id =1 , + .name ="m25p80" , + .version_id =0 , + .minimum_version_id =0 , .pre_save = m25p80_pre_save, .fields = (VMStateField []) {VMSTATE_UINT8 (state, Flash),
@@ -1200,20 +1200,19 @@ static const VMStateDescription vmstate_m25p80 = { VMSTATE_UINT32(pos, Flash), VMSTATE_UINT8(needed_bytes, Flash), VMSTATE_UINT8(cmd_in_progress, Flash), - VMSTATE_UNUSED(4), VMSTATE_UINT32(cur_addr, Flash), VMSTATE_BOOL(write_enable, Flash), - VMSTATE_BOOL_V(reset_enable, Flash, 2), - VMSTATE_UINT8_V(ear, Flash, 2), - VMSTATE_BOOL_V(four_bytes_address_mode, Flash, 2), - VMSTATE_UINT32_V(nonvolatile_cfg, Flash, 2), - VMSTATE_UINT32_V(volatile_cfg, Flash, 2), - VMSTATE_UINT32_V(enh_volatile_cfg, Flash, 2), - VMSTATE_BOOL_V(quad_enable, Flash, 3), - VMSTATE_UINT8_V(spansion_cr1nv, Flash, 3), - VMSTATE_UINT8_V(spansion_cr2nv, Flash, 3), - VMSTATE_UINT8_V(spansion_cr3nv, Flash, 3), - VMSTATE_UINT8_V(spansion_cr4nv, Flash, 3), + VMSTATE_BOOL(reset_enable, Flash), + VMSTATE_UINT8(ear, Flash), + VMSTATE_BOOL(four_bytes_address_mode, Flash), + VMSTATE_UINT32(nonvolatile_cfg, Flash), + VMSTATE_UINT32(volatile_cfg, Flash), + VMSTATE_UINT32(enh_volatile_cfg, Flash), + VMSTATE_BOOL(quad_enable, Flash), + VMSTATE_UINT8(spansion_cr1nv, Flash), + VMSTATE_UINT8(spansion_cr2nv, Flash), + VMSTATE_UINT8(spansion_cr3nv, Flash), + VMSTATE_UINT8(spansion_cr4nv, Flash),VMSTATE_END_OF_LIST () } };
Signature · 1 line
2.7.4
[Qemu-devel] [PULL 1/4] ast2400: add a memory controller device model
In reply to Peter MaydellFrom: Cédric Le Goater <[email protected]>
The uboot in the previous release of the SDK was using a hardcoded value for memory size. This is not true anymore, the value is now retrieved from the memory controller.
Below is a model for this device, only supporting unlock and configuration. Without it, we endup running a guest with 64MB, which is a bit low nowdays. It uses a 'silicon-rev' property and ram_size to build a default value. Some bits should be linked to SCU strapping registers but it seems a bit complex to add for the current need.
The model is ready for the AST2500 SOC.
--- hw/arm/ast2400.c | 15 +++ hw/misc/Makefile.objs | 2 +- hw/misc/aspeed_sdmc.c | 263 ++++++++++++++++++++++++++++++++++++++++++ include/hw/arm/ast2400.h | 2 + include/hw/misc/aspeed_sdmc.h | 31 +++++ 5 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 hw/misc/aspeed_sdmc.c create mode 100644 include/hw/misc/aspeed_sdmc.h
hw/arm/ast2400.c +15 -0
@@ -27,6 +27,7 @@#define AST2400_FMC_BASE 0X1E620000#define AST2400_SPI_BASE 0X1E630000#define AST2400_VIC_BASE 0x1E6C0000 +#define AST2400_SDMC_BASE 0x1E6E0000#define AST2400_SCU_BASE 0x1E6E2000#define AST2400_TIMER_BASE 0x1E782000#define AST2400_I2C_BASE 0x1E78A000
@@ -97,6 +98,12 @@ static void ast2400_init(Object *obj)object_initialize (&s->spi,sizeof (s->spi),"aspeed.smc.spi" );object_property_add_child (obj,"spi" ,OBJECT (&s->spi),NULL );qdev_set_parent_bus (DEVICE (&s->spi),sysbus_get_default ()); + +object_initialize (&s->sdmc,sizeof (s->sdmc),TYPE_ASPEED_SDMC ); +object_property_add_child (obj,"sdmc" ,OBJECT (&s->sdmc),NULL ); +qdev_set_parent_bus (DEVICE (&s->sdmc),sysbus_get_default ()); +qdev_prop_set_uint32 (DEVICE (&s->sdmc),"silicon-rev" , +AST2400_A0_SILICON_REV ); }static void ast2400_realize (DeviceState *dev,Error **errp)
@@ -183,6 +190,14 @@ static void ast2400_realize(DeviceState *dev, Error **errp) }sysbus_mmio_map (SYS_BUS_DEVICE (&s->spi),0 ,AST2400_SPI_BASE );sysbus_mmio_map (SYS_BUS_DEVICE (&s->spi),1 ,AST2400_SPI_FLASH_BASE ); + +/* SDMC - SDRAM Memory Controller */ +object_property_set_bool (OBJECT (&s->sdmc), true,"realized" , &err); +if (err) { +error_propagate (errp, err); +return ; + } +sysbus_mmio_map (SYS_BUS_DEVICE (&s->sdmc),0 ,AST2400_SDMC_BASE ); }static void ast2400_class_init (ObjectClass *oc,void *data)
hw/misc/Makefile.objs +1 -1
@@ -52,4 +52,4 @@ obj-$(CONFIG_PVPANIC) += pvpanic.o obj-$(CONFIG_EDU) += edu.o obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o obj-$(CONFIG_AUX) += auxbus.o -obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o +obj-$(CONFIG_ASPEED_SOC) += aspeed_scu.o aspeed_sdmc.o
hw/misc/aspeed_sdmc.c new file +263 -0
263 lines not on this page · raw message
include/hw/arm/ast2400.h +2 -0
@@ -15,6 +15,7 @@#include "hw/arm/arm.h" #include "hw/intc/aspeed_vic.h" #include "hw/misc/aspeed_scu.h" +#include "hw/misc/aspeed_sdmc.h" #include "hw/timer/aspeed_timer.h" #include "hw/i2c/aspeed_i2c.h" #include "hw/ssi/aspeed_smc.h"
@@ -32,6 +33,7 @@ typedef struct AST2400State {AspeedSCUState scu;AspeedSMCState smc;AspeedSMCState spi; +AspeedSDMCState sdmc; } AST2400State;#define TYPE_AST2400 "ast2400"
include/hw/misc/aspeed_sdmc.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* ASPEED SDRAM Memory Controller +* +* Copyright (C) 2016 IBM Corp. +* +* This code is licensed under the GPL version 2 or later. See the +* COPYING file in the top-level directory. +*/ +#ifndef ASPEED_SDMC_H +#define ASPEED_SDMC_H + +#include "hw/sysbus.h" + +#define TYPE_ASPEED_SDMC "aspeed.sdmc" +#define ASPEED_SDMC (obj) OBJECT_CHECK(AspeedSDMCState, (obj), TYPE_ASPEED_SDMC) + +#define ASPEED_SDMC_NR_REGS (0x8 >> 2) + +typedef struct AspeedSDMCState { +/*< private >*/ +SysBusDevice parent_obj; + +/*< public >*/ +MemoryRegion iomem; + +uint32_t regs[ASPEED_SDMC_NR_REGS ]; +uint32_t silicon_rev; + +}AspeedSDMCState ; + +#endif /* ASPEED_SDMC_H */
Signature · 1 line
2.7.4
Peter Maydell
AppliedQuoted 20 lines · Peter Maydell
v2 pull:
* dropped the ast2500 patches
* fix ast2400 memory controller format string bugthanks
-- PMMThe following changes since commit
2926375cffce464fde6b4dabaed1e133d549af39:Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-09-06 17:18:17 +0100)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.gittags/pull-target-arm-20160906-1for you to fetch changes up to
c827c06a4dd6c768eeb3aaa6af6cfd29663116af:block: m25p80: Fix vmstate structure name (2016-09-06 19:52:18 +0100)
Quoted 8 lines
----------------------------------------------------------------
target-arm queue:
* fix incorrect LPAE bit in FSR for alignment faults
* ACPI: fix the AML ID format for CPU devices to work for large numbers of CPUs
* ast2400: add memory controller device model
* m25p80: fix the vmstate structure name (migration break)
Applied, thanks.
-- PMM
Quoted 30 lines · Peter Maydell
Quoted 20 lines · Peter Maydell
v2 pull:
* dropped the ast2500 patches
* fix ast2400 memory controller format string bugthanks
-- PMMThe following changes since commit
2926375cffce464fde6b4dabaed1e133d549af39:Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-09-06 17:18:17 +0100)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.gittags/pull-target-arm-20160906-1for you to fetch changes up to
c827c06a4dd6c768eeb3aaa6af6cfd29663116af:block: m25p80: Fix vmstate structure name (2016-09-06 19:52:18 +0100)
Quoted 8 lines
----------------------------------------------------------------
target-arm queue:
* fix incorrect LPAE bit in FSR for alignment faults
* ACPI: fix the AML ID format for CPU devices to work for large numbers of CPUs
* ast2400: add memory controller device model
* m25p80: fix the vmstate structure name (migration break)
Quoted 1 line
Applied, thanks.
Hello Peter,
I have a little patchset fixing what you have asked for regarding the RAM setting in Aspeed, but it depends on the ast2500. So I suppose I should wait for the next merge before sending ?
Thanks,
C.
Quoted 6 lines · Cédric Le Goater
Hello Peter,
I have a little patchset fixing what you have asked for regarding the RAM setting in Aspeed, but it depends on the ast2500. So I suppose I should wait for the next merge before sending ?
I dropped those patches, so you'll need to respin them anyway. You can include the ram setting stuff in that patchset (squashed in or as an extra patch as you see fit).
thanks
-- PMM