1 .\" This is _*_ nroff _*_ source. Emacs, gimme all those colors :)
3 .\" Copyright (c) International Business Machines Corp., 2006
5 .\" This program is free software; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" This program is distributed in the hope that it will be useful,
11 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 .\" the GNU General Public License for more details.
15 .\" You should have received a copy of the GNU General Public License
16 .\" along with this program; if not, write to the Free Software
17 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 .\" 2005-09-28, created by Arnd Bergmann <arndb@de.ibm.com>,
22 .\" Mark Nutter <mnutter@us.ibm.com> and
23 .\" Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
24 .\" 2006-06-16, revised by Eduardo M. Fleury <efleury@br.ibm.com>
25 .\" 2007-07-10, quite a lot of polishing by mtk
27 .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI
28 .\" all rights reserved.
29 .\" Translated 2007-10-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
31 .TH SPUFS 7 2007-07-10 "Linux" "Linux Programmer's Manual"
34 .\"O spufs \- the SPU file system
38 .\"O The SPU file system is used on PowerPC machines that implement the
39 .\"O Cell Broadband Engine Architecture in order to access Synergistic
40 .\"O Processor Units (SPUs).
41 SPU ファイルシステムは、Cell Broadband Engine アーキテクチャを実装した
42 PowerPC マシンにおいて、Synergistic Processor Unit (SPU) にアクセスする
45 .\"O The file system provides a name space similar to POSIX shared
46 .\"O memory or message queues.
47 .\"O Users that have write permissions
48 .\"O on the file system can use
49 .\"O .BR spu_create (2)
50 .\"O to establish SPU contexts under the spufs root directory.
51 このファイルシステムでは、POSIX 共有メモリやメッセージキューに
53 ファイルシステムに書き込み許可を持つユーザは
55 を使って spufs のルートディレクトリに SPU コンテキストを作成できる。
57 .\"O Every SPU context is represented by a directory containing
58 .\"O a predefined set of files.
59 .\"O These files can be
60 .\"O used for manipulating the state of the logical SPU.
61 .\"O Users can change permissions on those files, but can't
62 .\"O add or remove files.
63 各 SPU コンテキストは、あらかじめ定義されたファイル群を含む
65 これらのファイルを使って、論理 SPU の状態を操作できる。
66 ユーザはこれらのファイルのアクセス許可を変更することはできるが、
68 .\"O .SS Mount Options
72 .\"O set the user owning the mount point; the default is 0 (root).
73 マウントポイントを所有するユーザを設定する。
77 .\"O set the group owning the mount point; the default is 0 (root).
78 マウントポイントを所有するグループを設定する。
84 .\"O mostly follow the standard behavior for regular system calls like
88 .\"O but often support only a subset of the operations
89 .\"O supported on regular file systems.
90 .\"O This list details the supported
91 .\"O operations and the deviations from the standard behavior described
92 .\"O in the respective man pages.
98 といった通常のシステムコールに対する標準的な振る舞いを示すが、
99 多くの場合通常のファイルシステムでサポートされている操作の一部分だけが
100 サポートされている。以下のリストでは、サポートされている操作と
101 それぞれのマニュアルページに書かれている標準的な振る舞いとの違いに
104 .\"O All files that support the
106 .\"O operation also support
108 .\"O and all files that support the
110 .\"O operation also support
121 .\"O All files support the
125 .\"O family of operations, but for the latter call,
126 .\"O the only fields of the returned
128 .\"O structure that contain reliable information are
142 構造体のフィールドのうち信頼できる情報が入っているのは
149 .\"O All files support the
150 .\"O .BR chmod (2)/ fchmod (2)
152 .\"O .BR chown (2)/ fchown (2)
153 .\"O operations, but will not be able to grant permissions that contradict
154 .\"O the possible operations (e.g., read access on the
158 .BR chmod (2)/ fchmod (2)
160 .BR chown (2)/ fchown (2)
162 そのファイルが対応している操作と矛盾するアクセス許可を
167 .\"O The current set of files is:
171 .\"O the contents of the local storage memory of the SPU.
172 .\"O This can be accessed like a regular shared memory
173 .\"O file and contains both code and data in the address
174 .\"O space of the SPU.
175 .\"O The possible operations on an open
179 このファイルは通常の共有メモリファイルと同様にアクセスでき、
180 SPU のアドレス空間にはコードとデータの両方を格納できる。
186 .BR read "(2), " pread "(2), " write "(2), " pwrite "(2), " lseek (2)
187 .\"O These operate as usual, with the exception that
188 .\"O .BR lseek "(2), " write (2)
191 .\"O are not supported beyond the end of the file.
193 .\"O is the size of the local storage of the SPU,
194 .\"O which is normally 256 kilobytes.
201 ファイルサイズは SPU のローカルストレージのサイズであり、
207 .\"O into the process address space provides access to the SPU local
208 .\"O storage within the process address space.
211 .\"O mappings are allowed.
213 をプロセスのアドレス空間にマッピングすると、
215 SPU のローカル・ストレージにアクセスできるようになる。
219 .\"O The first SPU-to-CPU communication mailbox.
221 .\"O is read-only and can be read in units of 32 bits.
222 .\"O The file can only be used in non-blocking mode and not
225 .\"O will block on it.
226 .\"O The only possible operation on an open
229 SPU から CPU への通信用の一つ目のメールボックス。
230 このファイルは読み出し専用で、読み出しは 32ビット単位で行う。
231 このファイルは非停止 (non-blocking) モードでのみ使用でき、
233 であってもこのファイルで停止 (block) することはない。
242 .\"O is smaller than four,
244 .\"O returns \-1 and sets
248 .\"O If there is no data available in the mailbox, the return
249 .\"O value is set to \-1 and
254 .\"O has been read successfully, four bytes are placed in
255 .\"O the data buffer and the value four is returned.
264 メールボックスにデータがない場合、\-1 が返り、
268 に設定される。データの読み出しに成功した場合、
269 4 バイトがデータバッファに格納され、返り値として 4 が返される。
273 .\"O The second SPU-to-CPU communication mailbox.
274 .\"O This file is similar to the first mailbox file, but can be read
275 .\"O in blocking I/O mode, thus
277 .\"O and similar system calls can be used to monitor this file.
278 .\"O The possible operations on an open
281 SPU から CPU への通信用の二つ目のメールボックスである。
282 このファイルは一つ目のメールボックスファイルと似ているが、
283 停止 (blocking) I/O モードでの読み出しが可能である。したがって、
285 や同様のシステムコールを使って、このファイルを監視することができる。
294 .\"O is smaller than four,
296 .\"O returns \-1 and sets
300 .\"O If there is no data available in the mailbox and the file
301 .\"O descriptor has been opened with
302 .\"O .BR O_NONBLOCK ,
303 .\"O the return value is set to \-1 and
315 メールボックスにデータがない場合、ファイルディスクリプタが
317 でオープンされていれば、返り値は \-1 となり、
323 .\"O If there is no data available in the mailbox and the file
324 .\"O descriptor has been opened without
325 .\"O .BR O_NONBLOCK ,
327 .\"O block until the SPU writes to its interrupt mailbox channel.
328 .\"O When data has been read successfully, four bytes are placed in
329 .\"O the data buffer and the value four is returned.
330 メールボックスにデータがない場合で、ファイルディスクリプタが
333 SPU が自分の割り込みメールボックスチャネル (interrupt mailbox channel)
338 4 バイトがデータバッファに格納され、返り値として 4 が返される。
344 .\"O .I "(POLLIN | POLLRDNORM)"
345 .\"O whenever data is available for reading.
350 .I "(POLLIN | POLLRDNORM)"
355 .\"O The CPU-to-SPU communication mailbox.
356 .\"O It is write-only and can be written in units of 32 bits.
357 .\"O If the mailbox is full,
361 .\"O can be used to wait for it to become empty again.
362 .\"O The possible operations on an open
365 CPU から SPU への通信用のメールボックス。
366 このファイルは書き込み専用で、書き込みは 32ビット単位で行う。
371 を使ってメールボックスに再度空きができるまで待つことができる。
380 .\"O is smaller than four,
382 .\"O returns \-1 and sets
386 .\"O If there is no space available in the mailbox and the file
387 .\"O descriptor has been opened with
388 .\"O .BR O_NONBLOCK ,
390 .\"O value is set to \-1 and
402 メールボックスに空き領域がない場合、ファイルディスクリプタが
404 でオープンされていれば、返り値は \-1 となり、
410 .\"O If there is no space available in the mailbox and the file
411 .\"O descriptor has been opened without
412 .\"O .BR O_NONBLOCK ,
414 .\"O block until the SPU reads from its PPE mailbox channel.
415 .\"O When data has been written successfully,
416 .\"O the system call returns four as its function result.
417 メールボックスに空き領域がない場合で、ファイルディスクリプタが
420 SPU が自分の PPE メールボックスチャネルから読み出しを行うまで
423 データの書き込みに成功した場合、返り値として 4 が返される。
429 .\"O .I "(POLLOUT | POLLWRNORM)"
430 .\"O whenever space is available for writing.
435 .I "(POLLOUT | POLLWRNORM)"
439 .BR /mbox_stat ", " /ibox_stat ", " /wbox_stat
440 .\"O These are read-only files that contain the length of the current
441 .\"O queue of each mailbox, i.e., how many words can be read from
442 .\"O .IR mbox " or " ibox
443 .\"O or how many words can be written to
445 .\"O without blocking.
446 .\"O The files can be read only in four-byte units and return
447 .\"O a big-endian binary integer number.
448 .\"O The possible operations on an open
452 各メールボックスの現在のキュー長を保持する。
453 具体的には、停止 (blocking) せずに、
457 に何ワードを書き込むことができるか、ということである。
458 これらのファイルは 4 バイト単位でのみ読み出しが可能で、
468 .\"O is smaller than four,
470 .\"O returns \-1 and sets
474 .\"O Otherwise, a four-byte value is placed in the data buffer.
475 .\"O This value is the number of elements that can be read from (for
479 .\"O or written to (for
481 .\"O the respective mailbox without blocking or getting an
492 それ以外の場合、データバッファに 4 バイトの値が書き込まれる。
493 この値は、各メールボックスにおいて停止せずに、または
504 .BR /npc ", " /decr ", " /decr_status ", " /spu_tag_mask ", " \
505 /event_mask ", " /srr0
506 .\"O These files expose internal registers of the SPU.
507 .\"O The values are represented
508 .\"O as ASCII strings containing the numeric value of each register.
509 .\"O These can be used in read/write mode for debugging, but normal
510 .\"O operation of programs should not rely on these files because
511 .\"O accesses to any of them except
513 .\"O require an SPU context save, which is very inefficient.
514 これらのファイルは SPU の内部レジスタを公開するものである。
515 値は、各レジスタの数値を含むアスキー文字列で表現される。
516 これらのファイルはデバッグ用として読み出し/書き込みの両モードで利用できるが、
517 プログラムの通常の操作はこれらのファイルに依存すべきではない。
520 以外へのアクセスでは SPU コンテキストの保存が必須であり、
521 SPU コンテキストの保存は非常に効率が悪いからである。
523 .\"O The contents of these files are:
528 .\"O Next Program Counter
536 .\"O Decrementer Status
540 .\"O MFC tag mask for SPU DMA
541 SPU の DMA 用の MFA タグマスク
544 .\"O Event mask for SPU interrupts
548 .\"O Interrupt Return address register
552 .\"O The possible operations on one of these files are:
553 これらのファイルに対して可能な操作は以下である。
561 .\"O call is shorter than the required length for the register
562 .\"O value plus a newline character, subsequent reads from the same
563 .\"O file descriptor will complete the string, regardless
564 .\"O of changes to the register by a running SPU task.
565 .\"O When a complete string has been read, all subsequent read operations
566 .\"O will return zero bytes and a new file descriptor needs to be opened
567 .\"O to read a new value.
571 がレジスタ値と改行 (newline) 文字 1 個を格納するのに必要な長さより短い場合、
572 同じファイルディスクリプタを続けて read することで、文字列全体を読み出すこと
573 ができる。この際、実行中の SPU タスクによりレジスタ値の変更の影響は受けない。
574 文字列全体が読み出されると、それ以降の read 操作では 0 バイトが返され、
575 新しい値を読み出すには新しいファイルディスクリプタをオープンする必要がある。
580 .\"O operation on the file sets the register to the
581 .\"O value given in the string.
582 .\"O The string is parsed from the beginning
583 .\"O until the first non-numeric character or the end of the buffer.
584 .\"O Subsequent writes to the same file descriptor overwrite the
585 .\"O previous setting.
588 操作はレジスタ値を文字列で指定された値に設定する。
589 文字列の解釈は先頭から開始され、数字以外の文字が初めて登場するか、
591 同じファイルディスクリプタへ続けて write を行うと、
592 後の write により前の設定が上書きされる。
596 .\"O This file provides access to the Floating Point Status and
597 .\"O Control Register as a four-byte file.
598 .\"O The operations on the
601 このファイルにより Floating Point Status and Control Register に
602 アクセスできる。このファイルは大きさ 4 バイトである。
610 .\"O is smaller than four,
612 .\"O returns \-1 and sets
616 .\"O Otherwise, a four-byte value is placed in the data buffer;
617 .\"O this is the current value of the
628 それ以外の場合、データバッファに 4 バイトの値が書き込まれる。
636 .\"O is smaller than four,
638 .\"O returns \-1 and sets
642 .\"O Otherwise, a four-byte value is copied from the data buffer,
643 .\"O updating the value of the
654 それ以外の場合、 4 バイトの値がデータバッファからコピーされ、
659 .BR /signal1 ", " /signal2
660 .\"O The files provide access to the two signal notification channels
662 .\"O These are read-write files that operate on 32-bit words.
663 .\"O Writing to one of these files triggers an interrupt on the SPU.
664 .\"O The value written to the signal files can
665 .\"O be read from the SPU through a channel read or from
666 .\"O host user space through the file.
667 .\"O After the value has been read by the SPU, it is reset to zero.
668 .\"O The possible operations on an open
674 SPU の二つのシグナル通知チャネル (signal notification channel) に
676 これらは 32 ビット単位の読み書きができる。
677 これらのファイルの一つに書き込みを行うと、その SPU の割り込みが
679 シグナルファイルへ書き込まれた値は、チャネル経由で SPU で読み出したり、
680 このファイル経由でホストのユーザ空間で読み出したりできる。
681 SPU が値を読み出した後では、値は 0 にリセットされる。
692 .\"O is smaller than four,
694 .\"O returns \-1 and sets
698 .\"O Otherwise, a four-byte value is placed in the data buffer;
699 .\"O this is the current value of the specified signal notification
709 それ以外の場合、データバッファに 4 バイトの値が書き込まれる。
710 書き込まれる値は、指定されたシグナル通知レジスタの現在の値である。
715 .\"O is smaller than four,
717 .\"O returns \-1 and sets
721 .\"O Otherwise, a four-byte value is copied from the data buffer,
722 .\"O updating the value of the specified signal notification
732 それ以外の場合、 4 バイトの値がデータバッファからコピーされ、
733 指定されたシグナル通知レジスタの値が更新される。
734 .\"O The signal notification register will either be replaced with
735 .\"O the input data or will be updated to the bitwise OR operation
736 .\"O of the old value and the input data, depending on the contents
741 .\"O files respectively.
742 シグナル通知レジスタの更新には、レジスタ値を入力データで置き換えるモードと
743 以前の値と入力データのビット単位の OR をとった値に更新するモードがある。
750 .BR /signal1_type ", " /signal2_type
751 .\"O These two files change the behavior of the
755 .\"O notification files.
761 .\"O They contain a numerical
762 .\"O ASCII string which is read as either "1" or "0".
763 .\"O In mode 0 (overwrite), the hardware replaces the contents
764 .\"O of the signal channel with the data that is written to it.
765 .\"O In mode 1 (logical OR), the hardware accumulates the bits
766 .\"O that are subsequently written to it.
767 これらのファイルは数値を表すアスキー文字列を保持し、
768 読み出すと "1" か "0" のどちらかが得られる。
769 モード 0 (上書きモード) では、ハードウェアはシグナルチャネルの内容を
770 シグナルチャネルに書き込まれたデータで置き換える。
771 モード 1 (論理 OR モード) では、ハードウェアはシグナルチャネルに
773 .\"O The possible operations on an open
786 .\"O When the count supplied to the
788 .\"O call is shorter than the required length for the digit
789 .\"O plus a newline character, subsequent reads from the same
790 .\"O file descriptor will complete the string.
791 .\"O When a complete string has been read, all subsequent read operations
792 .\"O will return zero bytes and a new file descriptor needs to be opened
793 .\"O to read the value again.
797 がレジスタの数値と改行 (newline) 文字 1 個を格納するのに必要な長さより
798 短い場合、同じファイルディスクリプタを続けて read することで、
800 文字列全体が読み出されると、それ以降の read 操作では 0 バイトが返され、
801 新しい値を読み出すには新しいファイルディスクリプタをオープンする必要がある。
806 .\"O operation on the file sets the register to the
807 .\"O value given in the string.
808 .\"O The string is parsed from the beginning
809 .\"O until the first non-numeric character or the end of the buffer.
810 .\"O Subsequent writes to the same file descriptor overwrite the
811 .\"O previous setting.
814 操作はレジスタ値を文字列で指定された値に設定する。
815 文字列の解釈は先頭から開始され、数字以外の文字が初めて登場するか、
817 同じファイルディスクリプタへ続けて write を行うと、
818 後の write により前の設定が上書きされる。
823 .IR /etc/fstab " entry"
824 none /spu spufs gid=spu 0 0
826 .\" Arnd Bergmann <arndb@de.ibm.com>,
827 .\" Mark Nutter <mnutter@us.ibm.com> and
828 .\" Ulrich Weigand <Ulrich.Weigand@de.ibm.com>