Statistics
| Branch: | Revision:

root / target-arm @ d4e6df63

# Date Author Comment
34affeef 06/25/2013 08:16 pm Peter Maydell

target-arm: Allow special cpregs to have flags set

Relax the "is this a valid ARMCPRegInfo type value?" check to permit
"special" cpregs to have flags other than ARM_CP_SPECIAL set. At
the moment none of the other flags are relevant for special regs,
but the migration related flag we're about to introduce can apply...

7023ec7e 06/25/2013 08:16 pm Peter Maydell

target-arm: Add raw_readfn and raw_writefn to ARMCPRegInfo

For reading and writing register values from the kernel for KVM,
we need to provide accessor functions which are guaranteed to succeed
and don't impose access checks, mask out unwritable bits, etc....

d4e6df63 06/25/2013 08:16 pm Peter Maydell

target-arm: mark up cpregs for no-migrate or raw access

Mark up coprocessor register definitions to add raw access
functions or mark the register as non-migratable where necessary.

Signed-off-by: Peter Maydell <>

301255e6 06/14/2013 03:51 pm Anthony Liguori

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

  1. By Michael Tokarev (4) and others
  2. Via Michael Tokarev
    • mjt/trivial-patches-next: (26 commits)
      piix: fix some printf errors when debug is enabled
      cputlb: fix debug logs
      create qemu_openpty_raw() helper function and move it to a separate file...
db9707f7 06/14/2013 03:50 pm Anthony Liguori

Merge remote-tracking branch 'pmaydell/target-arm.next' into staging

  1. By Peter Chubb
  2. Via Peter Maydell
    • pmaydell/target-arm.next:
      Fix rfe instruction

Message-id:
Signed-off-by: Anthony Liguori <>

b3a1c626 06/12/2013 12:19 pm Alexey Kardashevskiy

KVM: ARM: Add dummy kvm_arch_init_irq_routing()

The common KVM code insists on calling kvm_arch_init_irq_routing()
as soon as it sees kernel header support for it (regardless of whether
QEMU supports it). Provide a dummy function to satisfy this.

Signed-off-by: Alexey Kardashevskiy <>...

5866e078 06/03/2013 04:59 pm Peter Chubb

Fix rfe instruction

The rfe instruction has been broken since patch
5a839c0d54fac9db0516904db873a4fe01f50f4b because of a typo.

Signed-off-by: Peter Chubb <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

6681fca3 06/01/2013 01:25 pm Stefan Weil

Remove unnecessary break statements

Fix these warnings from cppcheck:

hw/display/cirrus_vga.c:2603:
hw/sd/sd.c:348:
hw/timer/exynos4210_mct.c:1033:
target-arm/translate.c:9886:
target-s390x/mem_helper.c:518:
target-unicore32/translate.c:1936:
style: Consecutive return, break, continue, goto or throw statements are unnecessary....

5b35b4e9 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* definitions

All the uses of the gen_{ld,st}* functions are gone now, so remove
the functions themselves.

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

58ab8e96 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove uses of gen_{ld,st}* from Neon code

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

94ee24e7 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove use of gen_{ld,st}* from ldrex/strex

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

5a839c0d 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* from basic ARM insns

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

c40c8556 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* from Thumb insns

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

e2592fad 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_{ld,st}* from thumb2 decoder

Signed-off-by: Peter Maydell <>
Signed-off-by: Blue Swirl <>

29531141 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove uses of gen_{ld,st}* from iWMMXt code

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

8ed1237d 05/26/2013 01:05 pm Peter Maydell

target-arm: Remove gen_ld64() and gen_st64()

gen_ld64() and gen_st64() are used only in one place, so just
expand them out.

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

39d5492a 05/26/2013 01:04 pm Peter Maydell

target-arm: Don't use TCGv when we mean TCGv_i32

TCGv changes size depending on the compile time value of
TARGET_LONG_BITS. This is useful for generating code for MIPS style
"instructions are the same but the register width changes" CPUs, and
also for the generic bits of QEMU which operate on "width of a...

536f25e4 05/03/2013 08:47 pm Peter Maydell

target-arm: Fix incorrect check of kvm_vcpu_ioctl return value

kvm_vcpu_ioctl() returns ETHING on error, not ETHING - correct
an incorrect check in kvm_arch_init_vcpu(). This would not have
had any significant ill-effects -- we would just have propagated...

3cc1d208 04/19/2013 02:24 pm Juan Quintela

target-arm: port ARM CPU save/load to use VMState

Port the ARM CPU save/load code to use VMState. Some state is
saved in a slightly different order to simplify things -- for
example arrays are saved one after the other rather than 'striped',
and we always save all 32 VFP registers even if the CPU happens...

602131e9 04/19/2013 02:24 pm Peter Maydell

target-arm: Add some missing CPU state fields to VMState

A number of CPU state fields were accidentally omitted from
our migration state: some OMAP specific cp15 registers, and
some related to state for load/store exclusive insns. Add them.

Signed-off-by: Peter Maydell <>

e91f229a 04/19/2013 02:24 pm Peter Maydell

target-arm: Correctly restore FPSCR

Use the helper functions to save and restore the FPSCR, so that
we correctly propagate rounding mode and flushing behaviour into
the float_status fields. This also allows us to stop saving the
vector length/stride fields separately....

3b328448 04/19/2013 02:24 pm Peter Chubb

target-arm: Reinsert missing return statement in ARM mode SRS decode

Since patch
81465888c5306cd94abb9847e560796fd13d3c2f
target-arm: factor out handling of SRS instruction
the ARM mode SRS instruction has not worked in QEMU.

The problem is a missing return directive that was removed in the...

bd2be150 04/15/2013 04:16 pm Peter Maydell

arm: fix location of some include files

The recent rearrangement of include files had some minor errors:
devices.h is not ARM specific and should not be in arm/
arm.h should be in arm/

Move these two headers to correct this.

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

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

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

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

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

97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

e6f010cc 03/12/2013 11:35 am Andreas Färber

target-arm: Override do_interrupt for ARMv7-M profile

Enable ARMCPUInfo to specify a custom class_init functions.
Introduce arm_v7m_class_init() and use it for "cortex-m3" model.

Instead of forwarding from arm_cpu_do_interrupt() to do_interrupt_v7m(),
override CPUClass::do_interrupt with arm_v7m_cpu_do_interrupt()...

eb035b48 03/05/2013 02:45 am Peter Maydell

target-arm: Use MemoryListener to identify GIC base address for KVM

When using an in-kernel GIC with KVM, we need to tell the kernel where
the GIC's memory mapped registers live. Do this by registering a
MemoryListener which tracks where the board model maps the A15's...

81635574 03/05/2013 02:45 am Peter Maydell

ARM KVM: save and load VFP registers from kernel

Add support for saving and restoring VFP register state from the
kernel. This includes a check that the KVM-created CPU has full
VFP support (as the TCG Cortex-A15 model always does), since for
the moment ARM QEMU doesn't have any way to tweak optional features...

494b00c7 03/05/2013 02:45 am Christoffer Dall

ARM: KVM: Add support for KVM on ARM architecture

Add basic support for KVM on ARM architecture.

Signed-off-by: Christoffer Dall <>
[PMM: Minor tweaks and code cleanup, switch to ONE_REG]
Signed-off-by: Peter Maydell <>...

f5206413 03/05/2013 02:34 am Peter Maydell

target-arm: Drop CPUARMState* argument from bank_number()

Drop the CPUARMState* argument from bank_number(), since we only
use it for passing to cpu_abort(). Use hw_error() instead.
This avoids propagating further interfaces using env pointers.

In the long term this function's callers need auditing to fix...

81465888 03/05/2013 02:31 am Peter Maydell

target-arm: Factor out handling of SRS instruction

Factor out the handling of the SRS instruction rather than
duplicating it between the Thumb and ARM decoders. This in
passing fixes two bugs in the Thumb decoder's SRS handling
which didn't exist in the ARM decoder:...

00115976 03/05/2013 02:31 am Peter Maydell

target-arm: Don't decode RFE or SRS on M profile cores

M profile cores do not have the RFE or SRS instructions, so
correctly UNDEF these insn patterns on those cores.

Signed-off-by: Peter Maydell <>

806f352d 03/03/2013 04:29 pm Peter Maydell

gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end

The gen_icount_start/end functions are now somewhat misnamed since they
are useful for generic "start/end of TB" code, used for more than just
icount. Rename them to gen_tb_start/end.

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

fadf9825 03/03/2013 04:28 pm Andreas Färber

cpu: Introduce ENV_OFFSET macros

Introduce ENV_OFFSET macros which can be used in non-target-specific
code that needs to generate TCG instructions which reference CPUState
fields given the cpu_env register that TCG targets set up with a
pointer to the CPUArchState struct....

8c3ac601 02/25/2013 10:32 pm Peter Crosthwaite

arm/translate.c: Fix adc_CC/sbc_CC implementation

commits 49b4c31efcce45ab714f286f14fa5d5173f9069d and
2de68a4900ef6eb67380b0c128abfe1976bc66e8 reworked the implementation of adc_CC
and sub_CC. The new implementations (on the TCG_TARGET_HAS_add2_i32 code path)...

e77f0832 02/25/2013 10:32 pm Richard Henderson

target-arm: Fix sbc_CC carry

While T0+~T1+CF = T0-T1+CF-1 is true for the low 32-bits,
it does not produce the correct carry-out to bit 33. Do
exactly what the manual says.

Using the ~T1 makes the add and subtract code paths nearly
identical, so have sbc_CC use adc_CC....

831d7fe8 02/23/2013 07:25 pm Richard Henderson

target-arm: Use mul[us]2 in gen_mul[us]_i64_i32

Cc: Peter Maydell <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

c9f10124 02/23/2013 07:25 pm Richard Henderson

target-arm: Use mul[us]2 and add2 in umlal et al

Cc: Peter Maydell <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

e3482cb8 02/23/2013 07:25 pm Richard Henderson

target-arm: Use add2 in gen_add_CC

Cc: Peter Maydell <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

49b4c31e 02/23/2013 07:25 pm Richard Henderson

target-arm: Implement adc_cc inline

Use add2 if available, otherwise use 64-bit arithmetic.

Cc: Peter Maydell <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

2de68a49 02/23/2013 07:25 pm Richard Henderson

target-arm: Implement sbc_cc inline

Use sub2 if available, otherwise use 64-bit arithmetic.

Cc: Peter Maydell <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

c05efcb1 02/16/2013 03:51 pm Andreas Färber

cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions....

79614b78 02/16/2013 03:50 pm Andreas Färber

target-arm: Move TCG initialization to ARMCPU initfn

Ensures that a QOM-created ARMCPU is usable.

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

14969266 02/16/2013 03:50 pm Andreas Färber

target-arm: Update ARMCPU to QOM realizefn

Turn arm_cpu_realize() into a QOM realize function, no longer called
via cpu.h prototype. To maintain the semantics of cpu_init(), set
realized = true explicitly in cpu_arm_init().

Move GDB coprocessor registration, CPU reset and vCPU initialization...

51492fd1 01/30/2013 06:03 pm Andreas Färber

target-arm: Rename CPU types

In the initial conversion of CPU models to QOM types, model names were
mapped 1:1 to type names. As a side effect this gained us a type "any",
which is now a device.

To avoid "-device any" silliness and to pave the way for compiling...

e4c1cfa5 01/30/2013 06:01 pm Peter Maydell

target-arm: Fix TCG temp leaks for WI and UNDEF VFP sysreg writes

Fix a leak of a TCG temporary in code paths for VFP system register
writes for cases which UNDEF or are write-ignored.

Signed-off-by: Peter Maydell <>

245fb54d 01/28/2013 12:33 am Andreas Färber

target-arm: Catch attempt to instantiate abstract type in cpu_init()

This fixes -cpu arm-cpu asserting.

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

5900d6b2 01/27/2013 03:52 pm Andreas Färber

target-arm: Detect attempt to instantiate non-CPU type in cpu_init()

Consolidate model checking into a new arm_cpu_class_by_name().

If the name matches an existing type, also check whether that type is
actually (a sub-type of) TYPE_ARM_CPU.

This fixes, e.g., -cpu tmp105 asserting....

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

918fd083 01/11/2013 05:21 pm Eduardo Habkost

target-arm: use type_register() instead of type_register_static()

The type_register_static() interface is documented as:

type_register_static:
@info: The #TypeInfo of the new type.
@info and all of the strings it points to should exist for the life...
314e2296 01/11/2013 05:21 pm Alex_Rozenman@mentor.com

target-arm: Fix SWI (SVC) instruction in M profile.

When do_interrupt_v7m is called with EXCP_SWI, the PC already
points to the next instruction. Don't modify it here.

Signed-off-by: Alex Rozenman <>
Signed-off-by: Peter Maydell <>

501a7ce7 12/23/2012 01:40 am Andreas Färber

Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu

Adapt header include paths.

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

92a31361 12/19/2012 03:08 pm Andreas Färber

cpu: Introduce CPUListState struct

This generalizes {ARM,M68k,Alpha}CPUListState to avoid declaring it for
each target. Place it in cpu-common.h to avoid circular dependencies.

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

6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

14cccb61 12/19/2012 09:31 am Paolo Bonzini

qom: move include files to include/qom/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

76cad711 12/19/2012 09:29 am Paolo Bonzini

build: kill libdis, move disassemblers to disas/

Signed-off-by: Paolo Bonzini <>

a8a826a3 12/16/2012 10:35 am Blue Swirl

exec: refactor cpu_restore_state

Refactor common code around calls to cpu_restore_state().

tb_find_pc() has now no external users, make it static.

Signed-off-by: Blue Swirl <>

ab1103de 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_instr_start from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

25983cad 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_pc from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

c9c99c22 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_icount from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

92414b31 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_buf from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

efd7f486 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_ptr from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

f4359b9f 11/10/2012 03:49 pm Blue Swirl

disas: avoid using cpu_single_env

Pass around CPUArchState instead of using global cpu_single_env.

Signed-off-by: Blue Swirl <>
Acked-by: Richard Henderson <>
Acked-by: Aurelien Jarno <>
Acked-by: Guan Xuetao <>

3993c6bd 10/31/2012 05:11 am Andreas Färber

cpus: Pass CPUState to [qemu_]cpu_has_work()

For target-mips also change the return type to bool.

Make include paths for cpu-qom.h consistent for alpha and unicore32.

Signed-off-by: Andreas Färber <>
[AF: Updated new target-openrisc function accordingly]...

4b3d4829 10/28/2012 03:54 pm Aurelien Jarno

target-arm: rename helper flags

Rename helper flags to the new ones. This is purely a mechanical change,
it's possible to use better flags by looking at the helpers.

Cc: Paul Brook <>
Cc: Peter Maydell <>
Reviewed-by: Richard Henderson <>...

f296c0d1 10/24/2012 03:33 pm Peter Maydell

arm-semi.c: Handle get/put_user() failure accessing arguments

Rework the handling of arguments to ARM semihosting calls so that we
handle a possible failure return from get_user_ual() or put_user_ual().
(This incidentally silences a lot of warnings from clang about...

ee6fa559 10/24/2012 03:33 pm Peter Maydell

target-arm: Use TCG operation for Neon 64 bit negation

Use the TCG operation to do Neon 64 bit negations rather than calling
a helper routine for it.

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

36c91fd1 10/24/2012 03:33 pm Peter Maydell

target-arm: Implement abs_i32 inline rather than as a helper

Implement abs_i32 inline (with movcond) rather than using a helper
function.

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

8b279a60 10/24/2012 03:33 pm Peter Maydell

target-arm: Remove out of date FIXME regarding saturating arithmetic

Remove an out of date FIXME regarding the saturating arithmetic helpers:
we now do pass a pointer to CPUARMState to these helpers, and since
the AREG0 changes went in there is no difference between helper.c...

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

02c7ac0c 10/19/2012 11:32 am Peter Maydell

target-arm/neon_helper: Remove obsolete FIXME comment

Commit 33ebc29 fixed the bugs in the implementation of VQRSHL,
but forgot to remove the FIXME comment...

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

b6348f29 10/17/2012 08:56 pm Peter Crosthwaite

target-arm/translate: Fix RRX operands

Instructions that both use the RRX second operand and update CS were
incorrect, as the Carry flag was updated too early. An example of such an
instruction would be:

ands r12,r13,RRX

Ands, because of the "s" flag will update the carry flag. But the RRX second...

00e3ab2d 10/05/2012 05:04 pm Aurelien Jarno

target-arm: mark a few integer helpers const and pure

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

d593c48e 10/05/2012 05:04 pm Aurelien Jarno

target-arm: use deposit instead of hardcoded version

Use the deposit op instead of and hardcoded bit field insertion. It
allows the host to emit the corresponding instruction if available.

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

1273d9ca 10/05/2012 05:04 pm Peter Maydell

target-arm: Drop unused DECODE_CPREG_CRN macro

This macro snuck through code review despite being unused; drop it.

Signed-off-by: Peter Maydell <>

f2617cfc 10/05/2012 05:04 pm Peter Maydell

target-arm: Reinstate display of VFP registers in cpu_dump_state

Reinstate the display of VFP registers in cpu_dump_state(), if
the CPU has them (this code had been #if 0'd out a for a long time).
We drop the attempt ot display the values as floating point, since...

66c374de 10/05/2012 05:04 pm Aurelien Jarno

target-arm: use globals for CC flags

Use globals for CC flags instead of loading/storing them each they are
accessed. This allows some optimizations to be performed by the TCG
optimization passes.

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

72485ec4 10/05/2012 05:04 pm Aurelien Jarno

target-arm: convert add_cc and sub_cc helpers to TCG

Now that the setcond TCG op is available, it's possible to replace
add_cc and sub_cc helpers by TCG code. The code generated by TCG is
actually very close to the one generated by GCC for the helper, and...

365af80e 10/05/2012 05:04 pm Aurelien Jarno

target-arm: convert sar, shl and shr helpers to TCG

Now that the movcond TCG op is available, it's possible to replace
shl and shr helpers by TCG code. The code generated by TCG is slightly
longer than the code generated by GCC for the helper but is still worth...

fdefe51c 09/27/2012 10:38 pm Richard Henderson

Emit debug_insn for CPU_LOG_TB_OP_OPT as well.

For all targets that currently call tcg_gen_debug_insn_start,
add CPU_LOG_TB_OP_OPT to the condition that gates it.

This is useful for comparing optimization dumps, when the
pre-optimization dump is merely noise....

1ce94f81 09/15/2012 08:44 pm Blue Swirl

target-arm: convert void helpers

Add an explicit CPUState parameter instead of relying on AREG0.

For easier review, convert only op helpers which don't return any value.

Signed-off-by: Blue Swirl <>
Reviewed-by: Peter Maydell <>

9ef39277 09/15/2012 08:44 pm Blue Swirl

target-arm: convert remaining helpers

Convert remaining helpers to AREG0 free mode: add an explicit
CPUState parameter instead of relying on AREG0.

Signed-off-by: Blue Swirl <>
Reviewed-by: Peter Maydell <>

d31dd73e 09/15/2012 08:44 pm Blue Swirl

target-arm: final conversion to AREG0 free mode

Convert code load functions and switch to AREG0 free mode.

Signed-off-by: Blue Swirl <>
Reviewed-by: Peter Maydell <>

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

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