summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-12-19 16:06:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-12-19 16:06:24 +0000
commitf4fe7b45fb7287f3698144eb4febed5b35e82ae5 (patch)
tree5233891532c990cb1d6cecb55f483199881a0ec9 /sys/dev/microcode
parent841a14b61ad978b554ba5d007ebea2e72aef8886 (diff)
filesystem firmware loading written over the pacific 2 weeks ago, tested
by mickey
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r--sys/dev/microcode/Makefile4
-rw-r--r--sys/dev/microcode/cirruslogic/Makefile24
-rw-r--r--sys/dev/microcode/cirruslogic/build.c39
-rw-r--r--sys/dev/microcode/cirruslogic/cs4280-license10
4 files changed, 75 insertions, 2 deletions
diff --git a/sys/dev/microcode/Makefile b/sys/dev/microcode/Makefile
index 224727e0581..b6f97b13c29 100644
--- a/sys/dev/microcode/Makefile
+++ b/sys/dev/microcode/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.6 2004/12/19 15:21:08 deraadt Exp $
+# $OpenBSD: Makefile,v 1.7 2004/12/19 16:06:23 deraadt Exp $
-SUBDIR= atmel tigon neomagic symbol kue typhoon uyap
+SUBDIR= atmel tigon neomagic symbol kue typhoon uyap cirruslogic yds
.include <bsd.subdir.mk>
diff --git a/sys/dev/microcode/cirruslogic/Makefile b/sys/dev/microcode/cirruslogic/Makefile
new file mode 100644
index 00000000000..98b117dd081
--- /dev/null
+++ b/sys/dev/microcode/cirruslogic/Makefile
@@ -0,0 +1,24 @@
+# $OpenBSD: Makefile,v 1.1 2004/12/19 16:06:23 deraadt Exp $
+
+NOPROG=
+NOMAN=
+
+# PCI capable systems only
+.if (${MACHINE} == "i386")
+
+FIRM= cs4280
+
+CLEANFILES+= build ${FIRM}
+
+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}/cs4280-license ${DESTDIR}/etc/firmware
+.endif
+
+.include <bsd.prog.mk>
+
diff --git a/sys/dev/microcode/cirruslogic/build.c b/sys/dev/microcode/cirruslogic/build.c
new file mode 100644
index 00000000000..52daaf77f65
--- /dev/null
+++ b/sys/dev/microcode/cirruslogic/build.c
@@ -0,0 +1,39 @@
+/* $OpenBSD: build.c,v 1.1 2004/12/19 16:06:23 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 <dev/pci/cs4280reg.h>
+#include "cs4280_image.h"
+#define FILENAME "cs4280"
+
+int
+main(int argc, char *argv[])
+{
+ int i;
+ int fd;
+
+ printf("creating %s length %d\n", FILENAME, sizeof BA1Struct);
+ fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+ if (fd == -1)
+ err(1, "%s", FILENAME);
+
+ write(fd, &BA1Struct, sizeof BA1Struct);
+ close(fd);
+ return 0;
+}
diff --git a/sys/dev/microcode/cirruslogic/cs4280-license b/sys/dev/microcode/cirruslogic/cs4280-license
new file mode 100644
index 00000000000..13dca56f70f
--- /dev/null
+++ b/sys/dev/microcode/cirruslogic/cs4280-license
@@ -0,0 +1,10 @@
+ * This source is based on cwcimage.h in cwcealdr1.zip, the
+ * sample source by Crystal Semiconductor.
+ * (ftp://ftp.alsa-project.org/pub/manuals/cirrus/cwcealdr1.zip.)
+ *
+ * Just remove \r in each line and add this comments.
+ *
+ * Original file contains no copyright notice.
+
+This license needs to be solved by someone finding the right person
+at Crystal Semiconductor.