]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - share/man/man4/isf.4
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / share / man / man4 / isf.4
1 .\"-
2 .\" Copyright (c) 2012 SRI International
3 .\" All rights reserved.
4 .\"
5 .\" This software was developed by SRI International and the University of
6 .\" Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
7 .\" ("CTSRD"), as part of the DARPA CRASH research programme.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\"    notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\"    notice, this list of conditions and the following disclaimer in the
16 .\"    documentation and/or other materials provided with the distribution.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\" $FreeBSD$
31 .\"
32 .Dd August 3, 2012
33 .Dt ISF 4
34 .Os
35 .Sh NAME
36 .Nm isf
37 .Nd driver for Intel StrataFlash NOR flash devices
38 .Sh SYNOPSIS
39 .Cd "device isf"
40 .Pp
41 In
42 .Pa /boot/device.hints :
43 .Cd hint.isf.0.at="nexus0"
44 .Cd hint.isf.0.maddr=0x74000000
45 .Cd hint.isf.0.msize=0x2000000
46 .Sh DESCRIPTION
47 The
48 .Nm
49 device driver provides support for Intel StrataFlash NOR flash devices.
50 Devices are presented as
51 .Xr disk 9
52 devices and read access is supported along with limited write support.
53 Erasing blocks is supported the
54 .Dv ISF_ERASE
55 ioctl.
56 .Pp
57 The erase block size of
58 .Nm
59 devices is 128K.
60 NOR flash blocks contains all 1's after an erase cycle.
61 Writes to
62 .Nm
63 devices are allowed to succeed if and only if they all bits in the write
64 block (512-bytes) remain the same or transition from 1 to 0.
65 .Sh HARDWARE
66 The current version of the
67 .Nm
68 driver is known to support the 64MB part found on the Altera DE4 board.
69 It attempts to support other StrataFlash parts documented in the
70 datasheet, but those are untested.
71 .Sh IOCTLS
72 The
73 .Nm device
74 supports the
75 .Xr ioctl 2
76 command codes:
77 .Bl -tag -width ISF_ERASE
78 .It Dv ISF_ERASE
79 Erase one or more blocks.
80 .Dv ISF_ERASE is defined as follows:
81 .Bd -literal
82         struct isf_range {
83                 off_t   ir_off;
84                 size_t  ir_size;
85         };
86
87         #define ISF_ERASE       _IOW('I', 1, struct isf_range)
88 .Ed
89 .Pp
90 The
91 .Li ir_off
92 member marks the beginning of the area to be erased and must fall on at 128K
93 boundary.
94 The
95 .Li ir_size
96 member indicates the size of the area to be erased and must a multiple
97 of 128K.
98 .El
99 .Sh SEE ALSO
100 .Xr isfctl 4 ,
101 .Xr disk 9
102 .Rs
103 .%T Intel StrataFlash Embedded Memory (P30)
104 .%D November 1, 2005
105 .%I Intel Corporation
106 .%U http://www.xilinx.com/products/boards/ml505/datasheets/30666604.pdf
107 .Re
108 .Sh HISTORY
109 The
110 .Nm
111 device driver first appeared in
112 .Fx 10.0 .
113 .Sh AUTHORS
114 The
115 .Nm
116 device driver and this manual page were
117 developed by SRI International and the University of Cambridge Computer
118 Laboratory under DARPA/AFRL contract
119 .Pq FA8750-10-C-0237
120 .Pq Do CTSRD Dc ,
121 as part of the DARPA CRASH research programme.
122 .Sh BUGS
123 While an erase is in progress, all read and write operations return
124 .Er EBUSY .
125 In principle, reads could be allowed outside the programming region the
126 blocked currently being erased resides in and writes could be allowed by
127 suspending the erase, but neither of these is currently implemented.
128 .Pp
129 Depending on the flash part ether the top or bottom 128K of the flash
130 address space is divided into 4 32K erase blocks.
131 The
132 .Nm
133 driver hides this from the user requiring that all erase requests be
134 multiples of 128K in size and erasing the individual blocks as needed at
135 the top or bottom.