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
35 spufs \- SPU ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à
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 ¶¦Í¥á¥â¥ê¤ä¥á¥Ã¥»¡¼¥¸¥¥å¡¼¤Ë
52 »÷¤¿Ì¾Á°¶õ´Ö¤¬Ä󶡤µ¤ì¤ë¡£
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 ¥³¥ó¥Æ¥¥¹¥È¤Ï¡¢¤¢¤é¤«¤¸¤áÄêµÁ¤µ¤ì¤¿¥Õ¥¡¥¤¥ë·²¤ò´Þ¤à
64 ¥Ç¥£¥ì¥¯¥È¥ê¤È¤·¤Æɽ¸½¤µ¤ì¤ë¡£
65 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò»È¤Ã¤Æ¡¢ÏÀÍý SPU ¤Î¾õÂÖ¤òÁàºî¤Ç¤¤ë¡£
66 ¥æ¡¼¥¶¤Ï¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹µö²Ä¤òÊѹ¹¤¹¤ë¤³¤È¤Ï¤Ç¤¤ë¤¬¡¢
67 ¥Õ¥¡¥¤¥ë¤ÎÄɲᦺï½ü¤ò¹Ô¤¦¤³¤È¤Ï¤Ç¤¤Ê¤¤¡£
68 .\"O .SS Mount Options
69 .SS ¥Þ¥¦¥ó¥È¥ª¥×¥·¥ç¥ó
72 .\"O set the user owning the mount point; the default is 0 (root).
73 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ò½êͤ¹¤ë¥æ¡¼¥¶¤òÀßÄꤹ¤ë¡£
74 ¥Ç¥Õ¥©¥ë¥È¤Ï 0 (root) ¤Ç¤¢¤ë¡£
77 .\"O set the group owning the mount point; the default is 0 (root).
78 ¥Þ¥¦¥ó¥È¥Ý¥¤¥ó¥È¤ò½êͤ¹¤ë¥°¥ë¡¼¥×¤òÀßÄꤹ¤ë¡£
79 ¥Ç¥Õ¥©¥ë¥È¤Ï 0 (root) ¤Ç¤¢¤ë¡£
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.
94 ¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢¤Û¤È¤ó¤É¤Î¾ì¹ç
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
113 Áàºî¤ËÂбþ¤·¤Æ¤¤¤ëÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï
115 ¤Ë¤âÂбþ¤·¤Æ¤¤¤ë¡£¤Þ¤¿¡¢
117 Áàºî¤ËÂбþ¤·¤Æ¤¤¤ëÁ´¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ï
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
138 ·Ï¤ÎÁàºî¤ËÂбþ¤·¤Æ¤¤¤ë¤¬¡¢
140 ¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿ºÝ¤ËÊÖ¤µ¤ì¤ë
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)
161 ¤ÎÁàºî¤ËÂбþ¤·¤Æ¤¤¤ë¤¬¡¢
162 ¤½¤Î¥Õ¥¡¥¤¥ë¤¬Âбþ¤·¤Æ¤¤¤ëÁàºî¤ÈÌ·½â¤¹¤ë¥¢¥¯¥»¥¹µö²Ä¤ò
163 ÉÕÍ¿¤¹¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤ (Î㤨¤Ð¡¢
165 ¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ëÆɤ߽Ф·¥¢¥¯¥»¥¹¤Ê¤É)¡£
167 .\"O The current set of files is:
168 ¸½»þÅÀ¤Ç¤Î¥Õ¥¡¥¤¥ë¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
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
178 SPU ¤Î¥í¡¼¥«¥ë¥¹¥È¥ì¡¼¥¸¤ÎÆâÍÆ¡£
179 ¤³¤Î¥Õ¥¡¥¤¥ë¤ÏÄ̾ï¤Î¶¦Í¥á¥â¥ê¥Õ¥¡¥¤¥ë¤ÈƱÍͤ˥¢¥¯¥»¥¹¤Ç¤¡¢
180 SPU ¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¤Ï¥³¡¼¥É¤È¥Ç¡¼¥¿¤ÎξÊý¤ò³ÊǼ¤Ç¤¤ë¡£
183 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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.
195 ¤³¤ì¤é¤ÏÄ̾ïÄ̤êÆ°ºî¤¹¤ë¤¬¡¢
196 ¥Õ¥¡¥¤¥ëËöÈø¤ò±Û¤¨¤Æ¤Î
200 ¤ËÂбþ¤·¤Æ¤¤¤Ê¤¤ÅÀ¤À¤±¤¬°Û¤Ê¤ë¡£
201 ¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤Ï SPU ¤Î¥í¡¼¥«¥ë¥¹¥È¥ì¡¼¥¸¤Î¥µ¥¤¥º¤Ç¤¢¤ê¡¢
202 Ä̾ï¤Ï 256 ¥¥í¥Ð¥¤¥È¤Ç¤¢¤ë¡£
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 ¤ò¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Ë¥Þ¥Ã¥Ô¥ó¥°¤¹¤ë¤È¡¢
214 ¥×¥í¥»¥¹¤Î¥¢¥É¥ì¥¹¶õ´Ö¤Î°ìÉô¤È¤·¤Æ
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) ¤¹¤ë¤³¤È¤Ï¤Ê¤¤¡£
236 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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.
257 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
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 ¤äƱÍͤΥ·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È¤Ã¤Æ¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤ò´Æ»ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£
288 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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
308 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
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 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç¤Ç¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬
332 ¤Ê¤·¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢
333 SPU ¤¬¼«Ê¬¤Î³ä¤ê¹þ¤ß¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¥Á¥ã¥Í¥ë (interrupt mailbox channel)
336 ¤ÏÄä»ß (block) ¤¹¤ë¡£
337 ¥Ç¡¼¥¿¤ÎÆɤ߽Ф·¤ËÀ®¸ù¤·¤¿¾ì¹ç¡¢
338 4 ¥Ð¥¤¥È¤¬¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë³ÊǼ¤µ¤ì¡¢ÊÖ¤êÃͤȤ·¤Æ 4 ¤¬ÊÖ¤µ¤ì¤ë¡£
344 .\"O .I "(POLLIN | POLLRDNORM)"
345 .\"O whenever data is available for reading.
349 ¤Ï¡¢Æɤ߽Ф·¥Ç¡¼¥¿¤¬ÍøÍѲÄǽ¤Ë¤Ê¤ëÅÙ¤Ë
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¥Ó¥Ã¥Èñ°Ì¤Ç¹Ô¤¦¡£
367 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤¬°ìÇդξì¹ç¡¢
371 ¤ò»È¤Ã¤Æ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤ËºÆÅÙ¶õ¤¤¬¤Ç¤¤ë¤Þ¤ÇÂԤĤ³¤È¤¬¤Ç¤¤ë¡£
374 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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
395 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
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 ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¶õ¤Îΰ褬¤Ê¤¤¾ì¹ç¤Ç¡¢¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬
419 ¤Ê¤·¤Ç¥ª¡¼¥×¥ó¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢
420 SPU ¤¬¼«Ê¬¤Î PPE ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¥Á¥ã¥Í¥ë¤«¤éÆɤ߽Ф·¤ò¹Ô¤¦¤Þ¤Ç
422 ¤ÏÄä»ß (block) ¤¹¤ë¡£
423 ¥Ç¡¼¥¿¤Î½ñ¤¹þ¤ß¤ËÀ®¸ù¤·¤¿¾ì¹ç¡¢ÊÖ¤êÃͤȤ·¤Æ 4 ¤¬ÊÖ¤µ¤ì¤ë¡£
429 .\"O .I "(POLLOUT | POLLWRNORM)"
430 .\"O whenever space is available for writing.
434 ¤Ï¡¢½ñ¤¹þ¤ßÍѤζõ´Ö¤¬ÍøÍѲÄǽ¤Ë¤Ê¤ëÅÙ¤Ë
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
451 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ÏÆɤ߽Ф·ÀìÍѤǡ¢
452 ³Æ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Î¸½ºß¤Î¥¥å¡¼Ä¹¤òÊÝ»ý¤¹¤ë¡£
453 ¶ñÂÎŪ¤Ë¤Ï¡¢Ää»ß (blocking) ¤»¤º¤Ë¡¢
455 ¤«¤é²¿¥ï¡¼¥É¤òÆɤ߽Ф¹¤³¤È¤¬¤Ç¤¡¢
457 ¤Ë²¿¥ï¡¼¥É¤ò½ñ¤¹þ¤à¤³¤È¤¬¤Ç¤¤ë¤«¡¢¤È¤¤¤¦¤³¤È¤Ç¤¢¤ë¡£
458 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï 4 ¥Ð¥¤¥Èñ°Ì¤Ç¤Î¤ßÆɤ߽Ф·¤¬²Äǽ¤Ç¡¢
459 ¥Ó¥Ã¥°¡¦¥¨¥ó¥Ç¥£¥¢¥ó¤ÎÀ°¿ôÃͤòÊÖ¤¹¡£
462 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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
485 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
492 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë 4 ¥Ð¥¤¥È¤ÎÃͤ¬½ñ¤¹þ¤Þ¤ì¤ë¡£
493 ¤³¤ÎÃͤϡ¢³Æ¥á¡¼¥ë¥Ü¥Ã¥¯¥¹¤Ë¤ª¤¤¤ÆÄä»ß¤»¤º¤Ë¡¢¤Þ¤¿¤Ï
495 ¥¨¥é¡¼¤Ê¤·¤Ç¡¢Æɤ߽Ф·²Äǽ¤Ê¥¨¥ì¥á¥ó¥È¿ô
499 ¤Î¾ì¹ç)¡¢½ñ¤¹þ¤ß²Äǽ¤Ê¥¨¥ì¥á¥ó¥È¿ô
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 ¥×¥í¥°¥é¥à¤ÎÄ̾ï¤ÎÁàºî¤Ï¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë°Í¸¤¹¤Ù¤¤Ç¤Ï¤Ê¤¤¡£
518 ¤Ê¤¼¤Ê¤é¡¢¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î¤¦¤Á
520 °Ê³°¤Ø¤Î¥¢¥¯¥»¥¹¤Ç¤Ï SPU ¥³¥ó¥Æ¥¥¹¥È¤ÎÊݸ¤¬É¬¿Ü¤Ç¤¢¤ê¡¢
521 SPU ¥³¥ó¥Æ¥¥¹¥È¤ÎÊݸ¤ÏÈó¾ï¤Ë¸úΨ¤¬°¤¤¤«¤é¤Ç¤¢¤ë¡£
523 .\"O The contents of these files are:
524 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤϰʲ¼¤ÎÄ̤ꡣ
528 .\"O Next Program Counter
529 ¼¡¤Î¥×¥í¥°¥é¥à¥«¥¦¥ó¥¿
536 .\"O Decrementer Status
540 .\"O MFC tag mask for SPU DMA
541 SPU ¤Î DMA ÍѤΠMFA ¥¿¥°¥Þ¥¹¥¯
544 .\"O Event mask for SPU interrupts
545 SPU ¤Î³ä¤ê¹þ¤ß¤Î¥¤¥Ù¥ó¥È¥Þ¥¹¥¯
548 .\"O Interrupt Return address register
549 ³ä¤ê¹þ¤ß¥ê¥¿¡¼¥ó¥¢¥É¥ì¥¹¥ì¥¸¥¹¥¿
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 ʸ»úÎó¤Î²ò¼á¤ÏÀèƬ¤«¤é³«»Ï¤µ¤ì¡¢¿ô»ú°Ê³°¤Îʸ»ú¤¬½é¤á¤ÆÅо줹¤ë¤«¡¢
590 ¥Ð¥Ã¥Õ¥¡¤ÎËöÈø¤Ë㤹¤ë¤Þ¤Ç¹Ô¤ï¤ì¤ë¡£
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 ¥Ð¥¤¥È¤Ç¤¢¤ë¡£
604 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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
621 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
628 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤Ë 4 ¥Ð¥¤¥È¤ÎÃͤ¬½ñ¤¹þ¤Þ¤ì¤ë¡£
631 ¥ì¥¸¥¹¥¿¤Î¸½ºß¤ÎÃͤǤ¢¤ë¡£
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
647 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
654 ¤½¤ì°Ê³°¤Î¾ì¹ç¡¢ 4 ¥Ð¥¤¥È¤ÎÃͤ¬¥Ç¡¼¥¿¥Ð¥Ã¥Õ¥¡¤«¤é¥³¥Ô¡¼¤µ¤ì¡¢
656 ¥ì¥¸¥¹¥¿¤ÎÃͤ¬¹¹¿·¤µ¤ì¤ë¡£
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
673 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë¤è¤ê
674 SPU ¤ÎÆó¤Ä¤Î¥·¥°¥Ê¥ëÄÌÃÎ¥Á¥ã¥Í¥ë (signal notification channel) ¤Ë
676 ¤³¤ì¤é¤Ï 32 ¥Ó¥Ã¥Èñ°Ì¤ÎÆɤ߽ñ¤¤¬¤Ç¤¤ë¡£
677 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Î°ì¤Ä¤Ë½ñ¤¹þ¤ß¤ò¹Ô¤¦¤È¡¢¤½¤Î SPU ¤Î³ä¤ê¹þ¤ß¤¬
678 ȯÀ¸¤¹¤ë¥È¥ê¥¬¡¼¤È¤Ê¤ë¡£
679 ¥·¥°¥Ê¥ë¥Õ¥¡¥¤¥ë¤Ø½ñ¤¹þ¤Þ¤ì¤¿Ãͤϡ¢¥Á¥ã¥Í¥ë·Ðͳ¤Ç SPU ¤ÇÆɤ߽Ф·¤¿¤ê¡¢
680 ¤³¤Î¥Õ¥¡¥¤¥ë·Ðͳ¤Ç¥Û¥¹¥È¤Î¥æ¡¼¥¶¶õ´Ö¤ÇÆɤ߽Ф·¤¿¤ê¤Ç¤¤ë¡£
681 SPU ¤¬ÃͤòÆɤ߽Ф·¤¿¸å¤Ç¤Ï¡¢ÃÍ¤Ï 0 ¤Ë¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
686 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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
702 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
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
725 ¤¬ 4 ¤è¤ê¾®¤µ¤¤¾ì¹ç¡¢
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 ¤ò¤È¤Ã¤¿Ãͤ˹¹¿·¤¹¤ë¥â¡¼¥É¤¬¤¢¤ë¡£
744 ¤É¤Á¤é¤Î¥â¡¼¥É¤Ë¤Ê¤ë¤«¤Ï¡¢¤½¤ì¤¾¤ì
747 ¥Õ¥¡¥¤¥ë¤ÎÆâÍƤˤè¤Ã¤Æ·è¤Þ¤ë¡£
750 .BR /signal1_type ", " /signal2_type
751 .\"O These two files change the behavior of the
755 .\"O notification files.
756 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢¥·¥°¥Ê¥ëÄÌÃÎ¥Õ¥¡¥¤¥ë
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 ¥â¡¼¥É) ¤Ç¤Ï¡¢¥Ï¡¼¥É¥¦¥§¥¢¤Ï¥·¥°¥Ê¥ë¥Á¥ã¥Í¥ë¤Ë
772 ½ñ¤¹þ¤Þ¤ì¤¿¥Ó¥Ã¥È¤òÀÑ»»¤·¤Æ¤¤¤¯¡£
773 .\"O The possible operations on an open
782 ¥Õ¥¡¥¤¥ë¤Ë²Äǽ¤ÊÁàºî¤Ï°Ê²¼¤Ç¤¢¤ë¡£
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 ¤¹¤ë¤³¤È¤Ç¡¢
799 ʸ»úÎóÁ´ÂΤòÆɤ߽Ф¹¤³¤È¤¬¤Ç¤¤ë¡£
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 ʸ»úÎó¤Î²ò¼á¤ÏÀèƬ¤«¤é³«»Ï¤µ¤ì¡¢¿ô»ú°Ê³°¤Îʸ»ú¤¬½é¤á¤ÆÅо줹¤ë¤«¡¢
816 ¥Ð¥Ã¥Õ¥¡¤ÎËöÈø¤Ë㤹¤ë¤Þ¤Ç¹Ô¤ï¤ì¤ë¡£
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>