05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Controlling entry to Jazelle state<br />

The System Level Programmers’ Model<br />

The normal method of entering Jazelle state is using the BXJ instruction, see Jazelle state entry instruction,<br />

BXJ on page A2-74. The operation of this instruction depends on both:<br />

the value of the JMCR.JE bit, see Jazelle Main Configuration Register (JMCR) on page A2-77<br />

the value of the JOSCR.CV bit.<br />

When the JMCR.JE bit is 0, the JOSCR has no effect on the execution of BXJ instructions. They always<br />

execute as BX instructions, <strong>and</strong> there is no attempt to enter Jazelle state.<br />

When the JMCR.JE bit is 1, the JOSCR.CV bit controls the operation of BXJ instructions:<br />

If CV == 1 The Jazelle extension hardware configuration is valid <strong>and</strong> enabled. A BXJ instruction causes<br />

the processor to enter Jazelle state in SUBARCHITECTURE DEFINED circumstances, <strong>and</strong><br />

execute bytecode instructions as described in Executing BXJ with Jazelle extension enabled<br />

on page A2-75.<br />

If CV == 0 The Jazelle extension hardware configuration is not valid <strong>and</strong> therefore entry to Jazelle state<br />

is disabled.<br />

In all SUBARCHITECTURE DEFINED circumstances where, if CV had been 1 the BXJ<br />

instruction would have caused the Jazelle extension hardware to enter Jazelle state, it<br />

instead:<br />

enters a Configuration Invalid h<strong>and</strong>ler<br />

sets CV to 1.<br />

A Configuration Invalid h<strong>and</strong>ler is a sequence of instructions that:<br />

includes MCR instructions to write the configuration required by the EJVM<br />

ends with a BXJ instruction to re-attempt execution of the required bytecode<br />

instruction.<br />

The following are SUBARCHITECTURE DEFINED:<br />

how the address of the Configuration Invalid h<strong>and</strong>ler is determined<br />

the entry <strong>and</strong> exit conditions of the Configuration Invalid h<strong>and</strong>ler.<br />

In circumstances in which the Jazelle extension hardware would not have entered Jazelle<br />

state if CV had been 1, it is IMPLEMENTATION DEFINED whether:<br />

the Configuration Invalid h<strong>and</strong>ler is entered<br />

a SUBARCHITECTURE DEFINED h<strong>and</strong>ler is entered, as described in Executing BXJ with<br />

Jazelle extension enabled on page A2-75.<br />

In <strong>ARM</strong>v7, the JOSCVR.CV bit is set to 0 on exception entry for all implementations other than a trivial<br />

implementation of the Jazelle extension.<br />

The intended use of the JOSCR.CV bit is:<br />

1. When a context switch occurs, JOSCR.CV is set to 0. This is done by the operating system or, in<br />

<strong>ARM</strong>v7, as the result of an exception.<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. B1-79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!