arm-devs queue
This is a pullreq for accumulated arm-devs patches; please pull.
NB: over the Christmas break my usual workflow got a bit disrupted so I might have missed some patches; if there's anything that you were expecting to be in here but isn't, please ping, resubmit the patch, etc.
-- PMM
The following changes since commit f3c6a169a39d188e98c17a0a0ebfa7f85e5aafdd:
Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into staging (2012-01-03 14:39:05 -0600)
are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.git arm-devs.for-upstream
Juha Riihimäki (3):
hw/omap1.c: Separate PWL from omap_mpu_state hw/omap1.c: Separate PWT from omap_mpu_state hw/omap1.c: Separate dpll_ctl from omap_mpu_state
Mark Langsdorf (1):
arm: Set frequencies for arm_timer
Peter Maydell (5):
hw/pl181.c: Add save/load support
hw/pl110.c: Add post-load hook to invalidate display hw/omap1.c: omap_mpuio_init() need not be public hw/omap1.c: Drop unused includes
hw/omap_gpmc: Fix region map/unmap when configuring prefetch engine
Rob Herring (3):
arm: add missing scu registers
arm: add dummy gic security registers
add L2x0/PL310 cache controller device
Makefile.target | 1 + hw/a9mpcore.c | 36 ++++++++++- hw/arm_gic.c | 6 ++ hw/arm_l2x0.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/arm_timer.c | 24 ++++++-- hw/omap.h | 28 +-------- hw/omap1.c | 151 +++++++++++++++++++++++++++------------------- hw/omap_gpmc.c | 30 +++++++--- hw/pl110.c | 11 ++++ hw/pl181.c | 49 ++++++++++++--- 10 files changed, 404 insertions(+), 113 deletions(-) create mode 100644 hw/arm_l2x0.c
PATCH 1/12 hw/pl181.c: Add save/load support
Add save/load support to the PL181.
--- hw/pl181.c | 49 ++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 40 insertions(+), 9 deletions(-)
hw/pl181.c +40 -9
@@ -38,20 +38,45 @@ typedef struct {uint32_t datacnt;uint32_t status;uint32_t mask[2 ]; -int fifo_pos; -int fifo_len; +int32_t fifo_pos; +int32_t fifo_len;/* The linux 2.6.21 driver is buggy, and misbehaves if new data arrives while it is reading the FIFO. We hack around this be defering subsequent transfers until after the driver polls the status word. http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=4446/1 */ -int linux_hack; +int32_t linux_hack;uint32_t fifo[PL181_FIFO_LEN ];qemu_irq irq[2 ];/* GPIO outputs for 'card is readonly' and 'card inserted' */ qemu_irq cardstatus[2 ]; } pl181_state; +static const VMStateDescription vmstate_pl181 = { + .name ="pl181" , + .version_id =1 , + .minimum_version_id =1 , + .fields = (VMStateField []) { +VMSTATE_UINT32 (clock, pl181_state), +VMSTATE_UINT32 (power, pl181_state), +VMSTATE_UINT32 (cmdarg, pl181_state), +VMSTATE_UINT32 (cmd, pl181_state), +VMSTATE_UINT32 (datatimer, pl181_state), +VMSTATE_UINT32 (datalength, pl181_state), +VMSTATE_UINT32 (respcmd, pl181_state), +VMSTATE_UINT32_ARRAY (response, pl181_state,4 ), +VMSTATE_UINT32 (datactrl, pl181_state), +VMSTATE_UINT32 (datacnt, pl181_state), +VMSTATE_UINT32 (status, pl181_state), +VMSTATE_UINT32_ARRAY (mask, pl181_state,2 ), +VMSTATE_INT32 (fifo_pos, pl181_state), +VMSTATE_INT32 (fifo_len, pl181_state), +VMSTATE_INT32 (linux_hack, pl181_state), +VMSTATE_UINT32_ARRAY (fifo, pl181_state,PL181_FIFO_LEN ), +VMSTATE_END_OF_LIST () + } +}; +#define PL181_CMD_INDEX 0x3f#define PL181_CMD_RESPONSE (1 << 6)#define PL181_CMD_LONGRESP (1 << 7)
@@ -420,9 +445,9 @@ static const MemoryRegionOps pl181_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static void pl181_reset (void *opaque) +static void pl181_reset (DeviceState *d) { -pl181_state *s = (pl181_state *)opaque; +pl181_state *s =DO_UPCAST (pl181_state, busdev.qdev, d); s->power =0 ; s->cmdarg =0 ;
@@ -459,15 +484,21 @@ static int pl181_init(SysBusDevice *dev)qdev_init_gpio_out (&s->busdev.qdev, s->cardstatus,2 ); dinfo =drive_get_next (IF_SD ); s->card =sd_init (dinfo ? dinfo->bdrv :NULL ,0 ); -qemu_register_reset (pl181_reset, s); -pl181_reset (s); -/* ??? Save/restore. */ return 0 ; } +static SysBusDeviceInfo pl181_info = { + .init = pl181_init, + .qdev.name ="pl181" , + .qdev.size =sizeof (pl181_state), + .qdev.vmsd = &vmstate_pl181, + .qdev.reset = pl181_reset, + .qdev.no_user =1 , +}; +static void pl181_register_devices (void ) { -sysbus_register_dev ("pl181" ,sizeof (pl181_state), pl181_init); +sysbus_register_withprop (&pl181_info); }device_init (pl181_register_devices)
Signature · 1 line
1.7.1
PATCH 2/12 hw/pl110.c: Add post-load hook to invalidate display
In reply to Peter MaydellAdd a post-load hook which invalidates the display. In particular, if we don't do this and the display size we've just reloaded is larger than the default then we will segfault trying to read off the end of the buffer.
--- hw/pl110.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
hw/pl110.c +11 -0
@@ -60,10 +60,13 @@ typedef struct {qemu_irq irq; } pl110_state; +static int vmstate_pl110_post_load (void *opaque,int version_id); +static const VMStateDescription vmstate_pl110 = { .name ="pl110" , .version_id =2 , .minimum_version_id =1 , + .post_load = vmstate_pl110_post_load, .fields = (VMStateField []) {VMSTATE_INT32 (version, pl110_state),VMSTATE_UINT32_ARRAY (timing, pl110_state,4 ),
@@ -430,6 +433,14 @@ static void pl110_mux_ctrl_set(void *opaque, int line, int level) s->mux_ctrl = level; } +static int vmstate_pl110_post_load (void *opaque,int version_id) +{ +pl110_state *s = opaque; +/* Make sure we redraw, and at the right size */ +pl110_invalidate_display (s); +return 0 ; +} +static int pl110_init (SysBusDevice *dev) {pl110_state *s =FROM_SYSBUS (pl110_state, dev);
Signature · 1 line
1.7.1
PATCH 3/12 hw/omap1.c: omap_mpuio_init() need not be public
In reply to Peter Maydellomap_mpuio_init() is only used and defined in omap1.c, so make it static.
--- hw/omap.h | 4 ---- hw/omap1.c | 2 +- 2 files changed, 1 insertions(+), 5 deletions(-)
hw/omap.h +0 -4
@@ -672,10 +672,6 @@ void omap_uart_reset(struct omap_uart_s *s);void omap_uart_attach (struct omap_uart_s *s,CharDriverState *chr);struct omap_mpuio_s ; -struct omap_mpuio_s *omap_mpuio_init (MemoryRegion *system_memory, -target_phys_addr_t base, -qemu_irq kbd_int,qemu_irq gpio_int,qemu_irq wakeup, -omap_clk clk);qemu_irq *omap_mpuio_in_get (struct omap_mpuio_s *s);void omap_mpuio_out_set (struct omap_mpuio_s *s,int line,qemu_irq handler);void omap_mpuio_key (struct omap_mpuio_s *s,int row,int col,int down);
hw/omap1.c +1 -1
@@ -2066,7 +2066,7 @@ static void omap_mpuio_onoff(void *opaque, int line, int on)omap_mpuio_kbd_update (s); } -struct omap_mpuio_s *omap_mpuio_init (MemoryRegion *memory, +static struct omap_mpuio_s *omap_mpuio_init (MemoryRegion *memory,target_phys_addr_t base,qemu_irq kbd_int,qemu_irq gpio_int,qemu_irq wakeup,omap_clk clk)
Signature · 1 line
1.7.1
PATCH 4/12 hw/omap1.c: Separate PWL from omap_mpu_state
In reply to Peter MaydellFrom: Juha Riihimäki <[email protected]>
--- hw/omap.h | 8 +------- hw/omap1.c | 60 ++++++++++++++++++++++++++++++++++++------------------------ 2 files changed, 37 insertions(+), 31 deletions(-)
hw/omap.h +1 -7
@@ -829,7 +829,6 @@ struct omap_mpu_state_s {MemoryRegion tcmi_iomem;MemoryRegion clkm_iomem;MemoryRegion clkdsp_iomem; -MemoryRegion pwl_iomem;MemoryRegion pwt_iomem;MemoryRegion mpui_io_iomem;MemoryRegion tap_iomem;
@@ -867,12 +866,7 @@ struct omap_mpu_state_s {struct omap_uwire_s *microwire; -struct { -uint8_t output; -uint8_t level; -uint8_t enable; -int clk; - } pwl; +struct omap_pwl_s *pwl;struct {uint8_t frc;
hw/omap1.c +36 -24
130 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 5/12 hw/omap1.c: Separate PWT from omap_mpu_state
In reply to Peter MaydellFrom: Juha Riihimäki <[email protected]>
--- hw/omap.h | 10 +--------- hw/omap1.c | 57 ++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 32 deletions(-)
hw/omap.h +1 -9
@@ -829,7 +829,6 @@ struct omap_mpu_state_s {MemoryRegion tcmi_iomem;MemoryRegion clkm_iomem;MemoryRegion clkdsp_iomem; -MemoryRegion pwt_iomem;MemoryRegion mpui_io_iomem;MemoryRegion tap_iomem;MemoryRegion imif_ram;
@@ -867,14 +866,7 @@ struct omap_mpu_state_s {struct omap_uwire_s *microwire;struct omap_pwl_s *pwl; - -struct { -uint8_t frc; -uint8_t vrc; -uint8_t gcr; -omap_clk clk; - } pwt; - +struct omap_pwt_s *pwt;struct omap_i2c_s *i2c[2 ];struct omap_rtc_s *rtc;
hw/omap1.c +34 -23
125 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 6/12 hw/omap1.c: Separate dpll_ctl from omap_mpu_state
In reply to Peter MaydellFrom: Juha Riihimäki <[email protected]>
--- hw/omap.h | 6 +----- hw/omap1.c | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 15 deletions(-)
hw/omap.h +1 -5
@@ -904,11 +904,7 @@ struct omap_mpu_state_s {uint32_t tcmi_regs[17 ]; -struct dpll_ctl_s { -MemoryRegion iomem; -uint16_t mode; -omap_clk dpll; - } dpll[3 ]; +struct dpll_ctl_s *dpll[3 ];omap_clk clks;struct {
hw/omap1.c +18 -10
@@ -1344,6 +1344,12 @@ static void omap_tcmi_init(MemoryRegion *memory, target_phys_addr_t base, }/* Digital phase-locked loops control */ +struct dpll_ctl_s { +MemoryRegion iomem; +uint16_t mode; +omap_clk dpll; +}; +static uint64_t omap_dpll_read (void *opaque,target_phys_addr_t addr,unsigned size) {
@@ -1409,15 +1415,17 @@ static void omap_dpll_reset(struct dpll_ctl_s *s)omap_clk_setrate (s->dpll,1 ,1 ); } -static void omap_dpll_init (MemoryRegion *memory,struct dpll_ctl_s *s, +static struct dpll_ctl_s *omap_dpll_init (MemoryRegion *memory,target_phys_addr_t base,omap_clk clk) { +struct dpll_ctl_s *s =g_malloc0 (sizeof (*s));memory_region_init_io (&s->iomem, &omap_dpll_ops, s,"omap-dpll" ,0x100 ); s->dpll = clk;omap_dpll_reset (s);memory_region_add_subregion (memory, base, &s->iomem); +return s; }/* MPU Clock/Reset/Power Mode Control */
@@ -3679,9 +3687,9 @@ static void omap1_mpu_reset(void *opaque)omap_mpui_reset (mpu);omap_tipb_bridge_reset (mpu->private_tipb);omap_tipb_bridge_reset (mpu->public_tipb); -omap_dpll_reset (&mpu->dpll[0 ]); -omap_dpll_reset (&mpu->dpll[1 ]); -omap_dpll_reset (&mpu->dpll[2 ]); +omap_dpll_reset (mpu->dpll[0 ]); +omap_dpll_reset (mpu->dpll[1 ]); +omap_dpll_reset (mpu->dpll[2 ]);omap_uart_reset (mpu->uart[0 ]);omap_uart_reset (mpu->uart[1 ]);omap_uart_reset (mpu->uart[2 ]);
@@ -3947,12 +3955,12 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory,"uart3" , serial_hds[0] && serial_hds[1] ? serial_hds[2] : NULL); -omap_dpll_init (system_memory, - &s->dpll[0 ],0xfffecf00 ,omap_findclk (s,"dpll1" )); -omap_dpll_init (system_memory, - &s->dpll[1 ],0xfffed000 ,omap_findclk (s,"dpll2" )); -omap_dpll_init (system_memory, - &s->dpll[2 ],0xfffed100 ,omap_findclk (s,"dpll3" )); + s->dpll[0 ] =omap_dpll_init (system_memory,0xfffecf00 , +omap_findclk (s,"dpll1" )); + s->dpll[1 ] =omap_dpll_init (system_memory,0xfffed000 , +omap_findclk (s,"dpll2" )); + s->dpll[2 ] =omap_dpll_init (system_memory,0xfffed100 , +omap_findclk (s,"dpll3" )); dinfo =drive_get (IF_SD ,0 ,0 );if (!dinfo) {
Signature · 1 line
1.7.1
PATCH 7/12 hw/omap1.c: Drop unused includes
In reply to Peter MaydellDrop includes of qemu-timer.h, qemu-char.h and pc.h as they are no longer needed.
--- hw/omap1.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
hw/omap1.c +0 -4
@@ -20,11 +20,7 @@#include "arm-misc.h" #include "omap.h" #include "sysemu.h" -#include "qemu-timer.h" -#include "qemu-char.h" #include "soc_dma.h" -/* We use pc-style serial ports. */ -#include "pc.h" #include "blockdev.h" #include "range.h" #include "sysbus.h"
Signature · 1 line
1.7.1
PATCH 8/12 hw/omap_gpmc: Fix region map/unmap when configuring prefetch engine
In reply to Peter MaydellWhen configuring the prefetch engine (and also when resetting from a state where the prefetch engine was enabled) be careful to adhere to the "unmap/change config fields/map" ordering, to avoid trying to delete the wrong MemoryRegions. This fixes an assertion failure in some cases.
--- hw/omap_gpmc.c | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-)
hw/omap_gpmc.c +21 -9
@@ -443,6 +443,12 @@ void omap_gpmc_reset(struct omap_gpmc_s *s) s->irqst =0 ; s->irqen =0 ;omap_gpmc_int_update (s); +for (i =0 ; i <8 ; i++) { +/* This has to happen before we change any of the config +* used to determine which memory regions are mapped or unmapped. +*/ +omap_gpmc_cs_unmap (s, i); + } s->timeout =0 ; s->config =0xa00 ; s->prefetch.config1 =0x00004000 ;
@@ -451,7 +457,6 @@ void omap_gpmc_reset(struct omap_gpmc_s *s) s->prefetch.fifopointer =0 ; s->prefetch.count =0 ;for (i =0 ; i <8 ; i ++) { -omap_gpmc_cs_unmap (s, i); s->cs_file[i].config[1 ] =0x101001 ; s->cs_file[i].config[2 ] =0x020201 ; s->cs_file[i].config[3 ] =0x10031003 ;
@@ -716,24 +721,31 @@ static void omap_gpmc_write(void *opaque, target_phys_addr_t addr,case 0x1e0 :/* GPMC_PREFETCH_CONFIG1 */ if (!s->prefetch.startengine) { -uint32_t oldconfig1 = s->prefetch.config1; +uint32_t newconfig1 = value &0x7f8f7fbf ;uint32_t changed; - s->prefetch.config1 = value &0x7f8f7fbf ; - changed = oldconfig1 ^ s->prefetch.config1; + changed = newconfig1 ^ s->prefetch.config1;if (changed & (0x80 |0x7000000 )) {/* Turning the engine on or off, or mapping it somewhere else. * cs_map() and cs_unmap() check the prefetch config and * overall CSVALID bits, so it is sufficient to unmap-and-map -* both the old cs and the new one. +* both the old cs and the new one. Note that we adhere to +* the "unmap/change config/map" order (and not unmap twice +* if newcs == oldcs), otherwise we'll try to delete the wrong +* memory region. */ -int oldcs =prefetch_cs (oldconfig1); -int newcs =prefetch_cs (s->prefetch.config1); +int oldcs =prefetch_cs (s->prefetch.config1); +int newcs =prefetch_cs (newconfig1);omap_gpmc_cs_unmap (s, oldcs); -omap_gpmc_cs_map (s, oldcs); -if (newcs != oldcs) { +if (oldcs != newcs) {omap_gpmc_cs_unmap (s, newcs); + } + s->prefetch.config1 = newconfig1; +omap_gpmc_cs_map (s, oldcs); +if (oldcs != newcs) {omap_gpmc_cs_map (s, newcs); } + }else { + s->prefetch.config1 = newconfig1; } }break ;
Signature · 1 line
1.7.1
PATCH 9/12 arm: add missing scu registers
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
Add power control register to a9mpcore
--- hw/a9mpcore.c | 36 +++++++++++++++++++++++++++++++++--- 1 files changed, 33 insertions(+), 3 deletions(-)
hw/a9mpcore.c +33 -3
@@ -29,6 +29,7 @@ gic_get_current_cpu(void) typedef struct a9mp_priv_state { gic_state gic; uint32_t scu_control; + uint32_t scu_status; uint32_t old_timer_status[8]; uint32_t num_cpu; qemu_irq *timer_irq;
@@ -48,7 +49,13 @@ static uint64_t a9_scu_read(void *opaque, target_phys_addr_t offset,case 0x04 :/* Configuration */ return (((1 << s->num_cpu) -1 ) <<4 ) | (s->num_cpu -1 );case 0x08 :/* CPU Power Status */ -return 0 ; +return s->scu_status; +case 0x09 :/* CPU status. */ +return s->scu_status >>8 ; +case 0x0a :/* CPU status. */ +return s->scu_status >>16 ; +case 0x0b :/* CPU status. */ +return s->scu_status >>24 ;case 0x0c :/* Invalidate All Registers In Secure State */ return 0 ;case 0x40 :/* Filtering Start Address Register */
@@ -67,12 +74,35 @@ static void a9_scu_write(void *opaque, target_phys_addr_t offset, uint64_t value, unsigned size) {a9mp_priv_state *s = (a9mp_priv_state *)opaque; +uint32_t mask; +uint32_t shift; +switch (size) { +case 1 : + mask =0xff ; +break ; +case 2 : + mask =0xffff ; +break ; +case 4 : + mask =0xffffffff ; +break ; +default : +fprintf (stderr,"Invalid size %u in write to a9 scu register %x\n" , + size, offset); +return ; + } +switch (offset) {case 0x00 :/* Control */ s->scu_control = value &1 ;break ;case 0x4 :/* Configuration: RO */ break ; +case 0x08 :case 0x09 :case 0x0A :case 0x0B :/* Power Control */ + shift = (offset -0x8 ) *8 ; + s->scu_status &= ~(mask << shift); + s->scu_status |= ((value & mask) << shift); +break ;case 0x0c :/* Invalidate All Registers In Secure State */ /* no-op as we do not implement caches */ break ;
@@ -80,7 +110,6 @@ static void a9_scu_write(void *opaque, target_phys_addr_t offset,case 0x44 :/* Filtering End Address Register */ /* RAZ/WI, like an implementation with only one AXI master */ break ; -case 0x8 :/* CPU Power Status */ case 0x50 :/* SCU Access Control Register */ case 0x54 :/* SCU Non-secure Access Control Register */ /* unimplemented, fall through */
@@ -169,11 +198,12 @@ static int a9mp_priv_init(SysBusDevice *dev)static const VMStateDescription vmstate_a9mp_priv = { .name ="a9mpcore_priv" , - .version_id =1 , + .version_id =2 , .minimum_version_id =1 , .fields = (VMStateField []) {VMSTATE_UINT32 (scu_control, a9mp_priv_state),VMSTATE_UINT32_ARRAY (old_timer_status, a9mp_priv_state,8 ), +VMSTATE_UINT32_V (scu_status, a9mp_priv_state,2 ),VMSTATE_END_OF_LIST () } };
Signature · 1 line
1.7.1
PATCH 10/12 arm: Set frequencies for arm_timer
In reply to Peter MaydellFrom: Mark Langsdorf <[email protected]>
Use qdev properties to allow board modelers to set the frequencies for the sp804 timer. Each of the sp804's timers can have an individual frequency. The timers default to 1MHz.
--- hw/arm_timer.c | 24 +++++++++++++++++++----- 1 files changed, 19 insertions(+), 5 deletions(-)
hw/arm_timer.c +19 -5
@@ -9,6 +9,8 @@#include "sysbus.h" #include "qemu-timer.h" +#include "qemu-common.h" +#include "qdev.h" /* Common timer implementation. */
@@ -178,6 +180,7 @@ typedef struct {SysBusDevice busdev;MemoryRegion iomem;arm_timer_state *timer[2 ]; +uint32_t freq0, freq1;int level[2 ];qemu_irq irq; } sp804_state;
@@ -269,10 +272,11 @@ static int sp804_init(SysBusDevice *dev) qi =qemu_allocate_irqs (sp804_set_irq, s,2 );sysbus_init_irq (dev, &s->irq); -/* ??? The timers are actually configurable between 32kHz and 1MHz, but -we don't implement that. */ - s->timer[0 ] =arm_timer_init (1000000 ); - s->timer[1 ] =arm_timer_init (1000000 ); +/* The timers are configurable between 32kHz and 1MHz +* defaulting to 1MHz but overrideable as individual properties */ + s->timer[0 ] =arm_timer_init (s->freq0); + s->timer[1 ] =arm_timer_init (s->freq1); + s->timer[0 ]->irq = qi[0 ]; s->timer[1 ]->irq = qi[1 ];memory_region_init_io (&s->iomem, &sp804_ops, s,"sp804" ,0x1000 );
@@ -281,6 +285,16 @@ static int sp804_init(SysBusDevice *dev)return 0 ; } +static SysBusDeviceInfo sp804_info = { + .init = sp804_init, + .qdev.name ="sp804" , + .qdev.size =sizeof (sp804_state), + .qdev.props = (Property []) { +DEFINE_PROP_UINT32 ("freq0" , sp804_state, freq0,1000000 ), +DEFINE_PROP_UINT32 ("freq1" , sp804_state, freq1,1000000 ), +DEFINE_PROP_END_OF_LIST (), + } +};/* Integrator/CP timer module. */
@@ -349,7 +363,7 @@ static int icp_pit_init(SysBusDevice *dev)static void arm_timer_register_devices (void ) {sysbus_register_dev ("integrator_pit" ,sizeof (icp_pit_state), icp_pit_init); -sysbus_register_dev ("sp804" ,sizeof (sp804_state), sp804_init); +sysbus_register_withprop (&sp804_info); }device_init (arm_timer_register_devices)
Signature · 1 line
1.7.1
PATCH 11/12 arm: add dummy gic security registers
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
Implement handling for the RAZ/WI gic security registers.
--- hw/arm_gic.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
hw/arm_gic.c +6 -0
@@ -282,6 +282,10 @@ static uint32_t gic_dist_readb(void *opaque, target_phys_addr_t offset)return ((GIC_NIRQ /32 ) -1 ) | ((NUM_CPU (s) -1 ) <<5 );if (offset <0x08 )return 0 ; +if (offset >=0x80 ) { +/* Interrupt Security , RAZ/WI */ +return 0 ; + }#endif goto bad_reg; }else if (offset <0x200 ) {
@@ -413,6 +417,8 @@ static void gic_dist_writeb(void *opaque, target_phys_addr_t offset,DPRINTF ("Distribution %sabled\n" , s->enabled ?"En" :"Dis" ); }else if (offset <4 ) {/* ignored. */ + }else if (offset >=0x80 ) { +/* Interrupt Security Registers, RAZ/WI */ }else { goto bad_reg; }
Signature · 1 line
1.7.1
PATCH 12/12 add L2x0/PL310 cache controller device
In reply to Peter MaydellFrom: Rob Herring <[email protected]>
This is just a dummy device for ARM L2 cache controllers, based on the pl310. The cache type parameter can be defined by a property value and has a meaningful default.
--- Makefile.target | 1 + hw/arm_l2x0.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+), 0 deletions(-) create mode 100644 hw/arm_l2x0.c
Makefile.target +1 -0
@@ -336,6 +336,7 @@ obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o obj-arm-y += versatile_pci.o 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 += pl061.o
hw/arm_l2x0.c new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
1.7.1
Quoted 7 lines · Peter Maydell
This is a pullreq for accumulated arm-devs patches; please pull.
NB: over the Christmas break my usual workflow got a bit disrupted so I might have missed some patches; if there's anything that you were expecting to be in here but isn't, please ping, resubmit the patch, etc.
-- PMM
Pulled. Thanks.
Regards,
Anthony Liguori
Quoted 44 lines
The following changes since commit
f3c6a169a39d188e98c17a0a0ebfa7f85e5aafdd:Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into staging (2012-01-03 14:39:05 -0600)are available in the git repository at:
git://git.linaro.org/people/pmaydell/qemu-arm.gitarm-devs.for-upstreamJuha Riihimäki (3):
hw/omap1.c: Separate PWL fromomap_mpu_statehw/omap1.c: Separate PWT fromomap_mpu_statehw/omap1.c: Separatedpll_ctlfromomap_mpu_stateMark Langsdorf (1):
arm: Set frequencies forarm_timerPeter Maydell (5):
hw/pl181.c: Add save/load support
hw/pl110.c: Add post-load hook to invalidate displayhw/omap1.c:omap_mpuio_init()need not be publichw/omap1.c: Drop unused includes
hw/omap_gpmc: Fix region map/unmap when configuring prefetch engineRob Herring (3):
arm: add missing scu registers
arm: add dummy gic security registers
add L2x0/PL310 cache controller deviceMakefile.target | 1 + hw/a9mpcore.c | 36 ++++++++++- hw/arm_gic.c | 6 ++ hw/arm_l2x0.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/arm_timer.c | 24 ++++++-- hw/omap.h | 28 +-------- hw/omap1.c | 151 +++++++++++++++++++++++++++------------------- hw/omap_gpmc.c | 30 +++++++--- hw/pl110.c | 11 ++++ hw/pl181.c | 49 ++++++++++++--- 10 files changed, 404 insertions(+), 113 deletions(-)create mode 100644
hw/arm_l2x0.c