Statistics
| Branch: | Revision:

root / hw / arm_gic.c @ 16fd921b

History | View | Annotate | Download (21.3 kB)

# Date Author Comment
e0a3dc7c 06/26/2012 11:09 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    tci: Support INDEX_op_bswap64_i64
    target-i386: Use QEMU instead of Qemu
    Makefile.hw: avoid overly large 'make clean' rm command
    configure: Fix typo
    arm_gic: Send dbg msgs to stderr not stdout...
5eb98401 06/22/2012 11:41 am Peter A. G. Crosthwaite

arm_gic: Send dbg msgs to stderr not stdout

Signed-off-by: Peter A. G. Crosthwaite <>
Signed-off-by: Stefan Hajnoczi <>

acd68428 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Remove NVIC ifdefs from gic_state struct

Remove some NVIC ifdefs from the gic_state struct and its
state save/load functions. This means there are some fields
in it which are present for the NVIC but not used, but means
it always has the same layout and can be pulled out into a...

c48c6522 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Remove the special casing of NCPU for the NVIC

Drop the special casing of NCPU=1 for the NVIC. This slightly
increases the amount of memory used by its state structure,
but removes some ifdeffery and means we can safely move the
GIC state into a common subclass structure....

b3387ede 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Move NVIC specific reset to armv7m_nvic_reset

Move the NVIC specific bits of reset to the NVIC's own
reset function, rather than using ifdefs in the common
arm_gic reset.

Signed-off-by: Peter Maydell <>

2a29ddee 06/19/2012 04:24 pm Peter Maydell

hw/armv7m_nvic: Use MemoryRegions for NVIC specific registers

Implement the NVIC specific register areas using a set of
overlaid MemoryRegions in a container, rather than by having
the arm_gic read/write functions use special purpose callbacks.

Signed-off-by: Peter Maydell <>

306a571a 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Add qdev property for GIC revision

GIC behaviour can be different between revision 1 and
2 of the architectural GIC specification; we also have
to handle the legacy 11MPCore GIC, which is different
again in some places. Introduce a qdev property so we...

6b9680bb 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Make CPU target registers RAZ/WI on uniprocessor

The GIC spec says that the CPU target registers should RAZ/WI
for uniprocessor implementations. Implement this, which also
conveniently lets us drop an NVIC ifdef.

Annoyingly, the 11MPCore's GIC is the odd one out, since...

84e4fccb 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic.c: Make NVIC interrupt numbering a runtime setting

Make the minor tweaks to interrupt numbering used by the NVIC
a runtime setting rather than a compile time one, so we can
drop more NVIC ifdefs.

Signed-off-by: Peter Maydell <>

2b518c56 06/19/2012 04:24 pm Peter Maydell

hw/arm_gic: Move CPU interface memory region setup into arm_gic_init

Remove more NVIC ifdefs by moving the code to setup the CPU interface
memory regions into the GIC specific arm_gic_init() function rather
than the gic_init() function. Rename the latter to more closely...

1e8cae4d 06/19/2012 04:24 pm Peter Maydell

hw/armv7m_nvic: Make the NVIC a freestanding class

Rearrange the GIC and NVIC so both are straightforward
subclasses of a common class, rather than having the NVIC
source file textually include arm_gic.c.

Signed-off-by: Peter Maydell <>

aecff692 04/13/2012 03:29 pm Peter Maydell

hw/arm_gic: Make gic_reset a sysbus reset function

Make gic_reset a sysbus reset function, so we actually
reset the GIC on system reset rather than only at init.
For the NVIC this requires us also to implement reset
of the SysTick.

Signed-off-by: Peter Maydell <>

0d256bdc 04/13/2012 03:29 pm Peter Maydell

hw/arm_gic: Use NVIC instead of LEGACY_INCLUDED_GIC define

Now all the A profile cores have been switched to use the standalone
sysbus GIC, the only remaining code which #includes arm_gic.c is
the v7M NVIC. The coupling is much closer here so it's not so...

b7dc1a59 04/13/2012 03:29 pm Peter Maydell

hw/arm_gic: gic_set_pending_private() is NVIC only

The function gic_set_pending_private() is now used by the NVIC
only (for the GIC we now set PPI interrupts via gpio lines and
gic_set_irq()). So make it #ifdef NVIC and remove the 'attribute
unused' annotation....

c79981ce 04/13/2012 03:29 pm Peter Maydell

hw/arm_gic: Remove stray hardcoded tab

Remove the single instance of a hardcoded tab from hw/arm_gic.c.

Signed-off-by: Peter Maydell <>

386e2955 04/13/2012 02:39 pm Peter Maydell

hw/arm_gic: Move NCPU definition to arm_gic.c

Move the NCPU definition to arm_gic.c: the maximum number
of CPU interfaces is defined by the GIC architecture specification
to be 8, so we don't need to have this #define in each of the
sources files which currently includes arm_gic.c....

926c4aff 04/13/2012 02:39 pm Peter Maydell

hw/arm_gic: Move gic_get_current_cpu into arm_gic.c

Move the gic_get_current_cpu() function into arm_gic.c.
There are only two implementations: (1) "get the index
of the currently executing CPU", used by all multicore
GICs, and (2) "always 0", used by all GICs instantiated...

544d1afa 04/13/2012 02:39 pm Peter Maydell

hw/arm_gic: Expose PPI inputs as gpio inputs

Expose the Private Peripheral Interrupt inputs as GPIO inputs.
The layout of the GPIO array is thus:
[0..N-1] SPIs
[N..N+31] PPIs for CPU 0
[N+32..N+63] PPIs for CPU 1
...

Treating PPIs as being another kind of input line is in line with the...

496dbcd1 04/13/2012 02:39 pm Peter Maydell

hw/arm_gic: Make the GIC its own sysbus device

Compile arm_gic.c as a standalone C file to produce a self contained
sysbus GIC device. Support the legacy usage by #include of the .c file
by making those users #define LEGACY_INCLUDED_GIC, so we can convert...

0e4a398a 03/16/2012 08:09 pm Peter Maydell

ARM: Remove unnecessary subpage workarounds

In the ARM per-CPU peripherals (GIC, private timers, SCU, etc),
remove workarounds for subpage memory region read/write functions
being passed offsets from the start of the page rather than the
start of the region. Following commit 5312bd8b3 the masking off...

69253800 03/02/2012 01:56 pm Rusty Russell

arm: clean up GIC constants

Interrupts numbers 0-31 are private to the processor interface, 32-1019 are
general interrupts. Add GIC_INTERNAL and substitute everywhere.

Signed-off-by: Rusty Russell <>
[Peter Maydell: converted some tabs to spaces]...

41c1e2f5 03/02/2012 01:56 pm Rusty Russell

arm: make sure that number of irqs can be represented in GICD_TYPER.

We currently assume that the number of interrupts (ITLinesNumber in
the architecture reference manual) is divisible by 32, since we
present it to the guest when it reads GICD_TYPER (in gic_dist_readb())...

a32134aa 01/17/2012 12:54 pm Mark Langsdorf

arm: make the number of GIC interrupts configurable

Increase the maximum number of GIC interrupts for a9mp and a11mp to 1020,
and create a configurable property for each defaulting to 96 and 64
(respectively) so that device modelers can set the value appropriately...

b79f2265 01/04/2012 03:41 pm Rob Herring

arm: add dummy gic security registers

Implement handling for the RAZ/WI gic security registers.

Signed-off-by: Rob Herring <>
Signed-off-by: Mark Langsdorf <>
Signed-off-by: Peter Maydell <>

9423a2e8 12/14/2011 03:59 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging

e2c56465 12/12/2011 12:26 pm Peter Maydell

hw/arm_gic: Expose GIC CPU interfaces as sysbus memory regions

Expose the ARM GIC CPU interfaces as memory regions, rather than
just providing read and write functions for them.

Signed-off-by: Peter Maydell <>

66a0a2cb 12/06/2011 11:56 am Dong Xu Wang

fix spelling in hw sub directory

Correct obvious spelling errors in qemu/hw directory.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

217bfb44 12/05/2011 10:38 pm Peter Maydell

hw/arm_gic.c: Ignore attempts to complete nonexistent IRQs

Ignore attempts to complete non-existent IRQs; this fixes a buffer
overrun if the guest writes a bad value to the GICC_EOIR register.
(This case is UNPREDICTABLE so ignoring it is a valid choice.)...

41bf234d 11/06/2011 06:01 pm Rabin Vincent

arm_gic: handle banked enable bits for per-cpu interrupts

The first enable set/clear register (which controls the PPIs and SGIs)
is supposed to be banked for each processor. Currently it is just
handled globally and this prevents recent SMP Linux kernels from...

c2e2343e 10/21/2011 06:19 pm Dmitry Koshelev

hw/arm_gic.c: Fix save/load of irq_target array

irq_target array saving/loading is in the wrong loop.
Version bump.

Signed-off-by: Dmitry Koshelev <>
Acked-by: Andreas Färber <>
Signed-off-by: Andrzej Zaborowski <>

755c0802 08/22/2011 06:20 pm Avi Kivity

arm_gic: convert to memory API

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

8e31bf38 07/23/2011 07:26 pm Matthew Fernandez

Correct spelling of licensed

Correct typos of "licenced" to "licensed".

Reviewed-by: Stefan Weil <>
Reviewed-by: Andreas F=E4rber <>
Signed-off-by: Matthew Fernandez <>
Signed-off-by: Anthony Liguori <>

fa250144 03/07/2011 12:37 am Adam Lackorzynski

target-arm: Fix soft interrupt in GIC distributor

Fix selection of target list filter mode.

Signed-off-by: Adam Lackorzynski <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

2507c12a 12/11/2010 05:24 pm Alexander Graf

Add endianness as io mem parameter

As stated before, devices can be little, big or native endian. The
target endianness is not of their concern, so we need to push things
down a level.

This patch adds a parameter to cpu_register_io_memory that allows a
device to choose its endianness. For now, all devices simply choose...

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

Signed-off-by: Alex Williamson <>...

f7c70325 11/19/2009 06:45 pm Paul Brook

ARM PBX-A9 board support

Implement ARM RealView PBX-A9 board support.

Signed-off-by: Paul Brook <>

c988bfad 11/13/2009 06:31 am Paul Brook

ARM MPCore tweaks

Allow the user to specify the number of cores present on the
RealView EB + ARM11MPCore board. Also split into its own config
rather than guessing from the CPU name.

Signed-off-by: Paul Brook <>

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

1eed09cb 06/16/2009 11:18 pm Avi Kivity

Remove io_index argument from cpu_register_io_memory()

The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty). Remove the parameter to reduce
the API's power, thus facilitating future change.

Signed-off-by: Avi Kivity <>...

067a3ddc 05/26/2009 04:56 pm Paul Brook

Remove qdev irq sink handling

We have both IRQ sinks and GPIO inputs. These are in principle exactly
the same thing, so remove the former.

Signed-off-by: Paul Brook <>

fe7e8758 05/15/2009 12:35 am Paul Brook

ARM GIC qdev conversion

Signed-off-by: Paul Brook <>

001faf32 05/13/2009 08:53 pm Blue Swirl

Replace gcc variadic macro extension with C99 version

Signed-off-by: Blue Swirl <>

2ac71179 05/08/2009 04:35 am Paul Brook

Replace cpu_abort with hw_error

Signed-off-by: Paul Brook <>

a45db6c6 03/07/2009 11:47 pm aurel32

arm: Fix gic_irq_state.level bitfield type

Found while cleaning up compiler warnings: GIC_*_LEVEL macros strongly
suggest that gic_irq_state.level is intended to be per-CPU and not just
a single, global bit. I'm unable to test the effect, but it seems to be...

487414f1 02/06/2009 12:06 am aliguori

hw: remove error handling from qemu_malloc() callers (Avi Kivity)

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162

8da3ff18 12/01/2008 08:59 pm pbrook

Change MMIO callbacks to use offsets, not absolute addresses.

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162

23e39294 07/02/2008 07:48 pm pbrook

Save/restore for stellaris boards.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4824 c046a42c-6fe2-441c-8c8c-71466251a162

57d69a91 05/06/2008 05:45 pm balrog

Force correct evaluation order in a a == b != c condition.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4358 c046a42c-6fe2-441c-8c8c-71466251a162

e57ec016 11/24/2007 05:09 am pbrook

ARMv7-M SysTick fix.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3727 c046a42c-6fe2-441c-8c8c-71466251a162

9ee6e8bb 11/11/2007 02:04 am pbrook

ARMv7 support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3572 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

bea6030d 08/26/2007 08:50 pm ths

arm_gic.c error message fix, by Adam Lackorzynski.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3153 c046a42c-6fe2-441c-8c8c-71466251a162

187337f8 06/03/2007 06:19 pm pbrook

Fix off-by-one memory region sizes.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2931 c046a42c-6fe2-441c-8c8c-71466251a162

d537cf6c 04/07/2007 09:14 pm pbrook

Unify IRQ handling.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162

df628ff1 01/02/2007 09:33 pm pbrook

Arm GIC stuck interrupt fix.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2286 c046a42c-6fe2-441c-8c8c-71466251a162

326199c2 10/01/2006 04:03 pm pbrook

ARM GIC bug.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2187 c046a42c-6fe2-441c-8c8c-71466251a162

e69954b9 09/23/2006 08:40 pm pbrook

Add ARM RealView Emulation Baseboard.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2164 c046a42c-6fe2-441c-8c8c-71466251a162