Statistics
| Branch: | Revision:

root / target-arm / helper.c @ ea4571eb

History | View | Annotate | Download (143.1 kB)

# Date Author Comment
c4241c7d 02/20/2014 12:35 pm Peter Maydell

target-arm: Drop success/fail return from cpreg read and write functions

All cpreg read and write functions now return 0, so we can clean up
their prototypes: * write functions return void * read functions return the value rather than taking a pointer
to write the value to...

00108f2d 02/20/2014 12:35 pm Peter Maydell

target-arm: Convert generic timer reginfo to accessfn

Convert the reginfo structs for the generic timer registers
to use access functions rather than returning EXCP_UDEF from
their read handlers. In some cases this allows us to remove
a read handler completely....

92611c00 02/20/2014 12:35 pm Peter Maydell

target-arm: Convert miscellaneous reginfo structs to accessfn

Convert the remaining miscellaneous cases of reginfo read/write
functions returning EXCP_UDEF to use an accessfn instead:
TEEHBR, and the ATS address-translation operations.

Signed-off-by: Peter Maydell <>

e508a92b 02/20/2014 12:35 pm Peter Maydell

target-arm: Stop underdecoding ARM946 PRBS registers

The ARM946 has 8 PRBS (protection region base and size) registers.
Currently we implement these with a CP_ANY reginfo; however this
underdecodes (since there are 16 possible values of CRm but only
8 registers) and we catch the invalid values in the read and...

fcd25206 02/20/2014 12:35 pm Peter Maydell

target-arm: Convert performance monitor reginfo to accessfn

Convert the performance monitor reginfo definitions to use
an accessfn rather than returning EXCP_UDEF from read and
write functions. This also allows us to fix a couple of XXX
cases where we weren't imposing the access restrictions on...

76e3e1bc 02/20/2014 12:35 pm Peter Maydell

target-arm: Define names for SCTLR bits

The SCTLR is full of bits for enabling or disabling various things, and so
there are many places in the code which check if certain bits are set.
Define some named constants for the SCTLR bits so these checks are easier...

99f678a6 02/20/2014 12:35 pm Peter Maydell

target-arm: Restrict check_ap() use of S and R bits to v6 and earlier

The SCTLR bits S and R (8 and 9) only exist in ARMv6 and earlier.
In ARMv7 these bits RAZ, and in ARMv8 they are reassigned. Guard
the use of them in check_ap() so that we don't get incorrect results...

ab1da857 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make stl_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

2c17449b 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make ldq/ldub_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

fdfba1a2 02/11/2014 02:56 pm Edgar E. Iglesias

exec: Make ldl_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

43630e58 01/31/2014 04:47 pm Will Newton

target-arm: Add set_neon_rmode helper

This helper sets the rounding mode in the standard_fp_status word to
allow NEON instructions to modify the rounding mode whilst using the
standard FPSCR values for everything else.

Signed-off-by: Will Newton <>...

9972da66 01/31/2014 04:47 pm Will Newton

target-arm: Move arm_rmode_to_sf to a shared location.

This function will be needed for AArch32 ARMv8 support, so move it to
helper.c where it can be used by both targets. Also moves the code out
of line, but as it is quite a large function I don't believe this...

52a1f6a3 01/08/2014 09:07 pm Alexander Graf

target-arm: A64: Add floating-point<->fixed-point instructions

This patch adds emulation for the instruction group labeled
"Floating-point <-> fixed-point conversions" in the ARM ARM.

Namely this includes the instructions SCVTF, UCVTF, FCVTZS, FCVTZU
(scalar, fixed-point)....

d9b0848d 01/08/2014 09:07 pm Peter Maydell

target-arm: A64: Add 1-source 32-to-32 and 64-to-64 FP instructions

This patch adds support for those instructions in the "Floating-point
data-processing (1 source)" group which are simple 32-bit-to-32-bit
or 64-bit-to-64-bit operations (ie everything except FCVT between...

8900aad2 01/08/2014 09:07 pm Peter Maydell

target-arm: A64: Add support for FCVT between half, single and double

Add support for FCVT between half, single and double precision.

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

8ed697e8 01/08/2014 09:07 pm Will Newton

target-arm: Prepare VFP_CONV_FIX helpers for A64 uses

Make the VFP_CONV_FIX helpers a little more flexible in
preparation for the A64 uses. This requires two changes: * use the correct softfloat conversion function based on itype
rather than always the int32 one; this is possible now that...

16d5b3ca 01/08/2014 09:07 pm Will Newton

target-arm: Rename A32 VFP conversion helpers

The VFP conversion helpers for A32 round to zero as this is the only
rounding mode supported. Rename these helpers to make it clear that
they round to zero and are not suitable for use in the AArch64 code.

Signed-off-by: Will Newton <>...

abe66f70 01/08/2014 09:07 pm Peter Maydell

target-arm: Ignore most exceptions from scalbn when doing fixpoint conversion

The VFP fixed point conversion helpers first call float_scalbn and
then convert the result to an integer. This scalbn operation may
set floating point exception flags for: * overflow & inexact (if it overflows to infinity)...

3c6a074a 01/08/2014 09:07 pm Will Newton

target-arm: A64: Add extra VFP fixed point conversion helpers

Define the full set of floating point to fixed point conversion
helpers required to support AArch64.

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

f71a2ae5 01/08/2014 09:07 pm Peter Maydell

target-arm: Use VFP_BINOP macro for min, max, minnum, maxnum

Use the VFP_BINOP macro to provide helpers for min, max, minnum
and maxnum, rather than hand-rolling them. (The float64 max
version is not used by A32 but will be needed for A64.)

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

4d3da0f3 01/08/2014 09:07 pm Alexander Graf

target-arm: Give the FPSCR rounding modes names

When setting rounding modes we currently just hardcode the numeric values
for rounding modes in a big switch statement.

With AArch64 support coming, we will need to refer to these rounding modes
at different places throughout the code though, so let's better give them...

a4f0cec6 01/08/2014 09:07 pm Sergey Fedorov

target-arm: use c13_context field for CONTEXTIDR

Use c13_context field instead of c13_fcse for CONTEXTIDR register
definition.

Signed-off-by: Sergey Fedorov <>
Reviewed-by: Peter Crosthwaite <>
Reviewed-by: Peter Maydell <>...

afb2530f 01/08/2014 09:07 pm Peter Crosthwaite

target-arm: remove raw_read|write duplication

There is an inline duplication of the raw_read and raw_write function
bodies. Fix by just calling raw_read/raw_write instead.

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

b0d2b7d0 01/07/2014 09:17 pm Peter Maydell

target-arm: A64: Implement minimal set of EL0-visible sysregs

Implement an initial minimal set of EL0-visible system registers: * NZCV * FPCR * FPSR * CTR_EL0 * DCZID_EL0

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

e4fe830b 01/07/2014 09:17 pm Peter Maydell

target-arm: Widen thread-local register state fields to 64 bits

The common pattern for system registers in a 64-bit capable ARM
CPU is that when in AArch32 the cp15 register is a view of the
bottom 32 bits of the 64-bit AArch64 system register; writes in...

60322b39 01/07/2014 09:17 pm Peter Maydell

target-arm: Remove ARMCPU/CPUARMState from cpregs APIs used by decoder

The cpregs APIs used by the decoder (get_arm_cp_reginfo() and
cp_access_ok()) currently take either a CPUARMState* or an ARMCPU*.
This is problematic for the A64 decoder, which doesn't pass the...

6e6efd61 01/05/2014 12:15 am Peter Maydell

target-arm: Pull "add one cpreg to hashtable" into its own function

define_one_arm_cp_reg_with_opaque() has a set of nested loops which
insert a cpreg entry into the hashtable for each of the possible
opc/crn/crm values allowed by wildcard specifications. We're about...

f5a0a5a5 01/05/2014 12:15 am Peter Maydell

target-arm: Update generic cpreg code for AArch64

Update the generic cpreg support code to also handle AArch64:
AArch64-visible registers coexist in the same hash table with
AArch32-visible ones, with a bit in the hash key distinguishing
them.

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

6a669427 12/17/2013 09:42 pm Peter Maydell

target-arm: Support fp registers in gdb stub

Register the aarch64-fpu XML and implement the necessary
read/write handlers so we can support reading and writing
of FP registers in the gdb stub.

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

d8ba780b 12/17/2013 09:42 pm Peter Crosthwaite

target-arm: Define and use ARM_FEATURE_CBAR

Some processors (notably A9 within Highbank) define and use the
CP15 configuration base address (CBAR). This is vendor specific
so its best implemented as a CPU property (otherwise we would need
vendor specific child classes for every ARM implementation)....

3671cd87 12/17/2013 09:42 pm Peter Crosthwaite

target-arm/helper.c: Allow cp15.c15 dummy override

The cp15.c15 space is implementation defined. Currently there is a
dummy placeholder register RAZing it. Allow overriding of this RAZ
so implementations of specific registers can take precedence.

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

40cfacdd 12/10/2013 03:28 pm Will Newton

target-arm: Implement ARMv8 FP VMAXNM and VMINNM instructions.

This adds support for the ARMv8 floating point VMAXNM and VMINNM
instructions.

Signed-off-by: Will Newton <>
Reviewed-by: Peter Maydell <>
Message-id: ...

74f1c6dd 12/10/2013 03:28 pm Sergey Fedorov

target-arm: fix TTBCR write masking

Current implementation is not accurate according to ARMv7-AR reference
manual. See "B4.1.153 TTBCR, Translation Table Base Control Register,
VMSA | TTBCR format when using the Long-descriptor translation table
format". When LPAE feature is supported, EAE, bit31 selects...

a96c0514 12/10/2013 03:28 pm Peter Maydell

target-arm: Provide '-cpu host' when running KVM

Implement '-cpu host' for ARM when we're using KVM, broadly
in line with other KVM-supporting architectures.

Signed-off-by: Peter Maydell <>
Reviewed-by: Christoffer Dall <>...

8641136c 10/31/2013 03:00 pm Nathan Rossi

target-arm: Add CP15 VBAR support

Added Vector Base Address remapping on ARM v7.

Signed-off-by: Nathan Rossi <>
Signed-off-by: Peter Crosthwaite <>
[PMM: removed spurious mask of value with 1<<31]
Signed-off-by: Peter Maydell <>

cbf239b7 10/31/2013 03:00 pm Alvise Rigo

target-arm: sort TCG cpreg list by KVM-style 64 bit ID number

Both KVM and TCG populate the cpreg_list with 64 bit register IDs,
but in the TCG side the cpreg_list is sorted using the 32 bit ID
version while in the kvm side the 64 bit ID version is used. This...

51fb256a 10/07/2013 12:48 pm Andreas Färber

cpu: Drop cpu_model_str from CPU_COMMON

Since this is only read in cpu_copy() and linux-user has a global
cpu_model, drop the field from generic code.

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

78027bb6 09/10/2013 09:09 pm Cole Robinson

target-arm: Implement qmp query-cpu-definitions

Libvirt uses this to introspect available CPU models.

Signed-off-by: Cole Robinson <>
Reviewed-by: Andreas Färber <>
Message-id: ...

78dbbbe4 09/10/2013 09:09 pm Peter Maydell

target-arm: Avoid "1 << 31" undefined behaviour

Avoid the undefined behaviour of "1 << 31" by using 1U to make
the shift be of an unsigned value rather than shifting into the
sign bit of a signed integer. For consistency, we make all the
CPSR_* constants unsigned, though the only one which triggers...

bc72ad67 08/22/2013 08:14 pm Alex Bligh

aio / timers: Switch entire codebase to the new timer API

This is an autogenerated patch using scripts/switch-timer-api.

Switch the entire code base to using the new timer API.

Note this patch may introduce some line length issues.

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

22d9e1a9 08/20/2013 04:54 pm Peter Maydell

target-arm: Allow raw_read() and raw_write() to handle 64 bit regs

Extend the raw_read() and raw_write() helper accessors so that
they can be used for 64 bit registers as well as 32 bit registers.

Signed-off-by: Peter Maydell <>
Tested-by: Laurent Desnogues <>...

55d284af 08/20/2013 04:54 pm Peter Maydell

target-arm: Implement the generic timer

The ARMv7 architecture specifies a 'generic timer' which is implemented
via cp15 registers. Newer kernels will prefer to use this rather than
a devboard-level timer. Implement the generic timer for TCG; for KVM
we will already use the hardware's virtualized timer for this....

3f1beaca 08/20/2013 04:54 pm Peter Maydell

target-arm: Implement 'int' loglevel

The 'int' loglevel for recording interrupts and exceptions
requires support in the target-specific code. Implement
it for ARM. This improves debug logging in some situations
that were otherwise pretty opaque, such as when we fault...

dfc6f865 07/27/2013 10:22 am Stefan Weil

misc: Use g_assert_not_reached for code which is expected to be unreachable

The macro g_assert_not_reached is a better self documenting replacement
for assert(0) or assert(false).

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael Tokarev <>

00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

22169d41 07/23/2013 03:41 am Andreas Färber

gdbstub: Change gdb_register_coprocessor() argument to CPUState

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

a703eda1 07/15/2013 07:13 pm Peter Crosthwaite

target-arm/helper.c: OMAP/StrongARM cp15 crn=0 cleanup

The if block detecting OMAP/StrongARM modifies the id_cp_reginfo
.access fields in place. So there is no need to replicate the call
to define_arm_cp_reg(). Dropped, and let the OMAP case fall through...

97ce8d61 07/15/2013 07:13 pm Peter Crosthwaite

target-arm/helper.c: Implement MIDR aliases

Unimplemented registers in the cp15, CRn=0, opc1=0, CRm=0 space default
to aliasing the MIDR register. Set all registers in the space to access
MIDR by default.

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

204a9c43 07/15/2013 07:13 pm Peter Crosthwaite

target-arm/helper.c: Allow const opaques in arm CP

Allow for defining const opaque data in ARM CP register definitions by
setting .opaque = foo. If non null opaque is passed into
define_one_arm_cp_reg_with_opaque then that opaque will take
precedence, otherwise if null opaque is passed, the original opaque...

2ebcebe2 07/15/2013 07:13 pm Peter Maydell

target-arm: avoid undefined behaviour when writing TTBCR

LPAE CPUs have more potentially valid bits in the TTBCR, and so the
simple masking out of invalid bits is no longer sufficient to obtain
the base address width field of the register, which is what we use to...

82a3a118 07/15/2013 07:13 pm Peter Maydell

target-arm: Avoid g_hash_table_get_keys()

g_hash_table_get_keys() was only introduced in glib 2.14, and we're
still targeting a minimum version of 2.12. Rewrite the offending
code (introduced in commit 721fae1) to use g_hash_table_foreach()
to build the list of keys....

721fae12 06/25/2013 08:16 pm Peter Maydell

target-arm: Convert TCG to using (index,value) list for cp migration

Convert the TCG ARM target to using an (index,value) list for migrating
coprocessors. The primary benefit of the (index,value) list is for
passing state between KVM and QEMU, but it works for TCG-to-TCG...

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

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

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

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

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

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

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

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

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

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

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

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

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

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

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

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

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

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

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