diff options
Diffstat (limited to 'usr/src/lib/libsmbios')
-rw-r--r-- | usr/src/lib/libsmbios/Makefile | 57 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/Makefile.com | 74 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/amd64/Makefile | 32 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/common/llib-lsmbios | 32 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/common/smb_lib.c | 204 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/common/smb_subr.c | 93 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/common/smbios.h | 55 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/i386/Makefile | 31 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/sparc/Makefile | 31 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/sparcv9/Makefile | 32 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/Makefile | 28 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/Makefile.targ | 32 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/amd64/Makefile | 35 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/i386/Makefile | 34 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/smbios.spec | 374 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/sparc/Makefile | 34 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/sparcv9/Makefile | 35 | ||||
-rw-r--r-- | usr/src/lib/libsmbios/spec/versions | 42 |
18 files changed, 1255 insertions, 0 deletions
diff --git a/usr/src/lib/libsmbios/Makefile b/usr/src/lib/libsmbios/Makefile new file mode 100644 index 0000000000..6869a3bc4e --- /dev/null +++ b/usr/src/lib/libsmbios/Makefile @@ -0,0 +1,57 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include ../Makefile.lib + +HDRS = smbios.h +HDRDIR = common + +SUBDIRS = $(MACH) +$(BUILD64)SUBDIRS += $(MACH64) + +all := TARGET = all +clean := TARGET = clean +clobber := TARGET = clobber +install := TARGET = install +lint := TARGET = lint + +.KEEP_STATE: + +all clean clobber install: spec .WAIT $(SUBDIRS) + +lint: $(SUBDIRS) + +install_h: $(ROOTHDRS) + +check: $(CHECKHDRS) + +spec $(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: + +include ../Makefile.targ diff --git a/usr/src/lib/libsmbios/Makefile.com b/usr/src/lib/libsmbios/Makefile.com new file mode 100644 index 0000000000..83f112299b --- /dev/null +++ b/usr/src/lib/libsmbios/Makefile.com @@ -0,0 +1,74 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +LIBRARY = libsmbios.a +VERS = .1 + +COMMON_OBJS = \ + smb_error.o \ + smb_info.o \ + smb_open.o + +LIB_OBJS = \ + smb_lib.o \ + smb_subr.o \ + smb_tables.o + +OBJECTS = $(COMMON_OBJS) $(LIB_OBJS) + +include ../../Makefile.lib + +COMMON_SRCDIR = ../../../common/smbios +COMMON_HDR = $(SRC)/uts/common/sys/smbios.h + +SRCS = $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c) $(LIB_OBJS:%.o=../common/%.c) +LIBS = $(DYNLIB) $(LINTLIB) + +SRCDIR = ../common +SPECMAPFILE = $(MAPDIR)/mapfile +CLEANFILES += ../common/smb_tables.c + +CPPFLAGS += -I../common -I$(COMMON_SRCDIR) +CFLAGS += $(CCVERBOSE) +LDLIBS += -lc + +$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) + +.KEEP_STATE: + +all: $(LIBS) + +lint: lintcheck + +include ../../Makefile.targ + +objs/%.o pics/%.o: ../../../common/smbios/%.c + $(COMPILE.c) -o $@ $< + $(POST_PROCESS_O) + +../common/smb_tables.c: $(COMMON_SRCDIR)/mktables.sh $(COMMON_HDR) + sh $(COMMON_SRCDIR)/mktables.sh $(COMMON_HDR) > $@ diff --git a/usr/src/lib/libsmbios/amd64/Makefile b/usr/src/lib/libsmbios/amd64/Makefile new file mode 100644 index 0000000000..7b40f7053a --- /dev/null +++ b/usr/src/lib/libsmbios/amd64/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +MAPDIR = ../spec/amd64 +include ../Makefile.com +include ../../Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64) diff --git a/usr/src/lib/libsmbios/common/llib-lsmbios b/usr/src/lib/libsmbios/common/llib-lsmbios new file mode 100644 index 0000000000..b0c74b31bd --- /dev/null +++ b/usr/src/lib/libsmbios/common/llib-lsmbios @@ -0,0 +1,32 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/*LINTLIBRARY*/ +/*PROTOLIB1*/ + +#include <smbios.h> diff --git a/usr/src/lib/libsmbios/common/smb_lib.c b/usr/src/lib/libsmbios/common/smb_lib.c new file mode 100644 index 0000000000..c8bae93fa3 --- /dev/null +++ b/usr/src/lib/libsmbios/common/smb_lib.c @@ -0,0 +1,204 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/types.h> +#include <sys/smbios_impl.h> +#include <sys/sysmacros.h> +#include <sys/stat.h> +#include <sys/mman.h> + +#include <limits.h> +#include <unistd.h> +#include <strings.h> +#include <stdlib.h> +#include <errno.h> +#include <fcntl.h> + +#pragma init(smb_init) +static void +smb_init(void) +{ + _smb_debug = getenv("SMB_DEBUG") != NULL; +} + +static smbios_hdl_t * +smb_fileopen(int fd, int version, int flags, int *errp) +{ + smbios_hdl_t *shp = NULL; + smbios_entry_t ep; + void *stbuf; + ssize_t n; + + if ((n = pread64(fd, &ep, sizeof (ep), 0)) != sizeof (ep)) + return (smb_open_error(shp, errp, n < 0 ? errno : ESMB_NOHDR)); + + if (strncmp(ep.smbe_eanchor, SMB_ENTRY_EANCHOR, SMB_ENTRY_EANCHORLEN)) + return (smb_open_error(shp, errp, ESMB_HEADER)); + + if ((stbuf = smb_alloc(ep.smbe_stlen)) == NULL) + return (smb_open_error(shp, errp, ESMB_NOMEM)); + + if ((n = pread64(fd, stbuf, ep.smbe_stlen, + (off64_t)ep.smbe_staddr)) != ep.smbe_stlen) { + smb_free(stbuf, ep.smbe_stlen); + return (smb_open_error(shp, errp, n < 0 ? errno : ESMB_NOSTAB)); + } + + shp = smbios_bufopen(&ep, stbuf, ep.smbe_stlen, version, flags, errp); + + if (shp != NULL) + shp->sh_flags |= SMB_FL_BUFALLOC; + else + smb_free(stbuf, ep.smbe_stlen); + + return (shp); +} + +static smbios_hdl_t * +smb_biosopen(int fd, int version, int flags, int *errp) +{ + smbios_hdl_t *shp = NULL; + size_t pgsize, pgmask, pgoff; + void *stbuf, *bios, *p, *q; + smbios_entry_t ep; + + bios = mmap(NULL, SMB_RANGE_LIMIT - SMB_RANGE_START + 1, + PROT_READ, MAP_SHARED, fd, (uint32_t)SMB_RANGE_START); + + if (bios == MAP_FAILED) + return (smb_open_error(shp, errp, ESMB_MAPDEV)); + + q = (void *)((uintptr_t)bios + SMB_RANGE_LIMIT - SMB_RANGE_START + 1); + + for (p = bios; p < q; p = (void *)((uintptr_t)p + 16)) { + if (strncmp(p, SMB_ENTRY_EANCHOR, SMB_ENTRY_EANCHORLEN) == 0) + break; + } + + if (p >= q) { + (void) munmap(bios, SMB_RANGE_LIMIT - SMB_RANGE_START + 1); + return (smb_open_error(NULL, errp, ESMB_NOTFOUND)); + } + + bcopy(p, &ep, sizeof (smbios_entry_t)); + (void) munmap(bios, SMB_RANGE_LIMIT - SMB_RANGE_START + 1); + + pgsize = getpagesize(); + pgmask = ~(pgsize - 1); + pgoff = ep.smbe_staddr & ~pgmask; + + bios = mmap(NULL, ep.smbe_stlen + pgoff, + PROT_READ, MAP_SHARED, fd, ep.smbe_staddr & pgmask); + + if (bios == MAP_FAILED) + return (smb_open_error(shp, errp, ESMB_MAPDEV)); + + if ((stbuf = smb_alloc(ep.smbe_stlen)) == NULL) { + (void) munmap(bios, ep.smbe_stlen + pgoff); + return (smb_open_error(shp, errp, ESMB_NOMEM)); + } + + bcopy((char *)bios + pgoff, stbuf, ep.smbe_stlen); + (void) munmap(bios, ep.smbe_stlen + pgoff); + shp = smbios_bufopen(&ep, stbuf, ep.smbe_stlen, version, flags, errp); + + if (shp != NULL) + shp->sh_flags |= SMB_FL_BUFALLOC; + else + smb_free(stbuf, ep.smbe_stlen); + + return (shp); +} + +smbios_hdl_t * +smbios_fdopen(int fd, int version, int flags, int *errp) +{ + struct stat64 st1, st2; + + if (stat64(SMB_BIOS_DEVICE, &st1) == 0 && fstat64(fd, &st2) == 0 && + S_ISCHR(st2.st_mode) && st1.st_rdev == st2.st_rdev) + return (smb_biosopen(fd, version, flags, errp)); + else + return (smb_fileopen(fd, version, flags, errp)); +} + +smbios_hdl_t * +smbios_open(const char *file, int version, int flags, int *errp) +{ + smbios_hdl_t *shp; + int fd; + + if ((fd = open64(file ? file : SMB_SMBIOS_DEVICE, O_RDONLY)) == -1) { + if ((errno == ENOENT || errno == ENXIO) && + (file == NULL || strcmp(file, SMB_SMBIOS_DEVICE) == 0)) + errno = ESMB_NOTFOUND; + return (smb_open_error(NULL, errp, errno)); + } + + shp = smbios_fdopen(fd, version, flags, errp); + (void) close(fd); + return (shp); +} + +static int +smbios_xwrite(smbios_hdl_t *shp, int fd, const void *buf, size_t buflen) +{ + ssize_t resid = buflen; + ssize_t len; + + while (resid != 0) { + if ((len = write(fd, buf, resid)) <= 0) + return (smb_set_errno(shp, errno)); + resid -= len; + buf = (uchar_t *)buf + len; + } + + return (0); +} + +int +smbios_write(smbios_hdl_t *shp, int fd) +{ + smbios_entry_t ep; + off64_t off = lseek64(fd, 0, SEEK_CUR) + P2ROUNDUP(sizeof (ep), 16); + + if (off > UINT32_MAX) + return (smb_set_errno(shp, EOVERFLOW)); + + bcopy(&shp->sh_ent, &ep, sizeof (ep)); + ep.smbe_staddr = (uint32_t)off; + smbios_checksum(shp, &ep); + + if (smbios_xwrite(shp, fd, &ep, sizeof (ep)) == -1 || + lseek64(fd, off, SEEK_SET) != off || + smbios_xwrite(shp, fd, shp->sh_buf, shp->sh_buflen) == -1) + return (-1); + + return (0); +} diff --git a/usr/src/lib/libsmbios/common/smb_subr.c b/usr/src/lib/libsmbios/common/smb_subr.c new file mode 100644 index 0000000000..6d641456cc --- /dev/null +++ b/usr/src/lib/libsmbios/common/smb_subr.c @@ -0,0 +1,93 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/smbios_impl.h> + +#include <strings.h> +#include <unistd.h> +#include <stdlib.h> +#include <stdarg.h> +#include <stdio.h> + +smbios_hdl_t * +smb_open_error(smbios_hdl_t *shp, int *errp, int err) +{ + if (shp != NULL) + smbios_close(shp); + + if (errp != NULL) + *errp = err; + + return (NULL); +} + +const char * +smb_strerror(int err) +{ + return (strerror(err)); +} + +void * +smb_alloc(size_t len) +{ + return (len ? malloc(len) : NULL); +} + +void * +smb_zalloc(size_t len) +{ + void *buf; + + if ((buf = smb_alloc(len)) != NULL) + bzero(buf, len); + + return (buf); +} + +/*ARGSUSED*/ +void +smb_free(void *buf, size_t len) +{ + free(buf); +} + +/*PRINTFLIKE2*/ +void +smb_dprintf(smbios_hdl_t *shp, const char *format, ...) +{ + va_list ap; + + if (!(shp->sh_flags & SMB_FL_DEBUG)) + return; + + (void) fprintf(stderr, "smb DEBUG: "); + va_start(ap, format); + (void) vfprintf(stderr, format, ap); + va_end(ap); +} diff --git a/usr/src/lib/libsmbios/common/smbios.h b/usr/src/lib/libsmbios/common/smbios.h new file mode 100644 index 0000000000..41c1abd431 --- /dev/null +++ b/usr/src/lib/libsmbios/common/smbios.h @@ -0,0 +1,55 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SMBIOS_H +#define _SMBIOS_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include <sys/smbios.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This header file defines the interfaces available from the SMBIOS access + * library, libsmbios, and an equivalent kernel module. This API can be used + * to access DMTF SMBIOS data from a device, file, or raw memory buffer. + * This is NOT yet a public interface, although it may eventually become one in + * the fullness of time after we gain more experience with the interfaces. + * + * In the meantime, be aware that any program linked with this API in this + * release of Solaris is almost guaranteed to break in the next release. + * + * In short, do not user this header file or these routines for any purpose. + */ + +#ifdef __cplusplus +} +#endif + +#endif /* _SMBIOS_H */ diff --git a/usr/src/lib/libsmbios/i386/Makefile b/usr/src/lib/libsmbios/i386/Makefile new file mode 100644 index 0000000000..5b2f167595 --- /dev/null +++ b/usr/src/lib/libsmbios/i386/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +MAPDIR = ../spec/i386 +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libsmbios/sparc/Makefile b/usr/src/lib/libsmbios/sparc/Makefile new file mode 100644 index 0000000000..dca1669f5d --- /dev/null +++ b/usr/src/lib/libsmbios/sparc/Makefile @@ -0,0 +1,31 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +MAPDIR = ../spec/sparc +include ../Makefile.com + +install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libsmbios/sparcv9/Makefile b/usr/src/lib/libsmbios/sparcv9/Makefile new file mode 100644 index 0000000000..0f01536cf7 --- /dev/null +++ b/usr/src/lib/libsmbios/sparcv9/Makefile @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +MAPDIR = ../spec/sparcv9 +include ../Makefile.com +include ../../Makefile.lib.64 + +install: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64) diff --git a/usr/src/lib/libsmbios/spec/Makefile b/usr/src/lib/libsmbios/spec/Makefile new file mode 100644 index 0000000000..2cb984bfc9 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/Makefile @@ -0,0 +1,28 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +include $(SRC)/lib/Makefile.spec.arch diff --git a/usr/src/lib/libsmbios/spec/Makefile.targ b/usr/src/lib/libsmbios/spec/Makefile.targ new file mode 100644 index 0000000000..6f45581c46 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/Makefile.targ @@ -0,0 +1,32 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +.KEEP_STATE: + +LIBRARY = libsmbios.a +VERS = .1 +OBJECTS = smbios.o diff --git a/usr/src/lib/libsmbios/spec/amd64/Makefile b/usr/src/lib/libsmbios/spec/amd64/Makefile new file mode 100644 index 0000000000..ef98bd8314 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/amd64/Makefile @@ -0,0 +1,35 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +DISABLE_APPTRACE= $(POUND_SIGN) + +include ../Makefile.targ +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib.64 +include $(SRC)/lib/Makefile.spec + +$(DISABLE_APPTRACE)install: $(ROOTABILIB64) diff --git a/usr/src/lib/libsmbios/spec/i386/Makefile b/usr/src/lib/libsmbios/spec/i386/Makefile new file mode 100644 index 0000000000..83d6a28b73 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/i386/Makefile @@ -0,0 +1,34 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +DISABLE_APPTRACE= $(POUND_SIGN) + +include ../Makefile.targ +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.spec + +$(DISABLE_APPTRACE)install: $(ROOTABILIB) diff --git a/usr/src/lib/libsmbios/spec/smbios.spec b/usr/src/lib/libsmbios/spec/smbios.spec new file mode 100644 index 0000000000..3f6c32b542 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/smbios.spec @@ -0,0 +1,374 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +data _smb_debug +version SUNWprivate_1.1 +end + +function smbios_bboard_flag_desc +version SUNWprivate_1.1 +end + +function smbios_bboard_flag_name +version SUNWprivate_1.1 +end + +function smbios_bboard_type_desc +version SUNWprivate_1.1 +end + +function smbios_bios_flag_desc +version SUNWprivate_1.1 +end + +function smbios_bios_flag_name +version SUNWprivate_1.1 +end + +function smbios_bios_xb1_desc +version SUNWprivate_1.1 +end + +function smbios_bios_xb1_name +version SUNWprivate_1.1 +end + +function smbios_bios_xb2_desc +version SUNWprivate_1.1 +end + +function smbios_bios_xb2_name +version SUNWprivate_1.1 +end + +function smbios_boot_desc +version SUNWprivate_1.1 +end + +function smbios_buf +version SUNWprivate_1.1 +end + +function smbios_buflen +version SUNWprivate_1.1 +end + +function smbios_bufopen +version SUNWprivate_1.1 +end + +function smbios_cache_assoc_desc +version SUNWprivate_1.1 +end + +function smbios_cache_ctype_desc +version SUNWprivate_1.1 +end + +function smbios_cache_ctype_name +version SUNWprivate_1.1 +end + +function smbios_cache_ecc_desc +version SUNWprivate_1.1 +end + +function smbios_cache_flag_desc +version SUNWprivate_1.1 +end + +function smbios_cache_flag_name +version SUNWprivate_1.1 +end + +function smbios_cache_loc_desc +version SUNWprivate_1.1 +end + +function smbios_cache_logical_desc +version SUNWprivate_1.1 +end + +function smbios_cache_mode_desc +version SUNWprivate_1.1 +end + +function smbios_checksum +version SUNWprivate_1.1 +end + +function smbios_chassis_state_desc +version SUNWprivate_1.1 +end + +function smbios_chassis_type_desc +version SUNWprivate_1.1 +end + +function smbios_close +version SUNWprivate_1.1 +end + +function smbios_errmsg +version SUNWprivate_1.1 +end + +function smbios_errno +version SUNWprivate_1.1 +end + +function smbios_evlog_flag_desc +version SUNWprivate_1.1 +end + +function smbios_evlog_flag_name +version SUNWprivate_1.1 +end + +function smbios_evlog_format_desc +version SUNWprivate_1.1 +end + +function smbios_evlog_method_desc +version SUNWprivate_1.1 +end + +function smbios_fdopen +version SUNWprivate_1.1 +end + +function smbios_hwsec_desc +version SUNWprivate_1.1 +end + +function smbios_info_bboard +version SUNWprivate_1.1 +end + +function smbios_info_bios +version SUNWprivate_1.1 +end + +function smbios_info_boot +version SUNWprivate_1.1 +end + +function smbios_info_cache +version SUNWprivate_1.1 +end + +function smbios_info_chassis +version SUNWprivate_1.1 +end + +function smbios_info_common +version SUNWprivate_1.1 +end + +function smbios_info_eventlog +version SUNWprivate_1.1 +end + +function smbios_info_hwsec +version SUNWprivate_1.1 +end + +function smbios_info_ipmi +version SUNWprivate_1.1 +end + +function smbios_info_lang +version SUNWprivate_1.1 +end + +function smbios_info_memarray +version SUNWprivate_1.1 +end + +function smbios_info_memarrmap +version SUNWprivate_1.1 +end + +function smbios_info_memdevice +version SUNWprivate_1.1 +end + +function smbios_info_memdevmap +version SUNWprivate_1.1 +end + +function smbios_info_obdevs +version SUNWprivate_1.1 +end + +function smbios_info_port +version SUNWprivate_1.1 +end + +function smbios_info_processor +version SUNWprivate_1.1 +end + +function smbios_info_slot +version SUNWprivate_1.1 +end + +function smbios_info_smbios +version SUNWprivate_1.1 +end + +function smbios_info_strtab +version SUNWprivate_1.1 +end + +function smbios_info_system +version SUNWprivate_1.1 +end + +function smbios_ipmi_flag_desc +version SUNWprivate_1.1 +end + +function smbios_ipmi_flag_name +version SUNWprivate_1.1 +end + +function smbios_ipmi_type_desc +version SUNWprivate_1.1 +end + +function smbios_iter +version SUNWprivate_1.1 +end + +function smbios_lookup_id +version SUNWprivate_1.1 +end + +function smbios_memarray_loc_desc +version SUNWprivate_1.1 +end + +function smbios_memarray_use_desc +version SUNWprivate_1.1 +end + +function smbios_memarray_ecc_desc +version SUNWprivate_1.1 +end + +function smbios_memdevice_flag_desc +version SUNWprivate_1.1 +end + +function smbios_memdevice_flag_name +version SUNWprivate_1.1 +end + +function smbios_memdevice_form_desc +version SUNWprivate_1.1 +end + +function smbios_memdevice_type_desc +version SUNWprivate_1.1 +end + +function smbios_open +version SUNWprivate_1.1 +end + +function smbios_port_conn_desc +version SUNWprivate_1.1 +end + +function smbios_port_type_desc +version SUNWprivate_1.1 +end + +function smbios_processor_family_desc +version SUNWprivate_1.1 +end + +function smbios_processor_status_desc +version SUNWprivate_1.1 +end + +function smbios_processor_type_desc +version SUNWprivate_1.1 +end + +function smbios_processor_upgrade_desc +version SUNWprivate_1.1 +end + +function smbios_slot_ch1_desc +version SUNWprivate_1.1 +end + +function smbios_slot_ch1_name +version SUNWprivate_1.1 +end + +function smbios_slot_ch2_desc +version SUNWprivate_1.1 +end + +function smbios_slot_ch2_name +version SUNWprivate_1.1 +end + +function smbios_slot_length_desc +version SUNWprivate_1.1 +end + +function smbios_slot_type_desc +version SUNWprivate_1.1 +end + +function smbios_slot_usage_desc +version SUNWprivate_1.1 +end + +function smbios_slot_width_desc +version SUNWprivate_1.1 +end + +function smbios_system_wakeup_desc +version SUNWprivate_1.1 +end + +function smbios_type_desc +version SUNWprivate_1.1 +end + +function smbios_type_name +version SUNWprivate_1.1 +end + +function smbios_write +version SUNWprivate_1.1 +end diff --git a/usr/src/lib/libsmbios/spec/sparc/Makefile b/usr/src/lib/libsmbios/spec/sparc/Makefile new file mode 100644 index 0000000000..375f0ff614 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/sparc/Makefile @@ -0,0 +1,34 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +DISABLE_APPTRACE= $(POUND_SIGN) + +include ../Makefile.targ +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.spec + +$(DISABLE_APPTRACE)install: $(ROOTABILIB) diff --git a/usr/src/lib/libsmbios/spec/sparcv9/Makefile b/usr/src/lib/libsmbios/spec/sparcv9/Makefile new file mode 100644 index 0000000000..ef98bd8314 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/sparcv9/Makefile @@ -0,0 +1,35 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +DISABLE_APPTRACE= $(POUND_SIGN) + +include ../Makefile.targ +include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib.64 +include $(SRC)/lib/Makefile.spec + +$(DISABLE_APPTRACE)install: $(ROOTABILIB64) diff --git a/usr/src/lib/libsmbios/spec/versions b/usr/src/lib/libsmbios/spec/versions new file mode 100644 index 0000000000..43aa0fe433 --- /dev/null +++ b/usr/src/lib/libsmbios/spec/versions @@ -0,0 +1,42 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" + +i386 { + SUNWprivate_1.1; +} + +amd64 { + SUNWprivate_1.1; +} + +sparc { + SUNWprivate_1.1; +} + +sparcv9 { + SUNWprivate_1.1; +} |