Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/share/man/man4/man4.i386 Make the examples fit into 8...
details: https://anonhg.NetBSD.org/src/rev/11928d7f5d0a
branches: uebayasi-xip
changeset: 751669:11928d7f5d0a
user: jruoho <jruoho%NetBSD.org@localhost>
date: Wed Apr 21 02:59:30 2010 +0000
description:
Make the examples fit into 80 columns. Use .Tn.
diffstat:
share/man/man4/man4.i386/cmos.4 | 129 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 129 insertions(+), 0 deletions(-)
diffs (133 lines):
diff -r 61c5e145fcae -r 11928d7f5d0a share/man/man4/man4.i386/cmos.4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/man4.i386/cmos.4 Wed Apr 21 02:59:30 2010 +0000
@@ -0,0 +1,129 @@
+.\" $NetBSD: cmos.4,v 1.7.2.2 2010/04/21 02:59:30 jruoho Exp $
+.\"
+.\" Copyright (c) 2007 David Young. All rights reserved.
+.\"
+.\" This manual page was written by David Young.
+.\"
+.\" Redistribution and use in source and binary forms, with or
+.\" without modification, are permitted provided that the following
+.\" conditions are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above
+.\" copyright notice, this list of conditions and the following
+.\" disclaimer in the documentation and/or other materials
+.\" provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY DAVID YOUNG ``AS IS'' AND ANY
+.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+.\" THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+.\" PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID
+.\" YOUNG BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+.\" EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+.\" TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd April 21, 2010
+.Dt CMOS 4 i386
+.Os
+.Sh NAME
+.Nm cmos
+.Nd Read/write access to IBM PC/AT CMOS RAM
+.Sh SYNOPSIS
+.Cd pseudo-device cmos
+.Sh DESCRIPTION
+The
+.Nm
+pseudo-device can be used to read the real-time clock and
+.Tn ISA
+configuration data from an ISA-compatible
+.Tn CMOS
+.Tn RAM ,
+and to write the
+.Tn ISA
+configuration data.
+.Pp
+A program reads between 0 and 48 bytes from the
+.Tn CMOS
+.Tn RAM , starting at
+byte 0 of the
+.Tn RAM ,
+using a single call to
+.Xr read 2 .
+Likewise, a program writes between 0 and 48 bytes to the CMOS RAM,
+starting at byte 0 of the RAM, using a single call to
+.Xr write 2 .
+.Pp
+.Nm
+does not allow programs to overwrite the real-time clock data
+(bytes 0 through 9), the status registers (10 through 13),
+the diagnostic status or
+.Tn CMOS
+shutdown status (bytes 14 and 15),
+or the
+.Tn CMOS
+checksum (bytes 46 and 47).
+Writes to those bytes are ignored.
+.Pp
+On writes,
+.Nm
+recomputes the
+.Tn CMOS
+checksum and writes it to the
+.Tn CMOS
+.Tn RAM .
+.Sh EXAMPLES
+Display entire contents of CMOS RAM:
+.Bd -literal -offset 2n
+# dd if=/dev/cmos bs=48 count=1 | od -t x1
+0000000 37 00 09 00 22 00 06 13 04 80 26 02 50 80 00 00
+0000020 00 51 f0 00 01 80 02 00 fc 0f 2f 00 00 00 00 00
+0000040 00 80 81 f0 ff 00 00 00 00 00 00 00 00 00 05 ee
+0000060
+.Ed
+.Pp
+Change boot order on Soekris net4521 to
+.Tn PXE
+.Tn ROM ,
+Primary
+.Tn HDD ,
+Secondary
+.Tn HDD :
+.Bd -literal -offset 2n
+# dd if=/dev/cmos of=/tmp/cmos0 bs=48 count=1
+1+0 records in
+1+0 records out
+48 bytes transferred in 0.001 secs (48000 bytes/sec)
+# cp /tmp/cmos0 /tmp/cmos
+# printf '\exf0\ex80\ex81\exff' | dd bs=1 seek=33 conv=notrunc of=/tmp/cmos
+4+0 records in
+4+0 records out
+4 bytes transferred in 0.001 secs (4000 bytes/sec)
+# dd if=/tmp/cmos of=/dev/cmos
+0+1 records in
+0+1 records out
+48 bytes transferred in 0.001 secs (48000 bytes/sec)
+.Ed
+.Sh ERRORS
+A program can read or write no more than 48 bytes to
+.Nm .
+Both
+.Xr read 2
+and
+.Xr write 2
+will return
+.Er EINVAL
+if more than 48 bytes are read or written at once.
+.Sh AUTHORS
+The original
+.Nm
+driver was written by
+.An Takahiro Kambe Aq taca%back-street.net@localhost .
+.An David Young Aq dyoung%NetBSD.org@localhost
+modified the original and added it to
+.Nx .
+.\" .Sh BUGS
Home |
Main Index |
Thread Index |
Old Index