Statistics
| Branch: | Revision:

root / target-xtensa @ f487b677

# Date Author Comment
c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

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

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

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

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

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

target-xtensa: Use mul*2 for mul*hi

Cc: Max Filippov <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

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

target-xtensa: Use add2/sub2 for mac

Cc: Max Filippov <>
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....

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

target-xtensa: Move TCG initialization to XtensaCPU initfn

Combine this with breakpoint handler registration, guarding both with
tcg_enabled() to suppress also TCG init for qtest. Rename the handler to
xtensa_breakpoint_handler() since it needs to become global....

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

target-xtensa: Introduce QOM realizefn for XtensaCPU

Introduce realizefn and set realized = true in cpu_xtensa_init().

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

004a5690 02/01/2013 02:35 am Andreas Färber

target-xtensa: Mark as unmigratable

There was no CPU_SAVE_VERSION defined, so neither "cpu_common" VMState
nor cpu_{save,load}() were registered. Their implementation was no-op.
Therefore there is no backwards compatibility to keep, so mark XtensaCPU
as unmigratable at device level....

36f25d25 12/22/2012 02:09 pm Max Filippov

target-xtensa: fix search_pc for the last TB opcode

Zero out tcg_ctx.gen_opc_instr_start for instructions representing the
last guest opcode in the TB.

Cc:
Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

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

659f807c 12/15/2012 10:39 am Max Filippov

target-xtensa: fix ITLB/DTLB page protection flags

With MMU option xtensa architecture has two TLBs: ITLB and DTLB. ITLB is
only used for code access, DTLB is only for data. However TLB entries in
both TLBs have attribute field controlling write and exec access. These...

fcc803d1 12/08/2012 08:48 pm Max Filippov

target-xtensa: implement ATOMCTL SR

ATOMCTL SR controls s32c1i opcode behavior depending on targeted memory
type. See ISA, 4.3.12.4 for details.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

4e41d2f5 12/08/2012 08:48 pm Max Filippov

target-xtensa: implement CACHEATTR SR

In XEA1, the Options for Memory Protection and Translation and the
corresponding TLB management instructions are not available. Instead,
functionality similar to the Region Protection Option is available
through the cache attribute register. See ISA, A.2.14 for details....

fe0bd475 12/08/2012 08:48 pm Max Filippov

target-xtensa: restrict available SRs by enabled options

Beginning with the RA-2004.1 release, SR access instructions (rsr, wsr,
xsr) are associated with their corresponding SR and raise illegal opcode
exception in case the register is not configured for the core....

53593e90 12/08/2012 08:48 pm Max Filippov

target-xtensa: better control rsr/wsr/xsr access to SRs

There are read-only (DEBUGCAUSE, PRID) and write-only (INTCLEAR) SRs,
and INTERRUPT/INTSET SR allows rsr/wsr, but not xsr. Raise illeagal
opcode exception on illegal access to these SRs.

Signed-off-by: Max Filippov <>...

b7909d81 12/08/2012 08:48 pm Max Filippov

target-xtensa: implement MISC SR

The Miscellaneous Special Registers Option provides zero to four scratch
registers within the processor readable and writable by RSR, WSR, and
XSR. These registers are privileged. They may be useful for some
application-specific exception and interrupt processing tasks in the...

f877d09e 12/08/2012 08:48 pm Max Filippov

target-xtensa: use movcond where possible

Use movcond for all sorts of conditional moves, ABS, CLAMPS, MIN/MAX
opcodes.

Signed-off-by: Max Filippov <>
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 <>

0c4fabea 11/10/2012 03:49 pm Blue Swirl

target-xtensa: avoid using cpu_single_env

Pass around CPUArchState instead of using global cpu_single_env.

Signed-off-by: Blue Swirl <>
Acked-by: Max Filippov <>
Reviewed-by: Andreas Färber <>

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

f0de4132 10/28/2012 03:54 pm Aurelien Jarno

target-xtensa: 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: Max Filippov <>
Reviewed-by: Richard Henderson <>...

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

f783cb22 10/06/2012 01:22 pm Aurelien Jarno

target-xtensa: de-optimize EXTUI

Now that "and" with 0xff, 0xffff and 0xffffffff and "shr" with 0 shift
are optimized in tcg/tcg-op.h there is no need to do it in
target-xtensa/translate.c.

Acked-by: Max Filippov <>
Signed-off-by: Aurelien Jarno <>

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

4e273869 09/22/2012 08:59 pm Max Filippov

target-xtensa: implement FP1 group

These are comparison and conditional move opcodes.
See ISA, 4.3.10 for more details.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

ef04a846 09/22/2012 08:59 pm Max Filippov

target-xtensa: implement coprocessor context option

In case Coprocessor Context option is enabled CPENABLE SR bits control
whether access to coprocessors is allowed or would rise one of
CoprocessorXDisabled exceptions.

See ISA, 4.4.5 for more details.

FP is coprocessor 0....

10f6ca03 09/22/2012 08:59 pm Max Filippov

target-xtensa: handle boolean option in overlays

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

dd519cbe 09/22/2012 08:59 pm Max Filippov

target-xtensa: add FP registers

There are 16 32-bit FP registers (f0 - f15), control and status user
registers (fcr, fsr).

See ISA, 4.3.10 for more details.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

9ed7ae12 09/22/2012 08:59 pm Max Filippov

target-xtensa: implement LSCX and LSCI groups

These are load/store instructions for FP registers with immediate or
register index and optional base post-update.
See ISA, 4.3.10 for more details.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

0b6df838 09/22/2012 08:59 pm Max Filippov

target-xtensa: implement FP0 arithmetic

These are FP arithmetic opcodes.
See ISA, 4.3.10 for more details.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

b7ee8c6a 09/22/2012 08:59 pm Max Filippov

target-xtensa: implement FP0 conversions

These are FP to integer and integer to FP conversion opcodes.
See ISA, 4.3.10 for more details.

Note that ISA description for utrunc.s is currently incorrect and will
be fixed in future revisions.

Signed-off-by: Max Filippov <>...

f9cb5045 09/21/2012 02:07 am Max Filippov

target-xtensa: fix extui shift amount

extui opcode only uses lowermost op1 bit for sa4.

Reported-by: malc <>
Signed-off-by: Max Filippov <>
Cc: qemu-stable <>
Signed-off-by: malc <>

c26032b2 09/21/2012 02:07 am Max Filippov

target-xtensa: don't emit extra tcg_gen_goto_tb

Unconditional gen_check_loop_end at the end of disas_xtensa_insn
can emit tcg_gen_goto_tb with slot id already used in the TB (e.g. when
TB ends at LEND with a branch).

Signed-off-by: Max Filippov <>...

c29b1bee 09/08/2012 11:46 am Max Filippov

target-xtensa: fix missing errno codes for mingw32

Put the following errno value mappings under #ifdef:

xtensa-semi.c: In function 'errno_h2g':
xtensa-semi.c:113: error: 'ENOTBLK' undeclared (first use in this function)
xtensa-semi.c:113: error: (Each undeclared identifier is reported only once...

d6ce52c1 09/05/2012 10:18 pm Max Filippov

target-xtensa: convert host errno values to guest

Guest errno values are taken from the newlib. Convert only those errno
values that can be returned from used system calls.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

e7eee62a 09/01/2012 01:39 pm Max Filippov

target-xtensa: return ENOSYS for unimplemented simcalls

This prevents guest from proceeding with uninitialised garbage returned
from unimplemented simcalls.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

d3da41e3 08/09/2012 09:44 pm Blue Swirl

Merge branch 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu

  • 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu:
    target-i386: move tcg initialization into x86_cpu_initfn()
    cleanup cpu_set_debug_excp_handler
    target-xtensa: drop usage of prev_debug_excp_handler...
e38077ff 08/09/2012 09:37 pm Max Filippov

target-xtensa: make default CPU depend on target endianness

This makes usable default for -cpu option both for qemu-system-xtensa
and qemu-system-xtensaeb fixing the following error:

$ qemu-system-xtensaeb -M sim
Unable to find CPU definition

Signed-off-by: Max Filippov <>...

7ff7563f 07/28/2012 12:06 pm Max Filippov

target-xtensa: fix big-endian BBS/BBC implementation

Quote from ISA, 2.1:

For most Xtensa instructions, bit numbering is irrelevant; only the BBC
and BBS instructions assign bit numbers to values on which the processor
operates. The BBC/BBS instructions use big-endian bit ordering (0 is the...

eeec69dc 06/25/2012 04:35 pm Igor Mammedov

target-xtensa: drop usage of prev_debug_excp_handler

Chains of exception handlers are currently unused feature. Dropping it
to be consistent with target-i386 but it may simplify qom-ifying CPU
in future like for target-i386.

Signed-off-by: Igor Mammedov <>

f492b82d 06/10/2012 11:09 pm Max Filippov

target-xtensa: switch to AREG0-free mode

Add env parameter to every helper function that needs it, update
'configure' script.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

e8de1ea8 06/10/2012 11:09 pm Max Filippov

target-xtensa: add attributes to helper functions

Mark exception generating functions 'noreturn' and pure constant
functions as such.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

9ed3a188 06/10/2012 11:09 pm Peter Portante

target-xtensa: remove unnecessary include of dyngen-exec.h

Signed-off-by: Peter Portante <>
Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

d865f307 06/09/2012 01:49 pm Max Filippov

target-xtensa: fix CCOUNT for conditional branches

Taken conditional branches fail to update CCOUNT register because
accumulated ccount_delta is reset during translation of non-taken
branch. To fix it only update CCOUNT once per conditional branch
instruction translation....

e323bdef 06/09/2012 01:45 pm Max Filippov

target-xtensa: flush TLB page for new MMU mapping

Both old and new mappings need flushing because their VPN may be
different in MMU case.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

39e7d37f 06/09/2012 01:45 pm Max Filippov

target-xtensa: update EXCVADDR in case of page table lookup

According to ISA, 4.4.2.6, EXCVADDR may be changed by any TLB miss, even
if the miss is handled entirely by processor hardware.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

16bde77a 06/09/2012 01:45 pm Max Filippov

target-xtensa: extract TLB entry setting method

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

ae4e7982 06/09/2012 01:45 pm Max Filippov

target-xtensa: update autorefill TLB entries conditionally

This is to avoid interference of internal QEMU helpers
(cpu_get_phys_page_debug, tb_invalidate_virtual_addr) with guest-visible
TLB state.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

57705a67 06/09/2012 01:45 pm Max Filippov

target-xtensa: control page table lookup explicitly

Hardware pagetable walking may not be nested. Stop guessing and pass
explicit flag to the get_physical_addr_mmu function that controls page
table lookup.

Signed-off-by: Max Filippov <>...

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

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

target-xtensa: Let cpu_xtensa_init() return XtensaCPU

Make the include paths for cpu-qom.h consistent to allow using XtensaCPU
in cpu.h.

Turn cpu_init macro into a static inline function returning
CPUXtensaState for backwards compatibility.

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

b18b37f7 04/21/2012 04:24 pm Max Filippov

target-xtensa: fix LOOPNEZ/LOOPGTZ translation

Translation of LOOP instructions used to call LEND SR write handler to
update LEND and invalidate relevant TBs. Now that LEND SR write handler
ends TB, LOOPNEZ and LOOPGTZ generate wrong code (same as for simple...

b79b38e4 04/15/2012 08:43 pm Max Filippov

target-xtensa: add license to core-fsf.c

Signed-off-by: Max Filippov <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

fbaa9fb5 04/15/2012 08:43 pm Max Filippov

target-xtensa: add license to core-dc232b.c

Signed-off-by: Max Filippov <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

176ac95e 04/15/2012 08:43 pm Max Filippov

target-xtensa: add dc233c core

This is Diamond 233L Standard Core Rev.C (LE), implemented through
linux/gdb overlay.

Signed-off-by: Max Filippov <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

3d0be8a5 04/14/2012 06:25 pm Max Filippov

target-xtensa: fix tb invalidation for IBREAK and LOOP

Instruction breakpoint/zero overhead loop handling code is built into
TBs pointed to by IBREAKA/LEND SRs. When these or related SRs get
changed TBs at virtual addresses corresponding to their old and their...

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

16c1deae 04/14/2012 02:48 am Lluís Vilanova

target-xtensa: Move helpers.h to helper.h

Provides a file naming scheme consistent with other targets.

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Max Filippov <>

a4633e16 04/14/2012 02:48 am Andreas Färber

target-xtensa: QOM'ify CPU

Embed CPUXtensaState as first member of XtensaCPU.
Let CPUClass::reset() call cpu_state_reset() for now.

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

5087a72c 04/14/2012 02:48 am Andreas Färber

target-xtensa: QOM'ify CPU reset

Move code from cpu_state_reset() into QOM xtensa_cpu_reset().
To avoid moving reset_mmu() and dependencies, make it non-static.

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

e554bbc6 04/14/2012 02:48 am Andreas Färber

target-xtensa: Start QOM'ifying CPU init

Move XtensaConfig-independent code from cpu_xtensa_init() into a
QOM initfn, as a start.

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

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

97129ac8 03/14/2012 11:20 pm Andreas Färber

target-xtensa: Don't overuse CPUState

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

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

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

5a30d3f1 03/03/2012 07:59 pm Blue Swirl

Merge branch 'upstream' of git://qemu.weilnetz.de/qemu

  • 'upstream' of git://qemu.weilnetz.de/qemu:
    Move definition of HOST_LONG_BITS to qemu-common.h
    target-xtensa: Clean includes
    target-unicore32: Clean includes
    target-sh4: Clean includes
    target-s390x: Clean includes...
2ad5201c 02/28/2012 11:33 pm Stefan Weil

target-xtensa: Clean includes

Remove some include statements which are not needed.

Acked-by: Max Filippov <>
Signed-off-by: Stefan Weil <>

f14c4b5f 02/20/2012 06:07 pm Max Filippov

target-xtensa: add DBREAK data breakpoints

Add DBREAKA/DBREAKC SRs and implement DBREAK breakpoints as debug
watchpoints.

This implementation is not fully compliant to ISA: when a breakpoint is
set to an unmapped/inaccessible memory address it generates TLB/memory...

18da9326 02/20/2012 06:07 pm Max Filippov

target-xtensa: add DEBUG_SECTION to overlay tool

Fill debug configuration from overlay definitions in the DEBUG_SECTION.
Add DEBUG_SECTION to DC232B and FSF cores.

Signed-off-by: Max Filippov <>

35b5c044 02/18/2012 12:55 pm Max Filippov

target-xtensa: add ICOUNT SR and debug exception

ICOUNT SR gets incremented on every instruction completion provided that
CINTLEVEL at the beginning of the instruction execution is lower than
ICOUNTLEVEL.

When ICOUNT would increment to 0 a debug exception is raised if...

ab58c5b4 02/18/2012 12:55 pm Max Filippov

target-xtensa: add DEBUGCAUSE SR and configuration

DEBUGCAUSE SR holds information about the most recent debug exception.
See ISA, 4.7.7 for more details.

Signed-off-by: Max Filippov <>

e61dc8f7 02/18/2012 12:55 pm Max Filippov

target-xtensa: implement instruction breakpoints

Add IBREAKA/IBREAKENABLE SRs and implement debug exception, BREAK and
BREAK.N instructions and IBREAK breakpoints.

IBREAK breakpoint address is considered constant for TB lifetime.
On IBREAKA/IBREAKENABLE change corresponding TBs are invalidated....

692f737c 02/17/2012 11:25 pm Max Filippov

target-xtensa: implement info tlb monitor command

Command dumps valid ITLB and DTLB entries.

Signed-off-by: Max Filippov <>

a044ec2a 02/17/2012 11:25 pm Max Filippov

target-xtensa: fetch 3rd opcode byte only when needed

According to ISA, 3.5.4, third opcode byte should not be fetched for
2-byte instructions.

Signed-off-by: Max Filippov <>

b96ac3e4 02/17/2012 11:25 pm Max Filippov

target-xtensa: define TLB_TEMPLATE for MMU-less cores

TLB_TEMPLATE macro specifies TLB geometry in the core configuration.
Make TLB_TEMPLATE available for region protection core variants,
defining 1 way ITLB and DTLB with 8 entries each.

Signed-off-by: Max Filippov <>

0fdd2e1d 11/26/2011 11:44 am Max Filippov

target-xtensa: fix MMUv3 initialization

- ITLB/DTLB ways 5 and 6 have 4 and 8 entries respectively;
- ITLB/DTLB way 6 attr field is set to 3 on reset.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

0c852e17 11/02/2011 03:05 am Max Filippov

target-xtensa: handle cache options in the overlay tool

Cache options must be enabled for the cores that have cache to avoid
illegal instruction exceptions.

Signed-off-by: Max Filippov <>

6b814719 11/02/2011 03:05 am Max Filippov

target-xtensa: raise an exception for invalid and reserved opcodes

This includes opcodes from disabled features and those marked reserved in the ISA.
Also end TB on opcodes that definitely generate an exception: illegal
instructions, syscall and privileged instructions....

53a72dfd 11/02/2011 03:05 am Max Filippov

target-xtensa: mask out undefined bits of WINDOWSTART SR

According to ISA, table 5-156, bits 32:NAREG/4 of the WINDOWSTART SR
must be zero.

Signed-off-by: Max Filippov <>

935f7a2b 10/16/2011 01:40 pm Max Filippov

target-xtensa: add fsf core

This is FSF big endian core implemented through linux overlay.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

53add759 10/16/2011 01:40 pm Max Filippov

target-xtensa: add dc232b core

This is Diamond 232L Standard Core Rev.B (LE), implemented through
linux/gdb overlay.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

ac8b7db4 10/16/2011 01:39 pm Max Filippov

target-xtensa: extract core configuration from overlay

Introduce overlay_tool.h that defines core configuration blocks from
data available in the linux architecture variant overlay.

Overlay data is automatically generated in the core configuration
process by Tensilica tools and can be directly converted to qemu xtensa...

b8929a54 10/16/2011 01:39 pm Max Filippov

target-xtensa: implement external interrupt mapping

Xtensa cores may have different mapping of external interrupt pins to
internal IRQ numers. Implement API to acquire core IRQ by its external
interrupt number.

Signed-off-by: Max Filippov <>...

63f95e4c 10/16/2011 01:39 pm Max Filippov

target-xtensa: remove hand-written xtensa cores implementations

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

7f65f4b0 10/16/2011 01:39 pm Max Filippov

target-xtensa: increase xtensa options accuracy

- add separate options for each operation in the MISC_OP;
- add an option for MULSH/MULUH;
- put S32C1I under conditional store option.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>