summaryrefslogtreecommitdiffstats
path: root/man7/spufs.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/spufs.7')
-rw-r--r--man7/spufs.7140
1 files changed, 70 insertions, 70 deletions
diff --git a/man7/spufs.7 b/man7/spufs.7
index 8f347d16f..6ad4ef550 100644
--- a/man7/spufs.7
+++ b/man7/spufs.7
@@ -22,7 +22,7 @@ The filesystem provides a name space similar to POSIX shared
memory or message queues.
Users that have write permissions
on the filesystem can use
-.BR spu_create (2)
+.MR spu_create 2
to establish SPU contexts under the
.B spufs
root directory.
@@ -50,9 +50,9 @@ The default is 0775.
The files in
.B spufs
mostly follow the standard behavior for regular system calls like
-.BR read (2)
+.MR read 2
or
-.BR write (2),
+.MR write 2 ,
but often support only a subset of the operations
supported on regular filesystems.
This list details the supported
@@ -60,17 +60,17 @@ operations and the deviations from the standard behavior described
in the respective man pages.
.P
All files that support the
-.BR read (2)
+.MR read 2
operation also support
-.BR readv (2)
+.MR readv 2
and all files that support the
-.BR write (2)
+.MR write 2
operation also support
-.BR writev (2).
+.MR writev 2 .
All files support the
-.BR access (2)
+.MR access 2
and
-.BR stat (2)
+.MR stat 2
family of operations, but for the latter call,
the only fields of the returned
.I stat
@@ -82,11 +82,11 @@ and
.IR st_gid .
.P
All files support the
-.BR chmod (2)/\c
-.BR fchmod (2)
+.MR chmod 2 /\c
+.MR fchmod 2
and
-.BR chown (2)/\c
-.BR fchown (2)
+.MR chown 2 /\c
+.MR fchown 2
operations, but will not be able to grant permissions that contradict
the possible operations (e.g., read access on the
.I wbox
@@ -119,26 +119,26 @@ The possible operations on an open
file are:
.RS
.TP
-.BR read (2)
+.MR read 2
.TQ
-.BR pread (2)
+.MR pread 2
.TQ
-.BR write (2)
+.MR write 2
.TQ
-.BR pwrite (2)
+.MR pwrite 2
.TQ
-.BR lseek (2)
+.MR lseek 2
These operate as usual, with the exception that
-.BR lseek (2),
-.BR write (2),
+.MR lseek 2 ,
+.MR write 2 ,
and
-.BR pwrite (2)
+.MR pwrite 2
are not supported beyond the end of the file.
The file size
is the size of the local storage of the SPU,
which is normally 256 kilobytes.
.TP
-.BR mmap (2)
+.MR mmap 2
Mapping
.I mem
into the process address space provides access to the SPU local
@@ -169,18 +169,18 @@ flag.
The first SPU-to-CPU communication mailbox.
This file is read-only and can be read in units of 4 bytes.
The file can be used only in nonblocking mode \- even
-.BR poll (2)
+.MR poll 2
cannot be used to block on this file.
The only possible operation on an open
.I mbox
file is:
.RS
.TP
-.BR read (2)
+.MR read 2
If
.I count
is smaller than four,
-.BR read (2)
+.MR read 2
returns \-1 and sets
.I errno
to
@@ -199,7 +199,7 @@ the data buffer and the value four is returned.
The second SPU-to-CPU communication mailbox.
This file is similar to the first mailbox file, but can be read
in blocking I/O mode, thus calling
-.BR read (2)
+.MR read 2
on an open
.I ibox
file will block until the SPU has written data to its interrupt mailbox
@@ -207,7 +207,7 @@ channel (unless the file has been opened with
.BR O_NONBLOCK ,
see below).
Also,
-.BR poll (2)
+.MR poll 2
and similar system calls can be used to monitor for the presence
of mailbox data.
.IP
@@ -216,11 +216,11 @@ The possible operations on an open
file are:
.RS
.TP
-.BR read (2)
+.MR read 2
If
.I count
is smaller than four,
-.BR read (2)
+.MR read 2
returns \-1 and sets
.I errno
to
@@ -241,7 +241,7 @@ block until the SPU writes to its interrupt mailbox channel.
When data has been read successfully, four bytes are placed in
the data buffer and the value four is returned.
.TP
-.BR poll (2)
+.MR poll 2
Poll on the
.I ibox
file returns
@@ -253,20 +253,20 @@ whenever data is available for reading.
The CPU-to-SPU communication mailbox.
It is write-only and can be written in units of four bytes.
If the mailbox is full,
-.BR write (2)
+.MR write 2
will block, and
-.BR poll (2)
+.MR poll 2
can be used to block until the mailbox is available for writing again.
The possible operations on an open
.I wbox
file are:
.RS
.TP
-.BR write (2)
+.MR write 2
If
.I count
is smaller than four,
-.BR write (2)
+.MR write 2
returns \-1 and sets
.I errno
to
@@ -289,7 +289,7 @@ mailbox channel.
When data has been written successfully,
the system call returns four as its function result.
.TP
-.BR poll (2)
+.MR poll 2
A poll on the
.I wbox
file returns
@@ -315,11 +315,11 @@ The only possible operation on an open
file is:
.RS
.TP
-.BR read (2)
+.MR read 2
If
.I count
is smaller than four,
-.BR read (2)
+.MR read 2
returns \-1 and sets
.I errno
to
@@ -392,10 +392,10 @@ Local Store Limit Register
The possible operations on these files are:
.RS
.TP
-.BR read (2)
+.MR read 2
Reads the current register value.
If the register value is larger than the buffer passed to the
-.BR read (2)
+.MR read 2
system call, subsequent reads will continue reading from the same
buffer, until the end of the buffer is reached.
.IP
@@ -403,9 +403,9 @@ When a complete string has been read, all subsequent read operations
will return zero bytes and a new file descriptor needs to be opened
to read a new value.
.TP
-.BR write (2)
+.MR write 2
A
-.BR write (2)
+.MR write 2
operation on the file sets the register to the
value given in the string.
The string is parsed from the beginning
@@ -429,11 +429,11 @@ The operations on the
file are:
.RS
.TP
-.BR read (2)
+.MR read 2
If
.I count
is smaller than four,
-.BR read (2)
+.MR read 2
returns \-1 and sets
.I errno
to
@@ -443,11 +443,11 @@ this is the current value of the
.I fpcr
register.
.TP
-.BR write (2)
+.MR write 2
If
.I count
is smaller than four,
-.BR write (2)
+.MR write 2
returns \-1 and sets
.I errno
to
@@ -476,11 +476,11 @@ or
file are:
.RS
.TP
-.BR read (2)
+.MR read 2
If
.I count
is smaller than four,
-.BR read (2)
+.MR read 2
returns \-1 and sets
.I errno
to
@@ -489,11 +489,11 @@ Otherwise, a four-byte value is placed in the data buffer;
this is the current value of the specified signal notification
register.
.TP
-.BR write (2)
+.MR write 2
If
.I count
is smaller than four,
-.BR write (2)
+.MR write 2
returns \-1 and sets
.I errno
to
@@ -532,9 +532,9 @@ or
file are:
.RS
.TP
-.BR read (2)
+.MR read 2
When the count supplied to the
-.BR read (2)
+.MR read 2
call is shorter than the required length for the digit (plus a newline
character), subsequent reads from the same file descriptor will
complete the string.
@@ -542,9 +542,9 @@ When a complete string has been read, all subsequent read operations
will return zero bytes and a new file descriptor needs to be opened
to read the value again.
.TP
-.BR write (2)
+.MR write 2
A
-.BR write (2)
+.MR write 2
operation on the file sets the register to the
value given in the string.
The string is parsed from the beginning
@@ -655,13 +655,13 @@ registers, as an ASCII string.
The following operations are supported:
.RS
.TP
-.BR read (2)
+.MR read 2
Reads from the
.I cntl
file will return an ASCII string with the hex
value of the SPU Status register.
.TP
-.BR write (2)
+.MR write 2
Writes to the
.I cntl
file will set the context's SPU Run Control register.
@@ -675,7 +675,7 @@ writing to the file initiates a DMA from the MFC.
The following operations are supported:
.RS
.TP
-.BR write (2)
+.MR write 2
Writes to this file need to be in the format of a MFC DMA command,
defined as follows:
.IP
@@ -699,7 +699,7 @@ bytes in size.
The command will be sent to the SPU's MFC proxy queue, and the
tag stored in the kernel (see below).
.TP
-.BR read (2)
+.MR read 2
Reads the contents of the tag status register.
If the file is opened in blocking mode (i.e., without
.BR O_NONBLOCK ),
@@ -708,9 +708,9 @@ DMA tag (as performed by a previous write) is complete.
In nonblocking mode,
the MFC tag status register will be returned without waiting.
.TP
-.BR poll (2)
+.MR poll 2
Calling
-.BR poll (2)
+.MR poll 2
on the
.I mfc
file will block until a new DMA can be
@@ -724,12 +724,12 @@ has been completed.
.I /mss
Provides access to the MFC MultiSource Synchronization (MSS) facility.
By
-.BR mmap (2)-ing
+.MR mmap 2 -ing
this file, processes can access the MSS area of the SPU.
.IP
The following operations are supported:
.TP
-.BR mmap (2)
+.MR mmap 2
Mapping
.B mss
into the process address space gives access to the SPU MSS area
@@ -748,7 +748,7 @@ writing to individual register files in
The following operations are supported:
.RS
.TP
-.BR mmap (2)
+.MR mmap 2
Mapping
.B psmap
gives a process a direct map of the SPU problem state area.
@@ -772,22 +772,22 @@ This ID is later used by profiling tools to uniquely identify
the context.
.RS
.TP
-.BR write (2)
+.MR write 2
By writing an ASCII hex value into this file, applications can set the
object ID of the SPU context.
Any previous value of the object ID is overwritten.
.TP
-.BR read (2)
+.MR read 2
Reading this file gives an ASCII hex string representing the object ID
for this SPU context.
.RE
.SH EXAMPLES
To automatically
-.BR mount (8)
+.MR mount 8
the SPU filesystem when booting, at the location
.I /spu
chosen by the user, put this line into the
-.BR fstab (5)
+.MR fstab 5
configuration file:
.EX
none /spu spufs gid=spu 0 0
@@ -796,9 +796,9 @@ none /spu spufs gid=spu 0 0
.\" Arnd Bergmann <arndb@de.ibm.com>, Mark Nutter <mnutter@us.ibm.com>,
.\" Ulrich Weigand <Ulrich.Weigand@de.ibm.com>, Jeremy Kerr <jk@ozlabs.org>
.SH SEE ALSO
-.BR close (2),
-.BR spu_create (2),
-.BR spu_run (2),
-.BR capabilities (7)
+.MR close 2 ,
+.MR spu_create 2 ,
+.MR spu_run 2 ,
+.MR capabilities 7
.P
.I The Cell Broadband Engine Architecture (CBEA) specification