5.4.42. VFS2 component

The Virtual File System (VFS), implemented in the VFS2 component, is a virtual device that provides access to parts of the underlying host filesystem through a target OS-specific driver. The component is virtual, so you might have to write your own driver. Example drivers are provided in Fast Models, or are available from ARM. These drivers are for bare metal, written in C++, and for Linux, written in C. Much of the driver code can be reused for porting to other operating systems.

There are two use cases for the VFS component, which are more fully described in the text files that accompany the examples:

The VFS device implementation consists of the following parts:

VFS LISA component

Coordinates device activity.

MessageBox component

Handles bus activity and interrupts. See MessageBox component.

MBoxTypes.h

Defines types shared between target and OS.

VFS.cpp/h

Implements the VFS class/function interface.

VFSFileSystem.cpp/h

Provides a host filesystem abstraction layer.

MessageCodec.h

Provides utility classes for packing and unpacking messages.

VFSOps.h

Defines the VFS operations.

VFSTypes.h

Defines types shared between target and OS.

To use the VFS component in a platform, add the vfs.sgrepo repository file to your project. You must also add the path to the C++ header files in the VFS implementation parts list to your project.

Figure 5.64 shows a view of the component in System Canvas.

Figure 5.64. VFS2 in System Canvas

VFS2 in System Canvas

This component is written in LISA+.

Ports

Table 5.119 provides a brief description of the VFS2 component ports.

Table 5.119. VFS2 ports

NamePort protocolTypeDescription
pvbus_sPVBusSlaveProvides memory-mapped access to the VFS device.
intrSignalMasterOptional interrupt line used to indicate availability of incoming VFS data. If the intr port is not used, MessageBox registers can be used to poll for incoming VFS data. See Table 5.123.

Additional protocols

The VFS2 component has no additional protocols.

Parameters

Table 5.120 provides a description of the configuration parameters for the VFS2 component.

Table 5.120. VFS2 configuration parameters

Parameter nameDescriptionTypeAllowed valueDefault value
mountSpecifies the path to the host folder that is accessible within the target OS when mounted.Stringvalid path[empty string]

Registers

The VFS2 component has no registers.

Debug features

The VFS2 component has no debug features.

Verification and testing

The VFS2 component has been tested through use with Linux operating systems.

Performance

The VFS2 component is not expected to significantly affect the performance of a PV system, but is itself dependent on the performance of the host filesystem.

Library dependencies

The VFS2 component has no dependencies on external libraries.

Copyright © 2008-2013 ARM. All rights reserved.ARM DUI 0423O
Non-ConfidentialID060613