summaryrefslogtreecommitdiffstats
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-12-14 01:50:42 +0000
committerderaadt <deraadt@openbsd.org>2004-12-14 01:50:42 +0000
commit8b29105909e955dca8bbb0c6ff66b06dd76afbd7 (patch)
tree6213792efe243e1ebb3e46a71c00fdde4e9a669b /sys/dev/microcode
parentcleaner error handling on connection setup and in case of connection (diff)
txp(4) late firmware loading, written somewhere over the pacific, tested
by mcbride, reduces size of the kernel
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r--sys/dev/microcode/typhoon/3c990-license31
-rw-r--r--sys/dev/microcode/typhoon/Makefile27
-rw-r--r--sys/dev/microcode/typhoon/build.c38
3 files changed, 96 insertions, 0 deletions
diff --git a/sys/dev/microcode/typhoon/3c990-license b/sys/dev/microcode/typhoon/3c990-license
new file mode 100644
index 00000000000..5dbbdc27fe8
--- /dev/null
+++ b/sys/dev/microcode/typhoon/3c990-license
@@ -0,0 +1,31 @@
+ * Copyright 1999-2002 3Com Corporation. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms of the 3CR990img.h microcode
+ * software are permitted provided that the following conditions are met:
+ * 1. Redistribution of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistribution 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.
+ * 3. The name of 3Com may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY 3COM ``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 THE AUTHOR 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.
+ *
+ * USER ACKNOWLEDGES AND AGREES THAT PURCHASE OR USE OF THE 3CR990img.h MICROCODE
+ * SOFTWARE WILL NOT CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION,
+ * ESTOPPEL, OR OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT,
+ * TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN ANY OTHER
+ * 3COM HARDWARE OR SOFTWARE EITHER SOLELY OR IN COMBINATION WITH THE 3CR990img.h
+ * microcode SOFTWARE
+
+This license applies to the 3c990 firmware for the Typhoon adapters.
diff --git a/sys/dev/microcode/typhoon/Makefile b/sys/dev/microcode/typhoon/Makefile
new file mode 100644
index 00000000000..78e5618ec43
--- /dev/null
+++ b/sys/dev/microcode/typhoon/Makefile
@@ -0,0 +1,27 @@
+# $OpenBSD: Makefile,v 1.1 2004/12/14 01:50:42 deraadt Exp $
+
+NOPROG=
+NOMAN=
+
+# PCI capable systems only
+.if (${MACHINE} == "i386") || (${MACHINE} == "amd64") || \
+ (${MACHINE} == "alpha") || (${MACHINE} == "sparc64") || \
+ (${MACHINE_ARCH} == "powerpc") || (${MACHINE} == "cats") || \
+ (${MACHINE} == "hppa") || (${MACHINE} == "sgi")
+
+FIRM= 3c990
+
+CLEANFILES+= build
+
+all: build
+ ${.OBJDIR}/build
+
+afterinstall:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${FIRM} ${DESTDIR}/etc/firmware
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 \
+ ${.CURDIR}/3c990-license ${DESTDIR}/etc/firmware
+.endif
+
+.include <bsd.prog.mk>
+
diff --git a/sys/dev/microcode/typhoon/build.c b/sys/dev/microcode/typhoon/build.c
new file mode 100644
index 00000000000..6faba4609bf
--- /dev/null
+++ b/sys/dev/microcode/typhoon/build.c
@@ -0,0 +1,38 @@
+/* $OpenBSD: build.c,v 1.1 2004/12/14 01:50:42 deraadt Exp $ */
+
+/*
+ * Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
+ *
+ * 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.
+ */
+#include <sys/types.h>
+#include <fcntl.h>
+
+#include "3c990img.h"
+#define FILENAME "3c990"
+
+int
+main(int argc, char *argv[])
+{
+ int i;
+ int fd;
+
+ printf("creating %s length %d\n", FILENAME, sizeof tc990image);
+ fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (fd == -1)
+ err(1, "%s", FILENAME);
+
+ write(fd, tc990image, sizeof tc990image);
+ close(fd);
+ return 0;
+}