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.

In addition:<br />

The System Level Programmers’ Model<br />

A VMRS or VMSR instruction that accesses the FPSCR acts as a VFP exception barrier. This means it<br />

ensures that any outst<strong>and</strong>ing exceptional conditions in preceding VFP instructions have been detected<br />

<strong>and</strong> processed by the support code before it performs the register transfer. If necessary, the VMRS or<br />

VMSR instruction takes an asynchronous bounce to force the processing of outst<strong>and</strong>ing exceptional<br />

conditions.<br />

VMRS <strong>and</strong> VMSR instructions that access the FPSID or FPEXC do not take asynchronous bounces.<br />

VFP serialization <strong>and</strong> the VFP exception barriers are described in pseudocode by the SerializeVFP() <strong>and</strong><br />

VFPExcBarrier() functions respectively:<br />

SerializeVFP()<br />

VFPExcBarrier()<br />

Interactions with the <strong>ARM</strong> architecture<br />

<strong>ARM</strong> recommends that a VFP extension uses the Undefined Instruction mechanism to invoke its support<br />

code, see Undefined Instruction exceptions on page B1-76. To do this:<br />

1. Before enabling the extension hardware, install the support code on the Undefined Instruction vector.<br />

2. If the extension hardware requires assistance from the support code, it does not respond to a VFP<br />

instruction.<br />

3. This causes an Undefined Instruction exception, that causes the support code to be executed.<br />

VFP load/store instructions can generate Data Abort exceptions, <strong>and</strong> therefore implementations must be<br />

able to cope with a Data Abort exception on any memory access caused by such instructions.<br />

Interrupts<br />

Taking the Undefined Instruction exception causes IRQs to be disabled, see Undefined Instruction exception<br />

on page B1-49. Normally, IRQs are not re-enabled until the exception h<strong>and</strong>ler returns. This means that<br />

normal use of a VFP extension that requires support code in a system can increases worst case IRQ latency<br />

considerably.<br />

You can reduce this IRQ latency penalty considerably by explicitly re-enabling interrupts soon after entry<br />

to the Undefined Instruction h<strong>and</strong>ler. This requires careful integration of the Undefined Instruction h<strong>and</strong>ler<br />

into the rest of the operating system. How this might be done is highly system-specific <strong>and</strong> beyond the scope<br />

of this manual.<br />

A system where the IRQ h<strong>and</strong>ler itself might use the VFP coprocessor has a second potential cause of<br />

increased IRQ latency. This increase occurs if a long latency VFP operation is initiated by the interrupted<br />

application program, denying the use of the extension hardware to the IRQ h<strong>and</strong>ler for a significant number<br />

of cycles.<br />

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

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

Saved successfully!

Ooh no, something went wrong!