02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

The combination of copyback cache without snooping is particularly dangerous,<br />

although the risk is reduced if all user buffers are positioned so that they do not<br />

share cache lines with any other buffer. The user can insure that the front end of<br />

any user buffer is aligned on a cache boundary by setting the variable<br />

memDefaultAlignment to the cache line size. This results in all malloc( ) requests<br />

being aligned on the start of a cache line.<br />

The user can protect the rear end of any buffer by increasing the size of the memory<br />

request by one cache line. This guarantees that no other buffer shares a cache line<br />

with this buffer. Having done all this, memory buffers for DMA operations are<br />

relatively safe from the effect of memory coherency in a copyback situation.<br />

Many new processors implement write pipes that can buffer write operations<br />

when the bus controller is busy. This requires device drivers to make use of the<br />

CACHE_PIPE_FLUSH macros for generic drivers. A CACHE_PIPE_FLUSH operation<br />

should be inserted between any I/O write operation and a I/O read operation. If<br />

a routine begins with an I/O read then you should assume that an I/O write<br />

operation precedes it.<br />

4.2.3 MMU Support<br />

VxWorks supports several different MMUs through a virtual memory library.<br />

Because virtual memory is inappropriate for some real-time applications,<br />

VxWorks can be configured to not include virtual memory support.<br />

For more information on VxWorks virtual memory support, see the following:<br />

■<br />

the reference entries for vmBaseLib and vmLib<br />

■<br />

■<br />

VxWorks Programmer’s <strong>Guide</strong>: Virtual Memory Interface<br />

VxWorks Programmer’s <strong>Guide</strong>: Configuration<br />

■<br />

4.5 Enabling the Virtual Memory Library, p.83<br />

4.2.4 Floating-Point Support<br />

Floating point is supported as a tasking extension to avoid costly context switch<br />

times for tasks that do not use floating-point operations. Tasks can be spawned<br />

with a special floating-point option, and context switch callouts provide the<br />

mechanism to initialize, save, and restore a floating-point context. By switching<br />

floating-point data and control registers in and out, each task effectively shares the<br />

single floating-point unit.<br />

66

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

Saved successfully!

Ooh no, something went wrong!