arm: add support for Calxeda Highbank
v13 cover arm: add support for Calxeda Highbank
This patch series adds support for the Calxeda Highbank SoC.
Makefile.target | 2 + hw/arm-misc.h | 17 ++ hw/arm_boot.c | 65 ++++++-- hw/highbank.c | 331 ++++++++++++++++++++++++++++++++++++++++ hw/ide/ahci.c | 44 ++++++ hw/xgmac.c | 421 +++++++++++++++++++++++++++++++++++++++++++++++++++ target-arm/helper.c | 7 + 7 files changed, 870 insertions(+), 17 deletions(-)
PATCH v13 1/6 Add xgmac ethernet model
From: Rob Herring <[email protected]>
This adds very basic support for the xgmac ethernet core. Missing things include:
- statistics counters
- WoL support
- rx checksum offload
- chained descriptors (only linear descriptor ring)
- broadcast and multicast handling
---
Changes from v10-v12
None
Changes from v9
Make typedef struct names into CamelCase
Changes from v7, v8
None
Changes from v6
Skipped
Changes from v5
removed c_phyaddr
Changes from v4
None
Changes from v3
Added debug macro and cleaned up some debug code Refitted all lines to fit within 80 columns
Changes from v2
None
Changes from v1
Reformated most lines to fit within 80 columns Removed a bunch of unused variables in the state structures Got rid of some camelcase structure names
Makefile.target | 1 + hw/xgmac.c | 421 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 422 insertions(+), 0 deletions(-) create mode 100644 hw/xgmac.c
Makefile.target +1 -0
@@ -343,6 +343,7 @@ obj-arm-y += arm_l2x0.o obj-arm-y += arm_mptimer.o obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o obj-arm-y += pl061.o +obj-arm-y += xgmac.o obj-arm-y += arm-semi.o obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
hw/xgmac.c new file +421 -0
421 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v13 2/6 ahci: add support for non-PCI based controllers
In reply to Mark LangsdorfFrom: Rob Herring <[email protected]>
Add support for ahci on sysbus.
---
Changes from v10-v12
None
Changes from v9
Changed typedef struct names to CamelCase
Changes from v7, v8
None
Changes from v5, v6
Skipped
Changes from v4
replaced all references to Plat|plat_ with sysbus_ made the number of ports into a qdev property added dummy migration support
Changes from v3
Renamed plat-ahci to sysbus-ahci
Changes from v1, v2
Corrected indentation of PlatAHCIState members Made plat_ahci_info into a single structure, not a list
hw/ide/ahci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-)
hw/ide/ahci.c +44 -0
@@ -25,6 +25,7 @@#include <hw/msi.h> #include <hw/pc.h> #include <hw/pci.h> +#include <hw/sysbus.h> #include "monitor.h" #include "dma.h"
@@ -1214,3 +1215,46 @@ void ahci_reset(void *opaque)ahci_reset_port (&d->ahci, i); } } + +typedef struct SysbusAHCIState { +SysBusDevice busdev; +AHCIState ahci; +uint32_t num_ports; +}SysbusAHCIState ; + +static const VMStateDescription vmstate_sysbus_ahci = { + .name ="sysbus-ahci" , + .unmigratable =1 , +}; + +static int sysbus_ahci_init (SysBusDevice *dev) +{ +SysbusAHCIState *s =FROM_SYSBUS (SysbusAHCIState, dev); +ahci_init (&s->ahci, &dev->qdev, s->num_ports); + +sysbus_init_mmio (dev, &s->ahci.mem); +sysbus_init_irq (dev, &s->ahci.irq); + +qemu_register_reset (ahci_reset, &s->ahci); +return 0 ; +} + +static SysBusDeviceInfo sysbus_ahci_info = { + .qdev.name ="sysbus-ahci" , + .qdev.size =sizeof (SysbusAHCIState), + .qdev.vmsd = &vmstate_sysbus_ahci, + .qdev.props = (Property []) { +DEFINE_PROP_UINT32 ("num-ports" , SysbusAHCIState, num_ports,1 ), +DEFINE_PROP_END_OF_LIST (), + }, + .init = sysbus_ahci_init, + + +}; + +static void sysbus_ahci_register (void ) +{ +sysbus_register_withprop (&sysbus_ahci_info); +} + +device_init (sysbus_ahci_register);
Signature · 1 line
1.7.5.4
PATCH v13 3/6 arm: add secondary cpu boot callbacks to arm_boot.c
In reply to Mark LangsdorfCreate two functions, write_secondary_boot() and secondary_cpu_reset_hook(), to allow platforms more control of how secondary CPUs are brought up. The new functions default to NULL and aren't called unless they are populated so there are no changes to existing platform models.
---
Changes from v12
None
Changes from v11
Corrected typo in subject
expanded and corrected some documentation
moved the default_ functions nearer to smpboot array
Changes from v2-v10
Skipped
Changes from v1
Added default versions of the functions
Created checks so that NULL function entries became default versions Simplified calls to the secondary boot functions
Added comments on the use of these functions
hw/arm-misc.h | 17 +++++++++++++++++ hw/arm_boot.c | 54 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 11 deletions(-)
hw/arm-misc.h +17 -0
@@ -30,12 +30,29 @@ struct arm_boot_info {const char *kernel_cmdline;const char *initrd_filename;target_phys_addr_t loader_start; +/* multicore boards that use the default secondary core boot functions +* need to put the address of the secondary boot code, the boot reg, +* and the GIC address in the next 3 values, respectively. boards that +* have their own boot functions can use these values as they want. +*/ target_phys_addr_t smp_loader_start;target_phys_addr_t smp_bootreg_addr;target_phys_addr_t smp_priv_base;int nb_cpus;int board_id;int (*atag_board)(const struct arm_boot_info *info,void *p); +/* multicore boards that use the default secondary core boot functions +* can ignore these two function calls. If the default functions won't +* work, then write_secondary_boot() should write a suitable blob of +* code mimicing the secondary CPU startup process used by the board's +* boot loader/boot ROM code, and secondary_cpu_reset_hook() should +* perform any necessary CPU reset handling and set the PC for thei +* secondary CPUs to point at this boot blob. +*/ +void (*write_secondary_boot)(CPUState *env, +const struct arm_boot_info *info); +void (*secondary_cpu_reset_hook)(CPUState *env, +const struct arm_boot_info *info);/* Used internally by arm_boot.c */ int is_linux;target_phys_addr_t initrd_size;
hw/arm_boot.c +43 -11
84 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Re: [Qemu-devel] [PATCH v13 3/6] arm: add secondary cpu boot callbacks to arm_boot.c
Quoted 6 lines · Mark Langsdorf
Create two functions,
write_secondary_boot()andsecondary_cpu_reset_hook(), to allow platforms more control of how secondary CPUs are brought up. The new functions default to NULL and aren't called unless they are populated so there are no changes to existing platform models.Signed-off-by Mark Langsdorf <[email protected]>
-- PMM
PATCH v13 4/6 arm_boot: support board IDs more than 16 bits wide
In reply to Mark LangsdorfFrom: Peter Maydell <[email protected]>
Support passing a board ID value to the kernel in r1 that is more than 16 bits wide. This is needed to pass the '-1 == invalid' value for boards which only support device tree booting.
---
Changes from v1-v12
Skipped
hw/arm_boot.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
hw/arm_boot.c +5 -6
@@ -20,10 +20,10 @@/* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */ static uint32_t bootloader[] = {0xe3a00000 ,/* mov r0, #0 */ -0xe3a01000 ,/* mov r1, #0x?? */ -0xe3811c00 ,/* orr r1, r1, #0x??00 */ -0xe59f2000 ,/* ldr r2, [pc, #0] */ -0xe59ff000 ,/* ldr pc, [pc, #0] */ +0xe59f1004 ,/* ldr r1, [pc, #4] */ +0xe59f2004 ,/* ldr r2, [pc, #4] */ +0xe59ff004 ,/* ldr pc, [pc, #4] */ +0 ,/* Board ID */ 0 ,/* Address of kernel args. Set by integratorcp_init. */ 0 /* Kernel entry point. Set by integratorcp_init. */ };
@@ -301,8 +301,7 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info) }else { initrd_size =0 ; } - bootloader[1 ] |= info->board_id &0xff ; - bootloader[2 ] |= (info->board_id >>8 ) &0xff ; + bootloader[4 ] = info->board_id; bootloader[5 ] = info->loader_start +KERNEL_ARGS_ADDR ; bootloader[6 ] = entry;for (n =0 ; n <sizeof (bootloader) /4 ; n++) {
Signature · 1 line
1.7.5.4
PATCH v13 5/6 arm: store the config_base_register during cpu_reset
In reply to Mark LangsdorfLong term, the config_base_register will be a QDM parameter. In the meantime, models that use it need to be able to preserve it across cpu_reset() calls.
---
Changes from v1-v12
Skipped
target-arm/helper.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
target-arm/helper.c +7 -0
@@ -255,6 +255,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)void cpu_reset (CPUARMState *env) {uint32_t id; +uint32_t tmp =0 ;if (qemu_loglevel_mask (CPU_LOG_RESET )) {qemu_log ("CPU Reset (CPU %d)\n" , env->cpu_index);
@@ -262,9 +263,15 @@ void cpu_reset(CPUARMState *env) } id = env->cp15.c0_cpuid; +if (env->cp15.c15_config_base_address) { + tmp = env->cp15.c15_config_base_address; + }memset (env,0 , offsetof(CPUARMState , breakpoints));if (id)cpu_reset_model_id (env, id); +if (tmp) { + env->cp15.c15_config_base_address = tmp; + }#if defined (CONFIG_USER_ONLY ) env->uncached_cpsr =ARM_CPU_MODE_USR ;/* For user mode we must enable access to coprocessors */
Signature · 1 line
1.7.5.4
Re: [Qemu-devel] [PATCH v13 5/6] arm: store the config_base_register during cpu_reset
Quoted 27 lines · Mark Langsdorf
Long term, the
config_base_registerwill be a QDM parameter. In the meantime, models that use it need to be able to preserve it acrosscpu_reset()calls.Signed-off-by Mark Langsdorf <[email protected]>---
Changes from v1-v12
Skippedtarget-arm/helper.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)target-arm/helper.c +1
-0@@ -255,6 +255,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) void cpu_reset(CPUARMState *env) { uint32_t id; + uint32_t tmp = 0; if (qemu_loglevel_mask(CPU_LOG_RESET)) { qemu_log("CPU Reset (CPU %d)\n", env->cpu_index);@@ -262,9 +263,15 @@ void cpu_reset(CPUARMState *env) }
target-arm/helper.c void cpu_reset(CPUARMState *env) · line 274
Quoted 10 lines
target-arm/helper.c +6
-0id = env->cp15.c0_cpuid; + if (env->cp15.c15_config_base_address) { + tmp = env->cp15.c15_config_base_address; + } memset(env, 0, offsetof(CPUARMState, breakpoints)); if (id) cpu_reset_model_id(env, id); + if (tmp) { + env->cp15.c15_config_base_address = tmp; + }
I don't think you need either of the conditionals here, you can just save and restore it unconditionally.
-- PMM
PATCH v13 6/6 arm: SoC model for Calxeda Highbank
In reply to Mark LangsdorfFrom: Rob Herring <[email protected]>
Adds support for Calxeda's Highbank SoC.
---
Changes from v12
Reverted board_id to -1. Added comments clarifying why this is legal.
Changes from v11
Provided a meaningful board ID
Added comments on the way the device tree memory values interact with
qemu command line arguments for memory
Changes from v10
Added secondary core boot functions
Changes from v9
Made typedef struct names in CamelCase
Changes from v7, v8
None
Changes from v3, v4, v5, v6
Skipped
Changes from v2
Created a reset function for highbank_regs
Handled creation of regs i/o memory region in a sensible manner Added code to boot secondary CPUs properly
Changes from v1
Restructed the loading of sysram.bin and made it more clearly optional Made the regs structure into a proper qdev/sysbus object Removed some unnecessary include files
Clarified the GPL version
Simplified the reset function
Removed the automatic detection and resetting of ram_size. Added a guard for xgmac creation
Added a fuller description in the QEMUMachine .desc field
Makefile.target | 1 + hw/highbank.c | 331 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 332 insertions(+), 0 deletions(-) create mode 100644 hw/highbank.c
Makefile.target +1 -0
@@ -342,6 +342,7 @@ obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += arm_l2x0.o obj-arm-y += arm_mptimer.o obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o +obj-arm-y += highbank.o obj-arm-y += pl061.o obj-arm-y += xgmac.o obj-arm-y += arm-semi.o
hw/highbank.c new file +331 -0
331 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Re: [Qemu-devel] [PATCH v13 6/6] arm: SoC model for Calxeda Highbank
Quoted 5 lines · Mark Langsdorf
+ /* highbank requires a dtb in order to boot, and the dtb will override
+ * the board ID. The following value is ignored, so set it to -1 to be
+ * clear that the value is meaningless.
+ */
+ highbank_binfo.board_id = 0;
Code disagrees with comment :-)
hw/highbank.c line 324
Quoted 8 lines
hw/highbank.c new file +8
-0+static QEMUMachine highbank_machine = { + .name = "highbank", + .desc = "Calxeda Highbank (ECX-1000)", + .init = highbank_init, + .use_scsi = 1, + .max_cpus = 4, + .no_vga = 1, +};
Unfortunately commit a369da5f3 just landed on master and this doesn't compile any more. I think you should be able to just drop the ".no_vga = 1" line.
Otherwise OK.
-- PMM
v14 cover arm: add support for Calxeda Highbank
In reply to Mark LangsdorfThis patch series adds support for the Calxeda Highbank SoC.
Makefile.target | 2 + hw/arm-misc.h | 17 ++ hw/arm_boot.c | 65 ++++++-- hw/highbank.c | 330 ++++++++++++++++++++++++++++++++++++++++ hw/ide/ahci.c | 44 ++++++ hw/xgmac.c | 421 +++++++++++++++++++++++++++++++++++++++++++++++++++ target-arm/helper.c | 3 + 7 files changed, 865 insertions(+), 17 deletions(-)
PATCH v14 1/6 Add xgmac ethernet model
From: Rob Herring <[email protected]>
This adds very basic support for the xgmac ethernet core. Missing things include:
- statistics counters
- WoL support
- rx checksum offload
- chained descriptors (only linear descriptor ring)
- broadcast and multicast handling
---
Changes from v10-v13
None
Changes from v9
Make typedef struct names into CamelCase
Changes from v7, v8
None
Changes from v6
Skipped
Changes from v5
removed c_phyaddr
Changes from v4
None
Changes from v3
Added debug macro and cleaned up some debug code Refitted all lines to fit within 80 columns
Changes from v2
None
Changes from v1
Reformated most lines to fit within 80 columns Removed a bunch of unused variables in the state structures Got rid of some camelcase structure names
Makefile.target | 1 + hw/xgmac.c | 421 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 422 insertions(+), 0 deletions(-) create mode 100644 hw/xgmac.c
Makefile.target +1 -0
@@ -339,6 +339,7 @@ obj-arm-y += arm_l2x0.o obj-arm-y += arm_mptimer.o obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o obj-arm-y += pl061.o +obj-arm-y += xgmac.o obj-arm-y += arm-semi.o obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
hw/xgmac.c new file +421 -0
421 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v14 2/6 ahci: add support for non-PCI based controllers
In reply to Mark LangsdorfFrom: Rob Herring <[email protected]>
Add support for ahci on sysbus.
---
Changes from v10-v13
None
Changes from v9
Changed typedef struct names to CamelCase
Changes from v7, v8
None
Changes from v5, v6
Skipped
Changes from v4
replaced all references to Plat|plat_ with sysbus_ made the number of ports into a qdev property added dummy migration support
Changes from v3
Renamed plat-ahci to sysbus-ahci
Changes from v1, v2
Corrected indentation of PlatAHCIState members Made plat_ahci_info into a single structure, not a list
hw/ide/ahci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-)
hw/ide/ahci.c +44 -0
@@ -25,6 +25,7 @@#include <hw/msi.h> #include <hw/pc.h> #include <hw/pci.h> +#include <hw/sysbus.h> #include "monitor.h" #include "dma.h"
@@ -1214,3 +1215,46 @@ void ahci_reset(void *opaque)ahci_reset_port (&d->ahci, i); } } + +typedef struct SysbusAHCIState { +SysBusDevice busdev; +AHCIState ahci; +uint32_t num_ports; +}SysbusAHCIState ; + +static const VMStateDescription vmstate_sysbus_ahci = { + .name ="sysbus-ahci" , + .unmigratable =1 , +}; + +static int sysbus_ahci_init (SysBusDevice *dev) +{ +SysbusAHCIState *s =FROM_SYSBUS (SysbusAHCIState, dev); +ahci_init (&s->ahci, &dev->qdev, s->num_ports); + +sysbus_init_mmio (dev, &s->ahci.mem); +sysbus_init_irq (dev, &s->ahci.irq); + +qemu_register_reset (ahci_reset, &s->ahci); +return 0 ; +} + +static SysBusDeviceInfo sysbus_ahci_info = { + .qdev.name ="sysbus-ahci" , + .qdev.size =sizeof (SysbusAHCIState), + .qdev.vmsd = &vmstate_sysbus_ahci, + .qdev.props = (Property []) { +DEFINE_PROP_UINT32 ("num-ports" , SysbusAHCIState, num_ports,1 ), +DEFINE_PROP_END_OF_LIST (), + }, + .init = sysbus_ahci_init, + + +}; + +static void sysbus_ahci_register (void ) +{ +sysbus_register_withprop (&sysbus_ahci_info); +} + +device_init (sysbus_ahci_register);
Signature · 1 line
1.7.5.4
PATCH v14 3/6 arm: add secondary cpu boot callbacks to arm_boot.c
In reply to Mark LangsdorfCreate two functions, write_secondary_boot() and secondary_cpu_reset_hook(), to allow platforms more control of how secondary CPUs are brought up. The new functions default to NULL and aren't called unless they are populated so there are no changes to existing platform models.
---
Changes from v12, v13
None
Changes from v11
Corrected typo in subject
expanded and corrected some documentation
moved the default_ functions nearer to smpboot array
Changes from v2-v10
Skipped
Changes from v1
Added default versions of the functions
Created checks so that NULL function entries became default versions Simplified calls to the secondary boot functions
Added comments on the use of these functions
hw/arm-misc.h | 17 +++++++++++++++++ hw/arm_boot.c | 54 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 60 insertions(+), 11 deletions(-)
hw/arm-misc.h +17 -0
@@ -30,12 +30,29 @@ struct arm_boot_info {const char *kernel_cmdline;const char *initrd_filename;target_phys_addr_t loader_start; +/* multicore boards that use the default secondary core boot functions +* need to put the address of the secondary boot code, the boot reg, +* and the GIC address in the next 3 values, respectively. boards that +* have their own boot functions can use these values as they want. +*/ target_phys_addr_t smp_loader_start;target_phys_addr_t smp_bootreg_addr;target_phys_addr_t smp_priv_base;int nb_cpus;int board_id;int (*atag_board)(const struct arm_boot_info *info,void *p); +/* multicore boards that use the default secondary core boot functions +* can ignore these two function calls. If the default functions won't +* work, then write_secondary_boot() should write a suitable blob of +* code mimicing the secondary CPU startup process used by the board's +* boot loader/boot ROM code, and secondary_cpu_reset_hook() should +* perform any necessary CPU reset handling and set the PC for thei +* secondary CPUs to point at this boot blob. +*/ +void (*write_secondary_boot)(CPUState *env, +const struct arm_boot_info *info); +void (*secondary_cpu_reset_hook)(CPUState *env, +const struct arm_boot_info *info);/* Used internally by arm_boot.c */ int is_linux;target_phys_addr_t initrd_size;
hw/arm_boot.c +43 -11
84 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v14 4/6 arm_boot: support board IDs more than 16 bits wide
In reply to Mark LangsdorfFrom: Peter Maydell <[email protected]>
Support passing a board ID value to the kernel in r1 that is more than 16 bits wide. This is needed to pass the '-1 == invalid' value for boards which only support device tree booting.
---
Changes from v13
None
Changes from v1-v12
Skipped
hw/arm_boot.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
hw/arm_boot.c +5 -6
@@ -20,10 +20,10 @@/* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */ static uint32_t bootloader[] = {0xe3a00000 ,/* mov r0, #0 */ -0xe3a01000 ,/* mov r1, #0x?? */ -0xe3811c00 ,/* orr r1, r1, #0x??00 */ -0xe59f2000 ,/* ldr r2, [pc, #0] */ -0xe59ff000 ,/* ldr pc, [pc, #0] */ +0xe59f1004 ,/* ldr r1, [pc, #4] */ +0xe59f2004 ,/* ldr r2, [pc, #4] */ +0xe59ff004 ,/* ldr pc, [pc, #4] */ +0 ,/* Board ID */ 0 ,/* Address of kernel args. Set by integratorcp_init. */ 0 /* Kernel entry point. Set by integratorcp_init. */ };
@@ -301,8 +301,7 @@ void arm_load_kernel(CPUState *env, struct arm_boot_info *info) }else { initrd_size =0 ; } - bootloader[1 ] |= info->board_id &0xff ; - bootloader[2 ] |= (info->board_id >>8 ) &0xff ; + bootloader[4 ] = info->board_id; bootloader[5 ] = info->loader_start +KERNEL_ARGS_ADDR ; bootloader[6 ] = entry;for (n =0 ; n <sizeof (bootloader) /4 ; n++) {
Signature · 1 line
1.7.5.4
PATCH v14 5/6 arm: store the config_base_register during cpu_reset
In reply to Mark LangsdorfLong term, the config_base_register will be a QDM parameter. In the meantime, models that use it need to be able to preserve it across cpu_reset() calls.
---
Changes from v13
Make save/restore unconditional
Changes from v1-v12
Skipped
target-arm/helper.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
target-arm/helper.c +3 -0
@@ -255,6 +255,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)void cpu_reset (CPUARMState *env) {uint32_t id; +uint32_t tmp =0 ;if (qemu_loglevel_mask (CPU_LOG_RESET )) {qemu_log ("CPU Reset (CPU %d)\n" , env->cpu_index);
@@ -262,9 +263,11 @@ void cpu_reset(CPUARMState *env) } id = env->cp15.c0_cpuid; + tmp = env->cp15.c15_config_base_address;memset (env,0 , offsetof(CPUARMState , breakpoints));if (id)cpu_reset_model_id (env, id); + env->cp15.c15_config_base_address = tmp;#if defined (CONFIG_USER_ONLY ) env->uncached_cpsr =ARM_CPU_MODE_USR ;/* For user mode we must enable access to coprocessors */
Signature · 1 line
1.7.5.4
Re: [Qemu-devel] [PATCH v14 5/6] arm: store the config_base_register during cpu_reset
Quoted 5 lines · Mark Langsdorf
Long term, the
config_base_registerwill be a QDM parameter. In the meantime, models that use it need to be able to preserve it acrosscpu_reset()calls.Signed-off-by Mark Langsdorf <[email protected]>
-- PMM
PATCH v14 6/6 arm: SoC model for Calxeda Highbank
In reply to Mark LangsdorfFrom: Rob Herring <[email protected]>
Adds support for Calxeda's Highbank SoC.
---
Changes from v13
Removed no_vga parameter
Really reverted board_id to -1
Changes from v12
Reverted board_id to -1. Added comments clarifying why this is legal.
Changes from v11
Provided a meaningful board ID
Added comments on the way the device tree memory values interact with
qemu command line arguments for memory
Changes from v10
Added secondary core boot functions
Changes from v9
Made typedef struct names in CamelCase
Changes from v7, v8
None
Changes from v3, v4, v5, v6
Skipped
Changes from v2
Created a reset function for highbank_regs
Handled creation of regs i/o memory region in a sensible manner Added code to boot secondary CPUs properly
Changes from v1
Restructed the loading of sysram.bin and made it more clearly optional Made the regs structure into a proper qdev/sysbus object Removed some unnecessary include files
Clarified the GPL version
Simplified the reset function
Removed the automatic detection and resetting of ram_size. Added a guard for xgmac creation
Added a fuller description in the QEMUMachine .desc field
Makefile.target | 1 + hw/highbank.c | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 331 insertions(+), 0 deletions(-) create mode 100644 hw/highbank.c
Makefile.target +1 -0
@@ -338,6 +338,7 @@ obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += arm_l2x0.o obj-arm-y += arm_mptimer.o obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o +obj-arm-y += highbank.o obj-arm-y += pl061.o obj-arm-y += xgmac.o obj-arm-y += arm-semi.o
hw/highbank.c new file +330 -0
330 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Re: [Qemu-devel] [PATCH v14 6/6] arm: SoC model for Calxeda Highbank
Quoted 6 lines · Mark Langsdorf
From: Rob Herring <[email protected]>
Adds support for Calxeda's Highbank SoC.
Signed-off-by Rob Herring <[email protected]>Signed-off-by Mark Langsdorf <[email protected]>
...and we're done! I've pulled these patches into my target-arm.next and arm-devs.next trees as appropriate.
-- PMM