|
|
1.1 root 1: NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE!
2:
3: /dev/bios is obsolete and no longer under development. Please adapt all
4: changes to the "flashrom" utility of LinuxBIOS. This utility can be found
5: at LinuxBIOSv2/utils/flashrom in the LinuxBIOS v2 repository. LinuxBIOS
6: is available at http://www.linuxbios.org/
7:
8: I'm also looking for volunteers to port all features available in /dev/bios
9: to flashrom so /dev/bios can be dropped from the OpenBIOS tree. These features
10: include
11:
12: - block information about flash chips
13: - block wise writing of flash chips
14: - lots of supported flash chips and vendors.
15:
16: If you have questions, contact Stefan Reinauer <[email protected]>
17:
18: NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE!
19:
20:
21: /dev/bios documentation 2002/02/19
22:
23: Table of contents
24: ------------------
25:
26: 1. What is /dev/bios?
27: 2. What hardware/software do I need to run /dev/bios?
28: 3. Where to get the latest release of /dev/bios
29: 4. How to get /dev/bios work
30: 5. Writing to the devices
31: 6. About PCI chipsets (ix86 only)
32: 7. About APM Powermanagement (ix86 only)
33: 8. About different flashchips.
34: 9. Hints for BIOS flashing
35:
36: If you want better information on this driver, read the ChangeLog,
37: mail me or read the source, Luke :-)
38:
39: 1. What is /dev/bios?
40: ----------------------
41:
42: This is a kernel driver for different kinds of (Flash)BIOSs that are
43: available in today's hardware.
44:
45: There are well known BIOSs for
46: - System BIOS (resides at 0xe0000 on Intel PCs)
47: - graphics hardware
48: - SCSI host adapters
49: - networking interfaces with 'BOOT ROM'
50: - ...
51:
52: While in former times these BIOSs were implemented by using ROM or
53: EPROM (both can't be updated without opening your computer) today's
54: PC hardware is often delivered with so called FLASH ROMs. These
55: can simply be updated by software. This driver has the approach to
56: make Linux read and write flash roms.
57:
58: One word before you read ahead: This is still alpha software and
59: writing to your flash roms may destroy them. So if you notice anything
60: strange, don't even think about going on, but write some mail to:
61:
62: Stefan Reinauer <[email protected]>
63:
64: Please note that I am not responsible in any way for what you
65: do with this code or for what this code does with your computer.
66:
67: 2. What hardware/software do I need to run /dev/bios?
68: ------------------------------------------------------
69:
70: Currently this driver supports ix86 (mainly Pentium,
71: PPro, PII/III, Athlon, but some 486s), Itanium and Alpha
72: architecture.
73: It supports all flash chips from 32k to 2M (theoretically).
74: Minimum kernel version is v2.2.x, but it's wise to use a
75: 2.4.x kernel.
76:
77: 3. Where to get the latest release of /dev/bios?
78: -------------------------------------------------
79:
80: /dev/bios was recently integrated into the OpenBIOS CVS
81: tree for easier maintainance. General information can be
82: found on the /dev/bios status page:
83: http://www.freiburg.linux.de/OpenBIOS/status/devbios.html
84: Latest releases of /dev/bios can be found at the download page:
85: http://www.freiburg.linux.de/OpenBIOS/dev/download.html
86: Latest development trees of /dev/bios can be found in the
87: OpenBIOS CVS. For information how to access it, go to
88: http://www.freiburg.linux.de/OpenBIOS/dev/cvs.html
89:
90: 4. How do I get /dev/bios work
91: -------------------------------
92:
93: Create the system bios device with
94:
95: mknod /dev/bios c 104 0
96:
97: Now you can add devices for the other BIOSs (often known as option
98: roms) in your Computer, i.e. like this:
99:
100: mknod /dev/gfxbios c 104 1
101: mknod /dev/hddbios c 104 2
102: mknod /dev/netbios c 104 3
103:
104: The order of the devices may vary on your computer, maybe you even don't
105: have a flash bios on your network card or on your scsi host adapter. You will
106: have to decide this after playing around a bit.
107:
108: Now you have to compile and insert the kernel driver module:
109:
110: cd devbios
111: make clean && make
112: insmod bios.o
113:
114: Now you have a new device, /dev/bios and, if you have
115: your kernel configured to have the /proc/ interface,
116: you have a status file /proc/bios.
117:
118: Since this driver is in an early state, you should have
119: a look at dmesg very often.
120:
121: 5. Writing to the devices
122: --------------------------
123:
124: If you insert bios.o without any options, you are not able
125: to write any of the devices. To enable writing, you should
126: use
127: insmod bios.o write=1
128:
129: Writing is now possible with i.e.
130: dd if=yourbios.bin of=/dev/bios bs=128k count=1
131: or
132: dd if=yourbios.bin of=/dev/bios bs=256k count=1
133:
134: depending on the size of your flash chip.
135:
136: You can use 'cat' for flashing as well. Note: Many flashchips are
137: sectored and the whole sector has to be rewritten, the 4k clusters
138: of cat may be very slow (and an 112 kb sector has to be written 28
139: times completely instead of 1 time with dd)
140:
141: Make sure that your file "yourbios.bin" is a valid bios image for
142: your motherboard and that it is not pkzipped or exe-pkzipped.
143: (Usually, a 128kb bios images consist of 112kb lha-compressed data,
144: 2*4kb ESCD and DMI (PnP) Data and an 8 kb emergency boot block.)
145:
146: Writing to /dev/bios does not work for many chips right now. Write
147: accesses are ignored in this case. If you want an unsupported flash
148: rom supported, please mail me.
149: WARNING: Setting an unsupported chip to "supported" without changing
150: the rest of the code will *very likely* destroy the contents of your
151: chip.
152:
153: On machines with an AWARD bios you can test whether writing works
154: safely by only deleting the ESCD/DMI memory on the flash chip.
155: This data is rewritten by the bios when empty, corrupted or when
156: you put in a new expansion device. In that case you should see a
157: message stating "Updating ESCD" during the next boot.
158:
159: Please have a close look at the size of your flash chip. For 128k
160: flash chips, try
161:
162: dd if=/dev/zero of=/dev/bios bs=4096 seek=28 count=2
163:
164: For 256k flash chips, you _MUST_ use the following line instead,
165: or your system bios is going byebye:
166:
167: dd if=/dev/zero of=/dev/bios bs=4096 seek=56 count=2
168:
169: Attention: I found other machines with their ESCD memory in the
170: first sectors of the flash chip. These are afaics 512k+ chips
171: often connected via a firmware hub.
172: Behaviour of other BIOSs may be similar, but I can't give you
173: any warranty it works.
174:
175: NOTE: If you listen to music from your soundcard while flashing,
176: you may get errors like this:
177: Sound: DMA (output) timed out - IRQ/DRQ config error?
178:
179: Second, sound switches off while flashing. This is because all
180: IRQs are blocked while the write procedure to ensure it doesn't
181: get disturbed by any other hardware.
182:
183: 6. About PCI chipsets
184: ----------------------
185:
186: Because this driver uses direct PCI accesses to switch shadowing
187: and write protection of the bios off on PC architecture, each PCI
188: chipset (or at least chipset group) has to be implemented and
189: tested seperately. Successfully tested PCI chipsets are
190:
191: * Intel 430HX/TX, 440BX/ZX, 460, 8x0
192: * UMC 486 (8881F/8886A)
193: * VIA (M)VP3
194: * AMD Irongate and others
195: * ServerWorks chipsets
196: * NSC CS5530 (geode companion)
197:
198: Any success/error reports are highly welcome. If you need a certain
199: system type supported, contact me.
200:
201:
202: 7. About APM Power Management (ix86 only)
203: ------------------------------------------
204:
205: This driver is known to cause kernel oopses with some of the chipset
206: drivers when APM is enabled. Reason is that the flash chip is mapped
207: to the low bios address space which makes the unpacked bios image vanish
208: so all pointers to APM functions are invalid.
209: Nowadays most of the chipset drivers only map the high bios area, so
210: this problem should not occur on any but old UMC/SiS chipsets. If you
211: encounter oopses while reading/probing flash devices, disable power
212: management before any write attempts. To achieve so, please pass "apm=off"
213: as a kernel option, if your kernel is compiled with APM support.
214:
215:
216:
217: 8. About different flashchips
218: ------------------------------
219:
220: Flash chips, /dev/bios has been successfully tested (writing) on:
221:
222: * Winbond 29EE011
223: * Intel 28F008(SA)
224: * Atmel AT29C512
225: * SST 29EE010, 39SF020
226:
227: It *should* work, if you see a "Supported: yes" in /proc/bios, but
228: I am not responsible in any way for what you do.. Please be careful.
229: Please report any working flash chips so that this list can be completed.
230: Currently many more flash chips than mentioned here will work.
231: If you need a certain flash device supported, contact me.
232:
233: 9. Hints for BIOS-Flashing
234: ---------------------------
235:
236: * Always try to write to the ESCD/DMI Memory before you overwrite the rest
237: of a bios (ix86) If you get ANY errors in dmesg output, DO NOT CONTINUE!
238: * Always "diff" the new bios with the written image before rebooting
239: * You may use comp, a little utility in the devbios source tree instead
240: of diff. It has a nicer output for binary files.
241: * on Intel, only write the first 120k of an image to the System ROM, this keeps
242: the emergency bootblock working.
243:
244: ************** FINAL NOTE *****************************
245:
246: If you want to help this project, send me
247:
248: * /proc/bios-output
249: * dmesg-output (after insmodding the driver)
250: * your system-configuration
251: (e.g. output of lspci or /proc/bus/pci/devices)
252: * any comments
253: * any ideas
254:
255: Stefan Reinauer <[email protected]>
256:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.