diff options
Diffstat (limited to 'sys/libkern')
32 files changed, 62 insertions, 56 deletions
diff --git a/sys/libkern/ashldi3.c b/sys/libkern/ashldi3.c index 4ad69745c21a9..b881eaffe6163 100644 --- a/sys/libkern/ashldi3.c +++ b/sys/libkern/ashldi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/ashrdi3.c b/sys/libkern/ashrdi3.c index 1eab1d60d99f2..bba4897b2b8c4 100644 --- a/sys/libkern/ashrdi3.c +++ b/sys/libkern/ashrdi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/bcmp.c b/sys/libkern/bcmp.c index cd00ba9e6b524..37cce24956fed 100644 --- a/sys/libkern/bcmp.c +++ b/sys/libkern/bcmp.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/bsearch.c b/sys/libkern/bsearch.c index cbac2fb762b22..689f6203051bc 100644 --- a/sys/libkern/bsearch.c +++ b/sys/libkern/bsearch.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/cmpdi2.c b/sys/libkern/cmpdi2.c index 9a2b5e3f4fbc0..ae077e9514bb5 100644 --- a/sys/libkern/cmpdi2.c +++ b/sys/libkern/cmpdi2.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/divdi3.c b/sys/libkern/divdi3.c index 27b1cf0a04294..e080b290164c6 100644 --- a/sys/libkern/divdi3.c +++ b/sys/libkern/divdi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/fnmatch.c b/sys/libkern/fnmatch.c index 5e7bda6ecec93..e0ed67324c988 100644 --- a/sys/libkern/fnmatch.c +++ b/sys/libkern/fnmatch.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/lshrdi3.c b/sys/libkern/lshrdi3.c index 4701394196534..df8f5e852dc93 100644 --- a/sys/libkern/lshrdi3.c +++ b/sys/libkern/lshrdi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/mcount.c b/sys/libkern/mcount.c index e26f6fab3428d..a0768c1ea274f 100644 --- a/sys/libkern/mcount.c +++ b/sys/libkern/mcount.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/memchr.c b/sys/libkern/memchr.c index a00ea6d40912b..54801c6937f3a 100644 --- a/sys/libkern/memchr.c +++ b/sys/libkern/memchr.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/memcmp.c b/sys/libkern/memcmp.c index 6a6e69cb614f4..7cce8e7cb1ef3 100644 --- a/sys/libkern/memcmp.c +++ b/sys/libkern/memcmp.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/moddi3.c b/sys/libkern/moddi3.c index 050d47e255be3..ad0e5dda15ad4 100644 --- a/sys/libkern/moddi3.c +++ b/sys/libkern/moddi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/qdivrem.c b/sys/libkern/qdivrem.c index b4cc91f1cff25..7f95ea195cd1e 100644 --- a/sys/libkern/qdivrem.c +++ b/sys/libkern/qdivrem.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/qsort.c b/sys/libkern/qsort.c index 7a758d3a85554..0600a3907c786 100644 --- a/sys/libkern/qsort.c +++ b/sys/libkern/qsort.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/quad.h b/sys/libkern/quad.h index 4850d89cb7cbb..cfe45a67d25c0 100644 --- a/sys/libkern/quad.h +++ b/sys/libkern/quad.h @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/random.c b/sys/libkern/random.c index 22a14ef5021f3..85bd3677baa8c 100644 --- a/sys/libkern/random.c +++ b/sys/libkern/random.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/scanc.c b/sys/libkern/scanc.c index a7800d0eeb558..e27522982bd5a 100644 --- a/sys/libkern/scanc.c +++ b/sys/libkern/scanc.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strcat.c b/sys/libkern/strcat.c index 13738f97e26cd..4d4021b9efb77 100644 --- a/sys/libkern/strcat.c +++ b/sys/libkern/strcat.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strchr.c b/sys/libkern/strchr.c index 6ee479833890f..1a4b0e7aa20e5 100644 --- a/sys/libkern/strchr.c +++ b/sys/libkern/strchr.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strcmp.c b/sys/libkern/strcmp.c index 43a06d9be5871..8b80027a35b16 100644 --- a/sys/libkern/strcmp.c +++ b/sys/libkern/strcmp.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strcpy.c b/sys/libkern/strcpy.c index 4b902c281b232..c9d37a73e4210 100644 --- a/sys/libkern/strcpy.c +++ b/sys/libkern/strcpy.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strncpy.c b/sys/libkern/strncpy.c index d4d0964317bac..f3c44979c308f 100644 --- a/sys/libkern/strncpy.c +++ b/sys/libkern/strncpy.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strrchr.c b/sys/libkern/strrchr.c index 6ff7eb45b943b..d594fb1cc4709 100644 --- a/sys/libkern/strrchr.c +++ b/sys/libkern/strrchr.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strsep.c b/sys/libkern/strsep.c index 46122697e8bbb..31a86a42349e0 100644 --- a/sys/libkern/strsep.c +++ b/sys/libkern/strsep.c @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strstr.c b/sys/libkern/strstr.c index 12c2a9189aab5..171cc4bc99cdb 100644 --- a/sys/libkern/strstr.c +++ b/sys/libkern/strstr.c @@ -1,9 +1,9 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 1991 The Regents of the University of California. + * All rights reserved. * * This code is derived from software contributed to Berkeley by - * Chris Torek. + * William Jolitz. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,11 +13,7 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -32,32 +28,42 @@ * 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. + * + * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <sys/param.h> -#include <sys/libkern.h> +#include <sys/types.h> +#include <sys/syslog.h> +#include <sys/systm.h> + +#include <machine/md_var.h> + +#define NMI_PARITY 0x04 +#define NMI_EPARITY 0x02 /* - * Find the first occurrence of find in s. + * Handle a NMI, possibly a machine check. + * return true to panic system, false to ignore. */ -char * -strstr(const char *s, const char *find) +int +isa_nmi(int cd) { - char c, sc; - size_t len; + int retval = 0; + int port = inb(0x33); - if ((c = *find++) != 0) { - len = strlen(find); - do { - do { - if ((sc = *s++) == 0) - return (NULL); - } while (sc != c); - } while (strncmp(s, find, len) != 0); - s--; + log(LOG_CRIT, "NMI PC98 port = %x\n", port); + if (port & NMI_PARITY) { + log(LOG_CRIT, "BASE RAM parity error, likely hardware failure."); + retval = 1; + } else if (port & NMI_EPARITY) { + log(LOG_CRIT, "EXTENDED RAM parity error, likely hardware failure."); + retval = 1; + } else { + log(LOG_CRIT, "\nNMI Resume ??\n"); } - return (__DECONST(char *, s)); + + return(retval); } diff --git a/sys/libkern/strtol.c b/sys/libkern/strtol.c index ea7dd55672853..b1a5c01cd59b3 100644 --- a/sys/libkern/strtol.c +++ b/sys/libkern/strtol.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strtoq.c b/sys/libkern/strtoq.c index e83adb1f0e355..599f573fa53bc 100644 --- a/sys/libkern/strtoq.c +++ b/sys/libkern/strtoq.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strtoul.c b/sys/libkern/strtoul.c index 44adf5a30118f..746ac923bd09a 100644 --- a/sys/libkern/strtoul.c +++ b/sys/libkern/strtoul.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/strtouq.c b/sys/libkern/strtouq.c index 49c3750b2a8a6..950bc6a5c7b29 100644 --- a/sys/libkern/strtouq.c +++ b/sys/libkern/strtouq.c @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/ucmpdi2.c b/sys/libkern/ucmpdi2.c index cd41c697014f5..fe0d8f5e4d40a 100644 --- a/sys/libkern/ucmpdi2.c +++ b/sys/libkern/ucmpdi2.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/udivdi3.c b/sys/libkern/udivdi3.c index 71c9272364d88..9bf7542b878cd 100644 --- a/sys/libkern/udivdi3.c +++ b/sys/libkern/udivdi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/sys/libkern/umoddi3.c b/sys/libkern/umoddi3.c index e3776413722ce..9b2111196e660 100644 --- a/sys/libkern/umoddi3.c +++ b/sys/libkern/umoddi3.c @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * |