Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src add a tpm driver from bsssd.sourceforge.net



details:   https://anonhg.NetBSD.org/src/rev/2da76bfa0b3c
branches:  trunk
changeset: 772946:2da76bfa0b3c
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 22 06:44:28 2012 +0000

description:
add a tpm driver from bsssd.sourceforge.net

diffstat:

 distrib/sets/lists/man/mi   |     6 +-
 doc/CHANGES                 |     4 +-
 etc/MAKEDEV.tmpl            |     9 +-
 share/man/man4/Makefile     |     6 +-
 share/man/man4/tpm.4        |    69 ++
 sys/arch/amd64/conf/GENERIC |    12 +-
 sys/arch/i386/conf/GENERIC  |    11 +-
 sys/conf/files              |     7 +-
 sys/conf/majors             |     4 +-
 sys/dev/acpi/files.acpi     |     6 +-
 sys/dev/acpi/itpm_acpi.c    |   324 ++++++++++++
 sys/dev/acpi/tpm_acpi.c     |   184 ++++++
 sys/dev/ic/tpm.c            |  1136 +++++++++++++++++++++++++++++++++++++++++++
 sys/dev/ic/tpmreg.h         |    98 +++
 sys/dev/ic/tpmvar.h         |    61 ++
 sys/dev/isa/files.isa       |     6 +-
 sys/dev/isa/tpm_isa.c       |   140 +++++
 17 files changed, 2067 insertions(+), 16 deletions(-)

diffs (truncated from 2302 to 300 lines):

diff -r 8118fffed02c -r 2da76bfa0b3c distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sun Jan 22 06:13:55 2012 +0000
+++ b/distrib/sets/lists/man/mi Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1371 2012/01/17 18:53:23 joerg Exp $
+# $NetBSD: mi,v 1.1372 2012/01/22 06:44:30 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1653,6 +1653,7 @@
 ./usr/share/man/cat4/tlphy.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/tm121temp.0               man-sys-catman          .cat
 ./usr/share/man/cat4/tp.0                      man-sys-catman          .cat
+./usr/share/man/cat4/tpm.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/tprof.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/tqphy.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/tr.0                      man-sys-catman          .cat
@@ -4438,7 +4439,7 @@
 ./usr/share/man/html4/tlp.html                 man-sys-htmlman         html
 ./usr/share/man/html4/tlphy.html               man-sys-htmlman         html
 ./usr/share/man/html4/tm121temp.html           man-sys-htmlman         html
-./usr/share/man/html4/tp.html                  man-sys-htmlman         html
+./usr/share/man/html4/tpm.html                 man-sys-htmlman         html
 ./usr/share/man/html4/tprof.html               man-sys-htmlman         html
 ./usr/share/man/html4/tqphy.html               man-sys-htmlman         html
 ./usr/share/man/html4/tr.html                  man-sys-htmlman         html
@@ -7148,6 +7149,7 @@
 ./usr/share/man/man4/tlphy.4                   man-sys-man             .man
 ./usr/share/man/man4/tm121temp.4               man-sys-man             .man
 ./usr/share/man/man4/tp.4                      man-sys-man             .man
+./usr/share/man/man4/tpm.4                     man-sys-man             .man
 ./usr/share/man/man4/tprof.4                   man-sys-man             .man
 ./usr/share/man/man4/tqphy.4                   man-sys-man             .man
 ./usr/share/man/man4/tr.4                      man-sys-man             .man
diff -r 8118fffed02c -r 2da76bfa0b3c doc/CHANGES
--- a/doc/CHANGES       Sun Jan 22 06:13:55 2012 +0000
+++ b/doc/CHANGES       Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.1650 $>
+# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.1651 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -1205,3 +1205,5 @@
        p5pb(4): DCE Computer G-REX 1200 and G-REX 4000 PCI bridges are now
                supported. [rkujawa 20120119]
        build.sh: Add live-image and install-image targets.  [tsutsui 20120122]
+       tpm(4):  Add a Trusted Computing Module driver from bsssd
+               [christos 20120122]
diff -r 8118fffed02c -r 2da76bfa0b3c etc/MAKEDEV.tmpl
--- a/etc/MAKEDEV.tmpl  Sun Jan 22 06:13:55 2012 +0000
+++ b/etc/MAKEDEV.tmpl  Sun Jan 22 06:44:28 2012 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#      $NetBSD: MAKEDEV.tmpl,v 1.149 2012/01/21 02:52:50 isaki Exp $
+#      $NetBSD: MAKEDEV.tmpl,v 1.150 2012/01/22 06:44:29 christos Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -291,6 +291,9 @@
 #
 # iSCSI communication devices
 #      iscsi*  iSCSI driver and /sbin/iscsid communication
+#
+# Trusted Computing devices
+#      tpm     Trusted Platform Module
 
 
 #
@@ -2058,6 +2061,10 @@
        esac
        ;;
 
+tpm)
+       mkdev tpm c %tpm_chr% 0 600
+       ;;
+
 fw[0-9]*)
        unit=${i#fw}
        for j in 0 1 2 3
diff -r 8118fffed02c -r 2da76bfa0b3c share/man/man4/Makefile
--- a/share/man/man4/Makefile   Sun Jan 22 06:13:55 2012 +0000
+++ b/share/man/man4/Makefile   Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.579 2012/01/17 07:04:08 mbalmer Exp $
+#      $NetBSD: Makefile,v 1.580 2012/01/22 06:44:31 christos Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -58,8 +58,8 @@
        st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \
        svwsata.4 swsensor.4 swwdog.4 sysmon.4 \
        tap.4 tc.4 tcds.4 tcp.4 termios.4 tfb.4 thinkpad.4 \
-       ti.4 tl.4 tlp.4 tlphy.4 \
-       tp.4 tprof.4 tr.4 tra.4 trm.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \
+       ti.4 tl.4 tlp.4 tlphy.4 tp.4 tpm.4 tprof.4 tr.4 tra.4 \
+       trm.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \
        uark.4 ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \
        vald.4 veriexec.4 vga.4 vge.4 viaide.4 video.4 vioif.4 viomb.4 virt.4 \
        virtio.4 vlan.4 vmmon.4 vmnet.4 vnd.4 vr.4 vte.4 \
diff -r 8118fffed02c -r 2da76bfa0b3c share/man/man4/tpm.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/tpm.4      Sun Jan 22 06:44:28 2012 +0000
@@ -0,0 +1,69 @@
+.\"    $OpenBSD:$
+.\"
+.\" Copyright (c) 2010 Hans-Jörg Höxer, <Hans-Joerg.Hoexer%genua.de@localhost>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate:$
+.Dt TPM 4
+.Os
+.Sh NAME
+.Nm tpm
+.Nd Trusted Platform Module
+.Sh SYNOPSIS
+.Cd "tpm* at isa? iomem 0xfed40000"
+.Cd "tpm* at isa? iomem 0xfed40000 irq 7"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for various trusted platfrom modules (TPM) that can
+store cryptographic keys. 
+.Pp
+Supported modules:
+.Pp
+.Bl -bullet -compact -offset indent
+.It
+Atmel 97SC3203
+.It
+Broadcom BCM0102
+.It
+Infineon IFX SLD 9630 TT 1.1 and IFX SLB 9635 TT 1.2
+.It
+Intel INTC0102
+.It
+Sinosun SNS SSX35
+.It
+STM ST19WP18
+.It
+Winbond WEC WPCT200
+.El
+.Pp
+The driver can be configured to use an IRQ by providing a free ISA
+interrupt vector using the keyword
+.Em irq
+in the kernel configuration file or using
+.Xr config 8 .
+If not IRQ is specified, the driver uses polling.
+This is the default configuration.
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr files.conf 5,
+.Xr config 8
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Michael Shalayeff
+and
+.An Hans-Joerg Hoexer .
diff -r 8118fffed02c -r 2da76bfa0b3c sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Sun Jan 22 06:13:55 2012 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.347 2012/01/17 18:11:28 veego Exp $
+# $NetBSD: GENERIC,v 1.348 2012/01/22 06:44:29 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.347 $"
+#ident                 "GENERIC-$Revision: 1.348 $"
 
 maxusers       64              # estimated number of users
 
@@ -311,6 +311,7 @@
 spic*          at acpi?                # Sony Programmable I/O Controller
 wsmouse*       at spic?                # mouse
 thinkpad*      at acpi?                # IBM/Lenovo Thinkpad hotkeys
+#tpm*          at acpi?                # ACPI TPM (Experimental)
 ug*            at acpi?                # Abit uGuru Hardware monitor
 wb*            at acpi?                # Winbond W83L518D SD/MMC reader
 sdmmc*         at wb?                  # SD/MMC bus
@@ -398,6 +399,13 @@
 hifn*  at pci? dev ? function ?        # Hifn 7755/7811/795x
 ubsec* at pci? dev ? function ?        # Broadcom 5501/5601/580x/582x
 
+# Trusted Platform Module
+tpm*   at isa? iomem 0xfed40000 irq 7
+#tpm*  at isa? port 0x02e
+#tpm*  at isa? port 0x04e 
+#tpm*  at isa? port 0x07e 
+#tpm*  at isa? port 0x0ee
+
 # Serial Devices
 
 # PCI serial interfaces
diff -r 8118fffed02c -r 2da76bfa0b3c sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Sun Jan 22 06:13:55 2012 +0000
+++ b/sys/arch/i386/conf/GENERIC        Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1065 2012/01/16 14:43:09 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.1066 2012/01/22 06:44:29 christos Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.1065 $"
+#ident                 "GENERIC-$Revision: 1.1066 $"
 
 maxusers       64              # estimated number of users
 
@@ -373,6 +373,7 @@
 pcppi*         at acpi?                # AT-style speaker sound
 sony*          at acpi?                # Sony Miscellaneous Controller
 thinkpad*      at acpi?                # IBM/Lenovo Thinkpad hotkeys
+#tpm*          at acpi?                # ACPI TPM (Experimental)
 ug*            at acpi?                # Abit uGuru Hardware monitor
 vald*          at acpi?                # Toshiba Libretto hotkeys
 wb*            at acpi?                # Winbond W83L518D SD/MMC reader
@@ -1508,6 +1509,12 @@
 hifn*  at pci? dev ? function ?        # Hifn 7755/7811/795x
 ubsec* at pci? dev ? function ?        # Broadcom 5501/5601/580x/582x
 
+# Trusted Platform Module
+tpm*   at isa? iomem 0xfed40000 irq 7
+#tpm*  at isa? port 0x02e
+#tpm*  at isa? port 0x04e 
+#tpm*  at isa? port 0x07e 
+#tpm*  at isa? port 0x0ee
 
 # Joysticks
 
diff -r 8118fffed02c -r 2da76bfa0b3c sys/conf/files
--- a/sys/conf/files    Sun Jan 22 06:13:55 2012 +0000
+++ b/sys/conf/files    Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files,v 1.1038 2012/01/19 16:35:24 drochner Exp $
+#      $NetBSD: files,v 1.1039 2012/01/22 06:44:30 christos Exp $
 #      @(#)files.newconf       7.5 (Berkeley) 5/10/93
 
 version        20100430
@@ -397,6 +397,10 @@
 define wlan
 define crypto
 
+# TPM
+device tpm
+file   dev/ic/tpm.c                    tpm                     needs-flag
+
 # devices ARPing IPv4 pull this in:
 #
 define arp
@@ -1084,6 +1088,7 @@
 include "external/bsd/drm/conf/files.drm"
 include "dev/drm/files.drm"
 
+
 # Definitions for wscons
 # device attributes: display, display with emulator, keyboard, and mouse
 #
diff -r 8118fffed02c -r 2da76bfa0b3c sys/conf/majors
--- a/sys/conf/majors   Sun Jan 22 06:13:55 2012 +0000
+++ b/sys/conf/majors   Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: majors,v 1.60 2011/11/19 16:41:56 agc Exp $
+# $NetBSD: majors,v 1.61 2012/01/22 06:44:30 christos Exp $
 #
 # Device majors for Machine-Independent drivers.
 #
@@ -49,4 +49,4 @@
 device-major iic       char 201            iic
 device-major filemon   char 202            filemon
 device-major iscsi     char 203            iscsi
-
+device-major tpm       char 204                   tpm
diff -r 8118fffed02c -r 2da76bfa0b3c sys/dev/acpi/files.acpi
--- a/sys/dev/acpi/files.acpi   Sun Jan 22 06:13:55 2012 +0000
+++ b/sys/dev/acpi/files.acpi   Sun Jan 22 06:44:28 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.acpi,v 1.92 2011/09/22 01:15:31 jakllsch Exp $



Home | Main Index | Thread Index | Old Index