Statistics
| Branch: | Revision:

root / target-arm @ 599d64f6

# Date Author Comment
599d64f6 09/10/2012 04:00 pm Stefan Weil

target-arm: Fix potential buffer overflow

Report from smatch:

target-arm/helper.c:651 arm946_prbs_read(6) error:
buffer overflow 'env->cp15.c6_region' 8 <= 8
target-arm/helper.c:661 arm946_prbs_write(6) error:
buffer overflow 'env->cp15.c6_region' 8 <= 8...

396bef4b 08/22/2012 06:47 pm Jim Meyering

arm-semi: don't leak 1KB user string lock buffer upon TARGET_SYS_OPEN

Always call unlock_user before returning.

Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

b90372ad 08/10/2012 04:37 pm Peter Maydell

target-arm: Fix typos in comments

Fix a variety of typos in comments in target-arm files.

Signed-off-by: Peter Maydell <>
Reviewed-by: Peter Crosthwaite <>
Signed-off-by: Stefan Hajnoczi <>

65626741 08/10/2012 04:33 pm Peter A. G. Crosthwaite

arm: translate: comment typo - s/middel/middle/

Signed-off-by: Peter A. G. Crosthwaite <>
Reviewed-by: Andreas Färber <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

de9b05b8 07/12/2012 01:59 pm Peter Maydell

target-arm: Implement privileged-execute-never (PXN)

Implement the privileged-execute-never (PXN) translation table bit.
It is implementation-defined whether this is implemented, so we give
it its own ARM_FEATURE_ flag. LPAE requires PXN, so add also an
LPAE feature flag and the implication logic, as a placeholder...

918f5dca 07/12/2012 01:59 pm Peter Maydell

target-arm: Extend feature flags to 64 bits

Extend feature flags to 64 bits, as we've just run out of space
in the 32 bit integer we were using for them.

Signed-off-by: Peter Maydell <>

7ac681cf 07/12/2012 01:59 pm Peter Maydell

target-arm: Add AMAIR0, AMAIR1 LPAE cp15 registers

Add implementations of the AMAIR0 and AMAIR1 LPAE
Auxiliary Memory Attribute Indirection Registers.
These are implementation defined and we choose to
implement them as RAZ/WI, matching the Cortex-A7
and Cortex-A15....

f9fc619a 07/12/2012 01:59 pm Peter Maydell

target-arm: Add 64 bit variants of DBGDRAR and DBGDSAR for LPAE

LPAE extends the DBGDRAR and DBGDSAR debug registers to 64 bits; we
only implement these as dummy RAZ versions; provide dummies for
the 64 bit accesses as well.

Signed-off-by: Peter Maydell <>

891a2fe7 07/12/2012 01:59 pm Peter Maydell

target-arm: Add 64 bit PAR, TTBR0, TTBR1 for LPAE

Under LPAE, the cp15 registers PAR, TTBR0 and TTBR1 are extended
to 64 bits, with a 64 bit (MRRC/MCRR) access path to read the
full width of the register. Add the state fields for the top
half and the 64 bit access path. Actual use of the top half of...

77a71dd1 07/12/2012 01:59 pm Peter Maydell

target-arm: Use target_phys_addr_t in get_phys_addr()

In the implementation of get_phys_addr(), consistently use
target_phys_addr_t to hold the physical address rather than
uint32_t.

Signed-off-by: Peter Maydell <>

702a9357 07/12/2012 01:59 pm Peter Maydell

target-arm: Implement long-descriptor PAR format

Implement the different format of the PAR when long descriptor
translation tables are in use. Note that we assume that
get_phys_addr() returns a long-descriptor format DFSR value on
failure if long descriptors are in use; this added subtlety tips...

e42c4db3 07/12/2012 01:59 pm Peter Maydell

target-arm: Implement TTBCR changes for LPAE

Implement the changes to the TTBCR register required for LPAE: * many fewer bits should be RAZ/WI * since TTBCR changes can result in a change of ASID, we must
flush the TLB on writes to it

Signed-off-by: Peter Maydell <>

3dde962f 07/12/2012 01:59 pm Peter Maydell

target-arm: Add support for long format translation table walks

Implement the actual table walk code for LPAE's long format
translation tables.

Signed-off-by: Peter Maydell <>

ed336850 07/12/2012 01:59 pm Peter Maydell

target-arm: Fix TCG temp handling in 64 bit cp writes

Fix errors in the TCG temp handling in the 64 bit coprocessor
write path: we were reusing a 32 bit temp after it had been
freed by store_reg(), and failing to free a 64 bit temp.

This bug has no visible effect at this point because there...

3cc0cd61 07/12/2012 01:59 pm Peter Maydell

ARM: Make target_phys_addr_t 64 bits and physaddrs 40 bits

Make target_phys_addr_t 64 bits for ARM targets, and set
TARGET_PHYS_ADDR_SPACE_BITS to 40. This should have no effect for ARM
boards where physical addresses really are 32 bits (except perhaps a...

81a60ada 07/12/2012 01:58 pm Peter Maydell

target-arm: Fix typo that meant TTBR1 accesses went to TTBR0

Fix a copy-and-paste error in the register description for TTBR1
that meant it was a duplicate of TTBR0 rather than affecting the
correct bit of CPU state.

Signed-off-by: Peter Maydell <>

091fd17c 07/12/2012 01:58 pm Peter Maydell

target-arm: Fix some copy-and-paste errors in cp register names

Fix a couple of cases where cp register names were copy-and-pasted.
These are harmless since we don't use the name for anything (except
debugging convenience) but could be confusing.

Signed-off-by: Peter Maydell <>...

2bee5105 07/12/2012 01:58 pm Paul Brook

target-arm: Fix CP15 based WFI

The coprocessor register rework broke cp15 based WFI instructions.
We incorrectly fall through the normal register write case, which
incorrectly adds a forced block termination. We've already done
a special version of this (DISAS_WFI), so return immediately....

b2d06f96 06/20/2012 03:13 pm Peter Maydell

target-arm: Remove ARM_CPUID_* macros

All the uses of ARM_CPUID() to vary behaviour have now been
removed, so we can delete the ARM_CPUID_* macros now.
The one exception is the TI915T/925T, because of its odd behaviour
where the MIDR value can be changed at runtime....

4a9a539f 06/20/2012 03:13 pm Peter Maydell

target-arm: Remove remaining old cp15 infrastructure

There are now no uses of the old cp15 infrastructure,
so it can be deleted.

Signed-off-by: Peter Maydell <>

30b05bba 06/20/2012 03:12 pm Peter Maydell

target-arm: Move block cache ops to new cp15 framework

Move the v6 optional block cache ops to the new cp15 framework.
This includes only providing them on the CPUs which implemented
them, rather than the previous blunderbuss approach of making
all MCRR instructions on all CPUs act as NOPs....

b22af022 06/20/2012 03:11 pm Peter Maydell

target-arm: Remove c0_cachetype CPUARMState field

Remove the no-longer-used CPUARMState c0_cachetype field.
Although this was a constant register we had it in our
migration state. Drop this (with resulting version bump)
because for ARM currently we prefer cleaner migration...

7884849c 06/20/2012 03:11 pm Peter Maydell

target-arm: Convert final ID registers

Convert the final ID registers to the new cp15 scheme.

Signed-off-by: Peter Maydell <>

81bdde9d 06/20/2012 03:10 pm Peter Maydell

target-arm: Convert MPIDR

Convert the MPIDR to the new cp15 register scheme.
This includes giving it its own feature bit rather
than doing a CPUID value check.

Signed-off-by: Peter Maydell <>

776d4e5c 06/20/2012 03:10 pm Peter Maydell

target-arm: Convert cp15 cache ID registers

Convert the cp15 cache ID registers to the new scheme.

Signed-off-by: Peter Maydell <>

8515a092 06/20/2012 03:09 pm Peter Maydell

target-arm: Convert cp15 crn=0 crm={1,2} feature registers

Convert the cp15 crn=0 crm={1,2} features registers to
the new cp reg framework.

Signed-off-by: Peter Maydell <>

2771db27 06/20/2012 03:08 pm Peter Maydell

target-arm: Convert cp15 crn=1 registers

Convert the cp15 crn=1 registers to the new scheme.

Signed-off-by: Peter Maydell <>

34f90529 06/20/2012 03:08 pm Peter Maydell

target-arm: Convert cp15 crn=9 registers

Convert cp15 crn=9 registers (mostly cache lockdown) to the new scheme.

Note that this change makes OMAPCP cores RAZ/WI the whole c9 space. This is
a change from previous behaviour, but a return to the behaviour of commit...

06d76f31 06/20/2012 03:08 pm Peter Maydell

target-arm: Convert cp15 crn=6 registers

Convert the cp15 crn=6 registers to the new scheme.
Note that this includes some minor tidyup: drop an unnecessary
underdecoding of op2 on OMAPCP cores, and only implement the
pre-v6 c6,c0,0,1 IFAR on the 1026 and not on the other ARMv5...

c4804214 06/20/2012 03:07 pm Peter Maydell

target-arm: convert cp15 crn=7 registers

Convert the cp15 crn=7 registers to the new scheme.
Note that to do this we have to distinguish some registers
used on the ARM9 and ARM10 from some which are ARM1176
only. This is because the old code returned a value of 0...

4a501606 06/20/2012 03:07 pm Peter Maydell

target-arm: Convert cp15 VA-PA translation registers

Convert the cp15 VA-PA translation registers (a subset of
the crn=7 regs) to the new scheme.

Signed-off-by: Peter Maydell <>

d929823f 06/20/2012 03:07 pm Peter Maydell

target-arm: Convert cp15 MMU TLB control

Convert cp15 MMU TLB control (crn=8) to new scheme.

Signed-off-by: Peter Maydell <>

1047b9d7 06/20/2012 03:06 pm Peter Maydell

target-arm: Convert cp15 crn=15 registers

Convert the cp15 crn=15 (implementation specific) registers
to the new scheme.

Signed-off-by: Peter Maydell <>

4fdd17dd 06/20/2012 03:06 pm Peter Maydell

target-arm: Convert cp15 crn=10 registers

We RAZ/WI the entire block of crn=10 registers. Note that this
actually covers not just the implementation-defined TLB
lockdown registers but also a number of v7 VMSA memory
attribute registers which we would need to implement to...

08de207b 06/20/2012 03:06 pm Peter Maydell

target-arm: Convert cp15 crn=13 registers

Convert the cp15 crn=13 registers (FCSEIDR, CONTEXTIDR,
and the ARM946 Trace Process Identifier Register).

Signed-off-by: Peter Maydell <>

ecce5c3c 06/20/2012 03:05 pm Peter Maydell

target-arm: Convert cp15 crn=2 registers

Convert the cp15 crn=2 registers (MMU page table control,
MPU cache control) to the new scheme.

Signed-off-by: Peter Maydell <>

18032bec 06/20/2012 03:05 pm Peter Maydell

target-arm: Convert MMU fault status cp15 registers

Convert the MMU fault status and MPU access permission cp15
registers to the new scheme.

Signed-off-by: Peter Maydell <>

c983fe6c 06/20/2012 03:05 pm Peter Maydell

target-arm: Convert cp15 c3 register

Convert the cp15 c3 register (MMU domain access control
or MPU write buffer control). NB that this is horribly
underdecoded for modern cores (should be crn=3,crm=0,
opc1=0,opc2=0) but this change preserves the existing...

6cc7a3ae 06/20/2012 03:05 pm Peter Maydell

target-arm: Convert generic timer cp15 regs

Convert the (dummy) generic timer cp15 implementation.

Signed-off-by: Peter Maydell <>

200ac0ef 06/20/2012 03:05 pm Peter Maydell

target-arm: Convert performance monitor registers

Convert the v7 performance monitor cp15 registers to
the new scheme.

Signed-off-by: Peter Maydell <>

4d31c596 06/20/2012 03:04 pm Peter Maydell

target-arm: Convert TLS registers

Convert TLS registers to the new cp15 framework

Signed-off-by: Peter Maydell <>

7d57f408 06/20/2012 03:04 pm Peter Maydell

target-arm: Convert WFI/barriers special cases to cp_reginfo

Convert the various WFI and barrier instruction special cases to use
cp_reginfo infrastructure.

Signed-off-by: Peter Maydell <>

c326b979 06/20/2012 03:04 pm Peter Maydell

target-arm: Convert TEECR, TEEHBR to new scheme

Convert the THUMB2EE cp14 registers TEECR and TEEHBR to
use arm_cp_reginfo.

Signed-off-by: Peter Maydell <>

e9aa6c21 06/20/2012 03:03 pm Peter Maydell

target-arm: Convert debug registers to cp_reginfo

Convert the cp14 debug registers (DBGDIDR, DBGDRAR, DBGDSAR) to the
cp_reginfo scheme.

Signed-off-by: Peter Maydell <>

2ceb98c0 06/20/2012 03:02 pm Peter Maydell

target-arm: Add register_cp_regs_for_features()

Add new function register_cp_regs_for_features() as a place to
register coprocessor registers dependent on feature flags.

Signed-off-by: Peter Maydell <>

e8070a23 06/20/2012 03:02 pm Peter Maydell

target-arm: Remove old cpu_arm_set_cp_io infrastructure

All the users of cpu_arm_set_cp_io have been converted, so we
can remove it and the infrastructure it used.

Signed-off-by: Peter Maydell <>

4b6a83fb 06/20/2012 03:01 pm Peter Maydell

target-arm: initial coprocessor register framework

Initial infrastructure for data-driven registration of
coprocessor register implementations.

We still fall back to the old-style switch statements pending
complete conversion of all existing registers.
...

200bf596 06/20/2012 03:00 pm Peter Maydell

target-arm: Fix 11MPCore cache type register value

Make the 11MPCore report a valid value in its cache type register
(the previous value appears to have been incorrectly copied from
the 1136/1176). In particular, do not report that we have an
aliasing VIPT cache, because this causes Linux to attempt to use...

fbe37ef3 06/07/2012 10:21 am Paolo Bonzini

build: move other target-*/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

9cdc8df3 06/07/2012 08:19 am Paolo Bonzini

build: move libobj-y variable to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

5e8861a0 06/07/2012 08:17 am Paolo Bonzini

build: move obj-TARGET-y variables to nested Makefile.objs

Also drop duplicate occurrence of device-hotplug.o.

Signed-off-by: Paolo Bonzini <>

b7e516ce 06/05/2012 12:00 am Andreas Färber

Kill off cpu_state_reset()

In commit 1bba0dc932e8826a7d030df3767daf0bc339f9a2 cpu_reset()
was renamed to cpu_state_reset(), to allow introducing a new cpu_reset()
that would operate on QOM objects.

All callers have been updated except for one in target-mips, so drop all...

df90dadb 06/05/2012 12:00 am Andreas Färber

target-arm: Use cpu_reset() in cpu_arm_init()

Commit 3c30dd5a68e9fee6af67cfd0d14ed7520820f36a (target-arm: Move reset
handling to arm_cpu_reset) QOM'ified CPU reset. Complete it by replacing
cpu_state_reset() with cpu_reset().

Signed-off-by: Andreas Färber <>...

ad37ad5b 05/10/2012 03:56 pm Peter Maydell

target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL

The macro definition of cpu_init meant that if cpu_arm_init()
returned NULL this wouldn't result in cpu_init() itself returning
NULL. This had the effect that "-cpu foo" for some unknown CPU
name 'foo' would cause ARM targets to segfault rather than...

7e598de0 05/10/2012 03:56 pm Matt Craighead

target-arm: When setting FPSCR.QC, don't clear other FPSCR bits

This patch fixes a bug affecting a variety of Neon instructions, such as
VQADD.

Signed-off-by: Matt Craighead <>
Signed-off-by: Peter Maydell <>

10962fd5 04/27/2012 02:07 pm Peter Maydell

target-arm: Make SETEND respect bswap_code (BE8) setting

Make the SETEND instruction respect the setting of bswap_code,
so that in BE8 mode we UNDEF for attempts to switch into
little-endian mode and nop for attempts to stay in big-endian
mode. (This is the inverse of the existing handling of SETEND...

c5fad12f 04/27/2012 02:06 pm Peter Maydell

target-arm: Move A9 config_base_address reset value to ARMCPU

Move the A9 config_base_address cp15 register reset value to
ARMCPU. This should become a QOM property so that the Highbank
board can set it without having to pull in cpu-qom.h, but at
least this avoids the implicit dependency on reset ordering...

778c3a06 04/27/2012 02:04 pm Andreas Färber

target-arm: Change cpu_arm_init() return type to ARMCPU

Make cpu_arm_init() return a QOM ARMCPU, so that we don't need to
obtain an ARMCPU through arm_env_get_cpu() in machine init code.
This requires to adjust the inclusion site of cpu-qom.h and in turn,...

3c30dd5a 04/21/2012 09:13 pm Peter Maydell

target-arm: Move reset handling to arm_cpu_reset

Now that cpu_reset_model_id() has gone we can move the
reset code over to the class reset function and have cpu_state_reset
simply do a reset on the CPU QOM object.

Signed-off-by: Peter Maydell <>...

caa1d077 04/21/2012 09:13 pm Peter Maydell

target-arm: Drop cpu_reset_model_id()

cpu_reset_model_id() is now empty and we can remove it.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

85df3786 04/21/2012 09:12 pm Peter Maydell

target-arm: Move cache ID register setup to cpu specific init fns

Move cache ID register reset out of cpu_reset_model_id() by
creating a field for the reset value in ARMCPU and setting it
up in the cpu specific init functions.

Signed-off-by: Peter Maydell <>...

8092d2f0 04/21/2012 09:12 pm Peter Maydell

target-arm: Move OMAP cp15_i_{max,min} reset to cpu_state_reset

Move the OMAP-specific cp15_i_{max,min} reset to cpu_state_reset;
since these registers are only accessible on CPUs with the
OMAPCP feature set there's no need to guard this reset with
either a CPUID or feature bit check....

2e4d7e3e 04/21/2012 09:11 pm Peter Maydell

target-arm: Move feature register setup to per-CPU init fns

Move feature register value setup to per-CPU init functions.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

0cc892fd 04/21/2012 09:11 pm Peter Maydell

target-arm: Move iWMMXT wCID reset to cpu_state_reset

Move the iWMMXT wCID reset to cpu_state_reset(). Since
we use the same value for all CPUs with this feature
(with the major/minor revision fields set to the QEMU
specific 'Q' value) there's no need to create an ARMCPU...

4e851c38 04/21/2012 09:11 pm Peter Maydell

target-arm: Drop JTAG_ID documentation

None of the machines in QEMU offer a JTAG debug interface, so this info
was unused. Further, the PXA250 ID contradicts the February 2002
Developer's Manual, which has it as 0xn9264013 with n the MIDR Revision.

Signed-off-by: Andreas Färber <>...

0ca7e01c 04/21/2012 09:10 pm Peter Maydell

target-arm: Move SCTLR reset value setup to per cpu init fns

Move the reset value of SCTLR to ARMCPU, initialised in
the per-cpu init functions. It can then be reset by a
simple copy, and we can drop the code from cpu_reset_model_id().

Signed-off-by: Peter Maydell <>...

64e1671f 04/21/2012 09:09 pm Peter Maydell

target-arm: Move CTR setup to per cpu init fns

Move CTR (cache type register) value to an ARMCPU field
set up by per-cpu init fns.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

bd35c355 04/21/2012 09:09 pm Peter Maydell

target-arm: Move MVFR* setup to per cpu init fns

Move the MVFR* VFP feature register values to ARMCPU,
so they are set up by the implementation-specific instance
init functions rather than in cpu_reset_model_id().

Signed-off-by: Peter Maydell <>...

325b3cef 04/21/2012 09:08 pm Peter Maydell

target-arm: Move FPSID config to cpu init fns

Move the reset FPSID to the ARMCPU struct, and set it in the
per-implementation instance init function. At reset we then
just copy the reset value into the CPUARMState field.

Signed-off-by: Peter Maydell <>...

581be094 04/21/2012 09:07 pm Peter Maydell

target-arm: Move feature bit settings to CPU init fns

Move the setting of the feature bits from cpu_reset_model_id()
to each CPU's instance init function. This requires us to move
the features field in CPUARMState so that it is not cleared
on reset.

Signed-off-by: Peter Maydell <>...

777dc784 04/21/2012 09:06 pm Peter Maydell

target-arm: Add QOM subclasses for each ARM cpu implementation

Register subclasses for each ARM CPU implementation.

Let arm_cpu_list() enumerate CPU subclasses in alphabetical order,
except for special value "any".

Replace cpu_arm_find_by_name()'s string -> CPUID lookup by storing the...

ce854d7c 04/21/2012 09:04 pm Benoit Canet

target-arm: remind to keep arm features in sync with linux-user/elfload.c

Signed-off-by: Benoit Canet <>
Signed-off-by: Peter Maydell <>

20503968 04/14/2012 05:23 pm Blue Swirl

Use uintptr_t for various op related functions

Use uintptr_t instead of void * or unsigned long in
several op related functions, env->mem_io_pc and
GETPC macro.

Reviewed-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

d8fd2954 04/06/2012 07:25 pm Paul Brook

Userspace ARM BE8 support

Add support for ARM BE8 userspace binaries.
i.e. big-endian data and little-endian code.
In principle LE8 mode is also possible, but AFAIK has never actually
been implemented/used.

System emulation doesn't have any useable big-endian board models,...

06ed5d66 03/30/2012 01:10 pm Andrew Towers

ARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers.

This patch replaces the ARM_FEATURE_VFP3 test when reading MVFR registers
with a test for a new feature flag ARM_FEATURE_MVFR, and sets this feature
for all ARMv6K cores (ARM1156 is not a v6K core, yet supports MVFR; qemu...

dec9c2d4 03/29/2012 06:42 pm Andreas Färber

target-arm: Minimalistic CPU QOM'ification

Introduce only one non-abstract type TYPE_ARM_CPU and do not touch
cp15 registers to not interfere with Peter's ongoing remodelling.
Embed CPUARMState as first (additional) field of ARMCPU.

Let CPUClass::reset() call cpu_state_reset() for now....

0bcd08b3 03/29/2012 06:40 pm Andreas Färber

target-arm: Drop cpu_arm_close()

It's unused, so no need to QOM'ify it later.

Signed-off-by: Andreas Färber <>
Signed-off-by: Peter Maydell <>

d9e028c1 03/15/2012 07:00 pm Peter Maydell

target-arm: Decode SETEND correctly in Thumb

Decode the SETEND instruction correctly in Thumb mode,
rather than accidentally treating it like CPS. We don't
support BE8 mode, but this change brings the Thumb mode
in to line with behaviour in ARM mode: 'SETEND BE' is...

c98d174c 03/15/2012 07:00 pm Peter Maydell

target-arm: Clear IT bits when taking exceptions in v7M

When taking an exception for an M profile core, we must clear
the IT bits. Since the IT bits are cached in env->condexec_bits
we must clear them there: writing the bits in env->uncached_cpsr
has no effect. (Reported as LP:944645.)...

4de47793 03/15/2012 07:00 pm Peter Maydell

target-arm: Fix typo in ARM946 cp15 c5 handling

Fix a typo in handling of the ARM946 cp15 c5 c0 0 1 handling
(instruction access permission bits) that meant it would
return the data access permission bits by mistake.

Signed-off-by: Peter Maydell <>

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

1bba0dc9 03/14/2012 11:20 pm Andreas Färber

Rename cpu_reset() to cpu_state_reset()

Frees the identifier cpu_reset for QOM CPUs (manual rename).

Don't hide the parameter type behind explicit casts, use static
functions with strongly typed argument to indirect.

Signed-off-by: Andreas Färber <>...

0ecb72a5 03/14/2012 11:20 pm Andreas Färber

target-arm: Don't overuse CPUState

Scripted conversion:
sed -i "s/CPUState/CPUARMState/g" target-arm/*.[hc]
sed -i "s/#define CPUARMState/#define CPUState/" target-arm/cpu.h

Signed-off-by: Andreas Färber <>
Acked-by: Anthony Liguori <>...

853bfcc7 02/28/2012 11:33 pm Stefan Weil

target-arm: Clean includes

Remove some include statements which are not needed.

Reviewed-by: Peter Maydell <>
Signed-off-by: Stefan Weil <>

a84fac14 02/17/2012 09:34 am Peter Maydell

target-arm/helper.c: tb_flush() on CPU reset

Since target-arm has some CPUState fields for which we take the approach
of baking assumptions about them into translated code and then calling
tb_flush() when the fields change, we must also tb_flush on CPU reset,...

2d2624a0 02/17/2012 09:15 am Peter Maydell

target-arm/helper.c: Correct FPSID value for Cortex-A9

The correct FPSID for the Cortex-A9 (according to the TRM) is
0x41033090 for the r0p0 that we claim to model.

Signed-off-by: Peter Maydell <>
Signed-off-by: Andrzej Zaborowski <>

0b03bdfc 01/25/2012 05:10 pm Peter Maydell

Add Cortex-A15 CPU definition

Add a definition of a Cortex-A15 CPU. Note that for the moment we do
not implement any of: * Large Physical Address Extensions (LPAE) * Virtualization Extensions * Generic Timer * TrustZone (this is also true of our existing Cortex-A9 model, etc)...

0383ac00 01/25/2012 02:42 pm Peter Maydell

Add dummy implementation of generic timer cp15 registers

Add a dummy implementation of the cp15 registers for the generic
timer (found in the Cortex-A15), just sufficient for Linux to
decide that it can't use it. This requires at least CNTP_CTL and
CNTFRQ to be implemented as RAZ/WI; we RAZ/WI all of c14....

dc8714ca 01/25/2012 01:49 pm Peter Maydell

target-arm: Fix implementation of TLB invalidate operations

Fix some bugs in the implementation of the TLB invalidate
operations on ARM: * the 'invalidate all' op was not passing flush_global=1
to tlb_flush(); this doesn't have a practical effect since...

85836979 01/25/2012 01:49 pm Peter Maydell

target-arm/helper.c: Don't assume softfloat int32 is 32 bits only

In the helper routines for VCVT float-to-int conversions, add
an explicit cast rather than relying on the softfloat int32
type being exactly 32 bits wide (which it is not guaranteed to be)....

5fe91019 01/25/2012 01:49 pm Mark Langsdorf

arm: store the config_base_register during cpu_reset

Long 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.

Signed-off-by: Mark Langsdorf <>...

d3cb6e2b 01/13/2012 07:25 pm Peter Maydell

target-arm: Fix errors in decode of M profile CPS

Fix errors in the decode of M profile CPS: * the decode of the I (affects PRIMASK) and F (affects FAULTMASK)
bits was reversed * the FAULTMASK system register number is 19, not 17

This fixes an issue reported as LP:913925....

2be27624 01/13/2012 07:25 pm Rob Herring

arm: Add dummy support for co-processor 15's secure config register

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

1b9e01c1 01/05/2012 05:49 pm Peter Maydell

target-arm: Don't use cpu_single_env in bank_number()

Avoid using cpu_single_env in bank_number() -- if we were
called via the gdb stub reading or writing the CPSR then
it is NULL and we will segfault if we take the cpu_abort().

Signed-off-by: Peter Maydell <>

37064a8b 01/05/2012 05:49 pm Peter Maydell

target-arm: Ignore attempts to set invalid modes in CPSR

Ignore attempts to set the CPSR mode field to an invalid value.
This is UNPREDICTABLE, but we should not cpu_abort() for things
a malicious guest (or a confused user on the gdbstub interface)
can provoke....

7da362d0 01/05/2012 05:49 pm Mark Langsdorf

arm: add dummy A9-specific cp15 registers

Add dummy register support for the cp15, CRn=c15 registers.

config_base_register and power_control_register currently
default to 0, but may have improved support after the QOM
CPU patches are finished.

Signed-off-by: Mark Langsdorf <>...

db8336cd 12/13/2011 08:19 pm Andreas Färber

target-arm: Infer VFPv3 feature from VFPv4

VFP4 => VFP3

Signed-off-by: Andreas Färber <>
Signed-off-by: Peter Maydell <>

b3faf5f0 12/13/2011 08:19 pm Andreas Färber

target-arm: Infer Thumb2 feature from ARMv7

V7 => THUMB2

Signed-off-by: Andreas Färber <>
Signed-off-by: Peter Maydell <>

908ce980 12/13/2011 08:19 pm Andreas Färber

target-arm: Infer Thumb division feature from M profile

M => THUMB_DIV

Signed-off-by: Andreas Färber <>
Signed-off-by: Peter Maydell <>

86e72db6 12/13/2011 08:19 pm Andreas Färber

target-arm: Infer VFP feature from VFPv3

VFP3 => VFP

Signed-off-by: Andreas Färber <>
Signed-off-by: Peter Maydell <>