Statistics
| Branch: | Revision:

root / target-arm / helper.c @ 4b6a83fb

History | View | Annotate | Download (86.8 kB)

# Date Author Comment
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.
...

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

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

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

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

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

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

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

target-arm: Infer ARMv5 feature from ARMv6

V6 => V5

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

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

target-arm: Infer ARMv6 feature from v6K

V6K => V6

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

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

target-arm: Infer ARMv6(K) feature from ARMv7

V7 && M => V6
V7 && !M => V6K

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

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

target-arm: Infer AUXCR feature from ARMv6

V6 && !M => AUXCR

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

dd4ebc2e 12/13/2011 08:19 pm Jean-Christophe DUBOIS

arm: Fix CP15 FSR (C5) domain setting

Return the correct value in the domain field in the cp15 DFSR
(C5) -- bug noticed during Xvisor development.

Signed-off-by: Jean-Christophe DUBOIS <>
[Peter Maydell: reworded commit message]
Signed-off-by: Peter Maydell <>

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

target-arm: Infer ARMv4T feature from ARMv5

V5 => V4T

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

f4fc247b 12/05/2011 10:38 pm Peter Maydell

target-arm/helper.c: Don't allocate TCG resources unless TCG enabled

Don't call arm_translate_init() (which allocates TCG resources)
unless TCG is enabled.

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

12b1de3a 10/20/2011 05:25 pm Andreas Färber

target-arm: Fix use of free() in cpu_arm_close()

env is allocated in cpu_arm_init() with g_malloc0(), so free with g_free().

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

da97f52c 10/19/2011 07:14 pm Peter Maydell

target-arm: Implement VFPv4 fused multiply-accumulate insns

Implement the fused multiply-accumulate instructions (VFMA, VFMS,
VFNMA, VFNMS) which are new in VFPv4.

Signed-off-by: Peter Maydell <>

47789990 10/19/2011 07:14 pm Peter Maydell

target-arm: Rename ARM_FEATURE_DIV to _THUMB_DIV

Rename the ARM_FEATURE_DIV feature bit to _THUMB_DIV, to
make room for a new feature switch enabling DIV in the ARM
encoding. (Cores may implement either (a) no divide insns
(b) divide insns in Thumb encodings only (c) divide insns...

b8b8ea05 10/19/2011 07:14 pm Peter Maydell

target-arm: Add ARM UDIV/SDIV support

Add support for UDIV and SDIV in ARM mode. This is a new optional
feature for A profile cores (Thumb mode has had UDIV and SDIV for
M profile cores for some time).

Signed-off-by: Peter Maydell <>

26cc6abf 10/19/2011 07:14 pm Christophe LYON

rsqrte_f32: No need to copy sign bit.

Indeed, the result is known to be always positive.

Signed-off-by: Christophe Lyon <>
Signed-off-by: Peter Maydell <>

297d1b4e 10/05/2011 11:22 am Andreas Färber

target-arm: Fix typo

The command line option is called -kernel, not -kenrel.

Cc: Paul Brook <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

b9c6cbff 08/09/2011 08:16 pm Edgar E. Iglesias

Merge remote-tracking branch 'pm-arm/for-upstream' into pm

97b348e7 08/07/2011 12:32 pm Blue Swirl

Remove unused is_softmmu parameter from cpu_handle_mmu_fault

Parameter is_softmmu (and its evil mutant twin brother is_softmuu)
is not used in cpu_*_handle_mmu_fault() functions, remove them
and adjust callers.

Acked-by: Richard Henderson <>...

7807eed9 07/26/2011 05:30 pm Jamie Iles

target-arm: support for ARM1176JZF-s cores

Add support for v6K ARM1176JZF-S. This core includes the VA<->PA
translation capability and security extensions.

Signed-off-by: Jamie Iles <>
Signed-off-by: Peter Maydell <>

906879a9 07/26/2011 05:30 pm Peter Maydell

target-arm: Mark 1136r1 as a v6K core

The 1136r1 is actually a v6K core (unlike the 1136r0); mark it as such,
thus enabling the TLS registers, NOP hints, CLREX, half and byte wide
exclusive load/stores, etc.

The VA-to-PA translation registers are not present on 1136r1, so...

0ab06d83 07/26/2011 05:22 pm Jamie Iles

target-arm: make VMSAv7 remapping and AP dependent on V6K

The VMSAv7 remapping and access permissions were introduced in ARMv6K
and not ARMv7.

Signed-off-by: Jamie Iles <>
Signed-off-by: Peter Maydell <>

a3ce3668 07/20/2011 11:23 pm Blue Swirl

Merge branch 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
    target-arm: Fix BASEPRI, BASEPRI_MAX, and FAULTMASK access
    target-arm: Minimal implementation of performance counters...
2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

82845826 06/22/2011 06:02 pm Sebastian Huber

target-arm: Fix BASEPRI, BASEPRI_MAX, and FAULTMASK access

Correct the decode of the register numbers for BASEPRI, BASEPRI_MAX
and FAULTMASK, according to "ARMv7-M Architecture Reference Manual"
issue D section "B5.2.3 MRS" and "B5.2.3 MSR".

Signed-off-by: Sebastian Huber <>...

74594c9d 06/22/2011 06:02 pm Peter Maydell

target-arm: Minimal implementation of performance counters

Newer Linux kernels assume the existence of the performance counter
cp15 registers. Provide a minimal implementation of these registers.
We support no events. This should be compliant with the ARM ARM,...

ae1857ec 06/22/2011 06:01 pm Peter Maydell

target-arm: Make VFP binop helpers take pointer to fpstatus, not CPUState

Make the VFP binop helper functions take a pointer to the fp status, not
the entire CPUState. This will allow us to use them for Neon operations too.

Signed-off-by: Peter Maydell <>

81c05daf 06/03/2011 07:42 pm Alex Zuepke

target-arm: BKPT instructions should raise prefetch aborts with IFSR type 00010

Signed-off-by: Alex Zuepke <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

36802b6b 05/23/2011 11:39 pm Peter Maydell

target-arm: Signal Underflow when denormal flushed to zero on output

On ARM the architecture mandates that when an output denormal is flushed to
zero we must set the FPSCR UFC (underflow) bit, so map softfloat's
float_flag_output_denormal accordingly.

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

5500b06c 05/23/2011 11:39 pm Peter Maydell

target-arm: Use correct float status for Neon int-float conversions

The Neon versions of int-float conversions must use the "standard FPSCR"
rather than the default FPSCR. Implement this by having the helper
functions take a pointer to the appropriate float_status value rather...

43fe9bdb 05/23/2011 11:39 pm Peter Maydell

target-arm: Signal InputDenormal for VRECPE, VRSQRTE, VRECPS, VRSQRTS

The helpers for VRECPE.F32, VSQRTE.F32, VRECPS and VRSQRTS handle denormals
as special cases, so we must set the InputDenormal exception flag ourselves.

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

1146a817 05/23/2011 11:39 pm Peter Maydell

target-arm: Don't set FP exceptions in recip, recip_sqrt estimate fns

The functions which do the core estimation algorithms for the VRSQRTE
and VRECPE instructions should not set floating point exception flags,
so use a local fp status for doing these calculations....

ec444452 04/20/2011 02:01 pm Peter Maydell

target-arm: Set Invalid flag for NaN in float-to-int conversions

When we catch the special case of an input NaN in ARM float to int
helper functions, set the Invalid flag as well as returning the
correct result.

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

5bc95aa2 04/20/2011 01:59 pm Dmitry Eremin-Solenikov

Implement basic part of SA-1110/SA-1100

Basic implementation of DEC/Intel SA-1100/SA-1110 chips emulation.
Implemented:
- IRQs
- GPIO
- PPC
- RTC
- UARTs (no IrDA/etc.)
- OST reused from pxa25x

Everything else is TODO (esp. PM/idle/sleep!) - see the todo in the...

7b59220e 04/17/2011 09:41 pm Lluís

move helpers.h to helper.h

This provides a consistent naming scheme across all targets.

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Aurelien Jarno <>

61cc8701 04/16/2011 02:24 pm Stefan Weil

Fix some typos in comments and documentation

helpfull -> helpful
usefull -> useful
cotrol -> control

and a grammar fix.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

9df38c47 04/13/2011 12:33 am Peter Maydell

target-arm: Detect tininess before rounding for FP operations

The ARM architecture mandates that we detect tininess before rounding,
so set the softfloat fp_status up appropriately.

Signed-off-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

be5e7a76 04/10/2011 01:53 am Dmitry Eremin-Solenikov

arm: basic support for ARMv4/ARMv4T emulation

Currently target-arm/ assumes at least ARMv5 core. Add support for
handling also ARMv4/ARMv4T. This changes the following instructions:

BX

BKPT, BLX, CDP2, CLZ, LDC2, LDRD, MCRR, MCRR2, MRRC, MCRR, MRC2, MRRC,...

622465e1 04/03/2011 06:19 pm Peter Maydell

target-arm/helper.c: For float-int conversion helpers pass ints as ints

Correct the argument and return types for the float<->int conversion helper
functions so that integer arguments and return values are declared as
uint32_t/uint64_t, not float32/float64. This allows us to remove the...

6aae3df1 03/22/2011 08:59 am Peter Maydell

target-arm: use make_float32() to make constant floats for VRSQRTS

The preferred way to create a constant floating point value is to use
make_float32() rather than doing a runtime int32_to_float32().
Convert the code in the VRSQRTS helper to work this way....

dda3ec49 03/22/2011 08:59 am Peter Maydell

target-arm: Fix VRECPS edge cases handling

Correct the handling of edge cases for the VRECPS instruction: * this is a Neon instruction so uses the "standard FPSCR value" * (zero, inf) is a special case which returns 2.0

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

db6e2e65 03/22/2011 08:52 am Peter Maydell

target-arm: Fix GE bits for v6media signed modulo arithmetic

Fix the signed modulo arithmetic helpers for the v6media
instructions (SADD8, SSUB8, SADD16, SSUB16, SASX, SSAX) to set
the GE bits correctly (based on the result of the add or subtract
before it is truncated to 16 bits, not after)....

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

target-arm: Implement cp15 VA->PA translation

Implement VA->PA translations by cp15-c7 that went through unchanged
previously.

Signed-off-by: Adam Lackorzynski <>
Signed-off-by: Aurelien Jarno <>

56bf4fe2 02/24/2011 09:53 am Christophe Lyon

target-arm: Introduce float64_256 and float64_512 constants.

These two constants will be used by helper functions such as recpe_f32
and rsqrte_f32.

Signed-off-by: Christophe Lyon <>
Reviewed-by: Peter Maydell <>...

fe0e4872 02/24/2011 09:53 am Christophe Lyon

target-arm: fix support for VRECPE.

Now use the same algorithm as described in the ARM ARM.

Signed-off-by: Christophe Lyon <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

e07be5d2 02/24/2011 09:53 am Christophe Lyon

target-arm: fix support for VRSQRTE.

Now use the same algorithm as described in the ARM ARM.

Signed-off-by: Christophe Lyon <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

fb91678d 02/10/2011 07:28 pm Peter Maydell

target-arm: Silence NaNs resulting from half-precision conversions

Silence the NaNs that may result from half-precision conversion,
as we do for the other conversions.

Signed-off-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

2d981da7 02/10/2011 07:28 pm Peter Maydell

target-arm: Use standard FPSCR for Neon half-precision operations

The Neon half-precision conversion operations (VCVT.F16.F32 and
VCVT.F32.F16) use ARM standard floating-point arithmetic, unlike
the VFP versions (VCVTB and VCVTT).

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

bb4d4bb3 02/10/2011 07:28 pm Peter Maydell

softfloat: Add float16 type and float16 NaN handling functions

Add a float16 type to softfloat, rather than using bits16 directly.
Also add the missing functions float16_is_quiet_nan(),
float16_is_signaling_nan() and float16_maybe_silence_nan(),
which are needed for the float16 conversion routines....

607b4b08 02/04/2011 10:30 pm Peter Maydell

target-arm: Clean up handling of MPIDR

The ARM cp15 register 0,c0,c0,5 is standardised in the v7 architecture
as the MPIDR. Clean up its implementation to remove A9 specific handling.

This commit includes fixing an error in the value returned for the
MPIDR on A9, where we were erroneously claiming a cluster ID of 9....

e1bbf446 02/04/2011 10:30 pm Peter Maydell

target-arm: Add CPU feature flag for v7MP

Add a CPU feature flag for v7MP (the multiprocessing extensions); some
instructions exist only for v7MP and not for the base v7 architecture.

Signed-off-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

9ea62f57 01/14/2011 09:39 pm Peter Maydell

target-arm: Fix implementation of VRSQRTS

The implementation of the ARM VRSQRTS instruction (which calculates
(3 - op1 * op2) / 2) was missing the division operation. It also
did not handle the special cases of (0,inf) and (inf,0).

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

3a492f3a 01/14/2011 09:39 pm Peter Maydell

target-arm: Add support for 'Standard FPSCR Value' as used by Neon

Add support to the ARM helper routines for a second fp_status value
which should be used for operations which the ARM ARM indicates use
"ARM standard floating-point arithmetic" rather than being controlled...

71826966 01/14/2011 09:39 pm Peter Maydell

target-arm: Use the standard FPSCR value for VRSQRTS

VSQRTS always uses the standard FPSCR value as it is a Neon instruction.

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

39ea3d4e 01/14/2011 09:39 pm Peter Maydell

target-arm: Don't generate code specific to current CPU mode for SRS

When translating the SRS instruction, handle the "store registers
to stack of current mode" case in the helper function rather than
inline. This means the generated code does not make assumptions...

b12c390b 01/06/2011 11:16 pm Peter Maydell

target-arm: Set softfloat cumulative exc flags from correct FPSCR bits

When handling a write to the ARM FPSCR, set the softfloat cumulative
exception flags from the cumulative flags in the FPSCR, not the
exception-enable bits. Also don't apply a mask: vfp_exceptbits_to_host...

cecd8504 01/06/2011 11:16 pm Peter Maydell

target-arm: wire up the softfloat flush_input_to_zero flag

Wire up the new softfloat support for flushing input denormals
to zero on ARM. The FPSCR FZ bit enables flush-to-zero for
both inputs and outputs, but the reporting of when inputs are
flushed to zero is via a separate IDC bit rather than the UFC...

9c486ad6 12/27/2010 10:21 pm Mattias Holm

target-arm: correct cp15 c1_sys reset value for cortex-a8

Signed-off-by: Juha Riihimäki <>
Signed-off-by: Aurelien Jarno <>

16440c5f 12/27/2010 10:21 pm Juha Riihimäki

target-arm: correct cp15 c1_sys reset value for arm1136 and cortex-a9

Signed-off-by: Juha Riihimäki <>
Signed-off-by: Aurelien Jarno <>

c0034328 12/27/2010 10:21 pm Juha Riihimäki

target-arm: fix vmsav6 access control

Override access control checks (including execute) for mmu translation
table descriptors assigned to manager domains.

Signed-off-by: Juha Riihimäki <>
Signed-off-by: Aurelien Jarno <>

26a5e69a 12/07/2010 05:37 pm Peter Maydell

ARM: Ignore top 16 bits when doing VCVT from 16 bit fixed point

VCVT of 16 bit fixed point to float should ignore the top 16 bits
of the source register. Cast to int16_t and friends rather than
int16 -- the former is guaranteed exactly 16 bits wide where the...

72f24d15 12/07/2010 05:37 pm Peter Maydell

ARM: Implement VCVT to 16 bit integer using new softfloat routines

Use the softfloat conversion routines for conversion to 16 bit
integers, because just casting to a 16 bit type truncates the
value rather than saturating it at 16-bit MAXINT/MININT.

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