From defc4c8acfa01dba1ef3c13ca0cafccfcede51c0 Mon Sep 17 00:00:00 2001 From: Ryan Zezeski Date: Thu, 29 Dec 2016 08:20:14 -0800 Subject: 7719 sdev_create() doesn't enforce EISDIR in non-GZ Reviewed by: Patrick Mooney Reviewed by: Jerry Jelinek Reviewed by: Hans Rosenfeld Reviewed by: Andy Stormont Reviewed by: Dan McDonald Approved by: Dan McDonald --- usr/src/pkg/manifests/system-test-ostest.mf | 2 + usr/src/test/os-tests/runfiles/default.run | 5 ++ usr/src/test/os-tests/tests/Makefile | 2 +- usr/src/test/os-tests/tests/sdevfs/Makefile | 47 ++++++++++++++ usr/src/test/os-tests/tests/sdevfs/sdevfs_eisdir.c | 73 ++++++++++++++++++++++ usr/src/uts/common/fs/dev/sdev_vnops.c | 32 +++++++++- 6 files changed, 158 insertions(+), 3 deletions(-) create mode 100644 usr/src/test/os-tests/tests/sdevfs/Makefile create mode 100644 usr/src/test/os-tests/tests/sdevfs/sdevfs_eisdir.c (limited to 'usr/src') diff --git a/usr/src/pkg/manifests/system-test-ostest.mf b/usr/src/pkg/manifests/system-test-ostest.mf index 4f037a7749..c4c6d98836 100644 --- a/usr/src/pkg/manifests/system-test-ostest.mf +++ b/usr/src/pkg/manifests/system-test-ostest.mf @@ -26,6 +26,7 @@ dir path=opt/os-tests/bin dir path=opt/os-tests/runfiles dir path=opt/os-tests/tests dir path=opt/os-tests/tests/file-locking +dir path=opt/os-tests/tests/sdevfs dir path=opt/os-tests/tests/secflags dir path=opt/os-tests/tests/sigqueue file path=opt/os-tests/README mode=0444 @@ -37,6 +38,7 @@ file path=opt/os-tests/tests/file-locking/acquire-lock.64 mode=0555 file path=opt/os-tests/tests/file-locking/runtests.32 mode=0555 file path=opt/os-tests/tests/file-locking/runtests.64 mode=0555 file path=opt/os-tests/tests/poll_test mode=0555 +file path=opt/os-tests/tests/sdevfs/sdevfs_eisdir mode=0555 file path=opt/os-tests/tests/secflags/addrs-32 mode=0555 file path=opt/os-tests/tests/secflags/addrs-64 mode=0555 file path=opt/os-tests/tests/secflags/secflags_aslr mode=0555 diff --git a/usr/src/test/os-tests/runfiles/default.run b/usr/src/test/os-tests/runfiles/default.run index 8f36276de4..8b7e82f916 100644 --- a/usr/src/test/os-tests/runfiles/default.run +++ b/usr/src/test/os-tests/runfiles/default.run @@ -11,6 +11,7 @@ # # Copyright (c) 2012 by Delphix. All rights reserved. +# Copyright 2016 Joyent, Inc. # [DEFAULT] @@ -43,5 +44,9 @@ tests = ['secflags_aslr', [/opt/os-tests/tests/sigqueue] tests = ['sigqueue_queue_size'] +[/opt/os-tests/tests/sdevfs] +user = root +tests = ['sdevfs_eisdir'] + [/opt/os-tests/tests/file-locking] tests = ['runtests.32', 'runtests.64'] diff --git a/usr/src/test/os-tests/tests/Makefile b/usr/src/test/os-tests/tests/Makefile index 42219ce8fb..6b6e0f9fce 100644 --- a/usr/src/test/os-tests/tests/Makefile +++ b/usr/src/test/os-tests/tests/Makefile @@ -13,6 +13,6 @@ # Copyright (c) 2012 by Delphix. All rights reserved. # -SUBDIRS = poll secflags sigqueue spoof-ras file-locking +SUBDIRS = poll secflags sigqueue spoof-ras sdevfs file-locking include $(SRC)/test/Makefile.com diff --git a/usr/src/test/os-tests/tests/sdevfs/Makefile b/usr/src/test/os-tests/tests/sdevfs/Makefile new file mode 100644 index 0000000000..4d72e332b7 --- /dev/null +++ b/usr/src/test/os-tests/tests/sdevfs/Makefile @@ -0,0 +1,47 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Joyent, Inc. +# + +include $(SRC)/Makefile.master + +ROOTOPTPKG = $(ROOT)/opt/os-tests +TESTDIR = $(ROOTOPTPKG)/tests/sdevfs + +PROGS = sdevfs_eisdir + +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/test/Makefile.com + +CMDS = $(PROGS:%=$(TESTDIR)/%) +$(CMDS) := FILEMODE = 0555 + +all: $(PROGS) + +install: all $(CMDS) + +lint: + +clobber: clean + -$(RM) $(PROGS) + +clean: + -$(RM) *.o + +$(CMDS): $(TESTDIR) $(PROGS) + +$(TESTDIR): + $(INS.dir) + +$(TESTDIR)/%: % + $(INS.file) diff --git a/usr/src/test/os-tests/tests/sdevfs/sdevfs_eisdir.c b/usr/src/test/os-tests/tests/sdevfs/sdevfs_eisdir.c new file mode 100644 index 0000000000..a1cc386ce7 --- /dev/null +++ b/usr/src/test/os-tests/tests/sdevfs/sdevfs_eisdir.c @@ -0,0 +1,73 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2016 Joyent, Inc. + */ + +/* + * open(2) should return EISDIR when asking for write access on a dir. + * This test should return the same results in both GZ and NGZ contexts. + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#define SD_TEST_DIR "/dev/zvol" + +int +main(int argc, char *argv[]) +{ + struct stat st; + struct statvfs vfs; + int ret; + + if (stat(SD_TEST_DIR, &st) != 0) { + fprintf(stderr, "test failed: failed to stat %s\n", + SD_TEST_DIR); + return (1); + } + + if ((st.st_mode & S_IFMT) != S_IFDIR) { + fprintf(stderr, "test failed: %s is not a dir\n", SD_TEST_DIR); + return (1); + } + + if (statvfs(SD_TEST_DIR, &vfs) != 0) { + fprintf(stderr, "test failed: failed to stat vfs for %s: %s\n", + SD_TEST_DIR, strerror(errno)); + return (1); + } + + if (strncmp("dev", vfs.f_basetype, FSTYPSZ) != 0) { + fprintf(stderr, "test failed: asked to run on non-dev\n"); + return (1); + } + + ret = open(SD_TEST_DIR, O_RDWR, 0); + VERIFY3S(ret, ==, -1); + VERIFY3S(errno, ==, EISDIR); + + /* + * It's important to test both O_RDWR and O_RDWR | O_CREAT + * because of the different code paths taken in sdev. + */ + ret = open(SD_TEST_DIR, O_RDWR | O_CREAT, 0); + VERIFY3S(ret, ==, -1); + VERIFY3S(errno, ==, EISDIR); + + return (0); +} diff --git a/usr/src/uts/common/fs/dev/sdev_vnops.c b/usr/src/uts/common/fs/dev/sdev_vnops.c index 59a3c9f17a..79ebd8b2e5 100644 --- a/usr/src/uts/common/fs/dev/sdev_vnops.c +++ b/usr/src/uts/common/fs/dev/sdev_vnops.c @@ -660,10 +660,38 @@ sdev_create(struct vnode *dvp, char *nm, struct vattr *vap, vcexcl_t excl, return (ENOENT); } - /* non-global do not allow pure node creation */ + /* + * Nodes cannot be created in NGZ context. + */ if (!SDEV_IS_GLOBAL(parent)) { rw_exit(&parent->sdev_dotdot->sdev_contents); - return (prof_lookup(dvp, nm, vpp, cred)); + error = prof_lookup(dvp, nm, vpp, cred); + + /* + * In this case, we can't create a vnode but we can + * open an existing one. However, we still want to + * enforce the open(2) error semantics as if this was + * a regular sdev_create() in GZ context. Since we + * know the vnode already exists (error == 0) we a) + * return EEXIST if exclusive access was requested, or + * b) return EISDIR if write access was requested on a + * directory. Otherwise, we return the value from + * prof_lookup() as is. + */ + if (error == 0) { + if (excl == EXCL) { + error = EEXIST; + } else if (((*vpp)->v_type == VDIR) && + (mode & VWRITE)) { + error = EISDIR; + } + + if (error != 0) + VN_RELE(*vpp); + } + + + return (error); } rw_exit(&parent->sdev_dotdot->sdev_contents); -- cgit v1.2.3 From e5cce96fec95bace977f58e07912d3ab0e33b30d Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Tue, 29 Nov 2016 22:32:42 +0000 Subject: 7747 Want SMBIOS 3.1 support Reviewed by: Patrick Mooney Reviewed by: Jerry Jelinek Reviewed by: Toomas Soome Reviewed by: Hans Rosenfeld Reviewed by: Garrett D'Amore Reviewed by: Dale Ghent Approved by: Dan McDonald --- usr/src/cmd/smbios/smbios.c | 19 ++++---- usr/src/common/smbios/smb_info.c | 84 +++++++++++++++++++++++++++++++----- usr/src/common/smbios/smb_open.c | 11 ++++- usr/src/uts/common/sys/smbios.h | 52 ++++++++++++++++++++-- usr/src/uts/common/sys/smbios_impl.h | 47 +++++++++++++++++++- 5 files changed, 187 insertions(+), 26 deletions(-) (limited to 'usr/src') diff --git a/usr/src/cmd/smbios/smbios.c b/usr/src/cmd/smbios/smbios.c index 68455016ab..a61db53331 100644 --- a/usr/src/cmd/smbios/smbios.c +++ b/usr/src/cmd/smbios/smbios.c @@ -21,7 +21,7 @@ /* * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -239,7 +239,7 @@ print_bios(smbios_hdl_t *shp, FILE *fp) oprintf(fp, " Version String: %s\n", b.smbb_version); oprintf(fp, " Release Date: %s\n", b.smbb_reldate); oprintf(fp, " Address Segment: 0x%x\n", b.smbb_segment); - oprintf(fp, " ROM Size: %u bytes\n", b.smbb_romsize); + oprintf(fp, " ROM Size: %" PRIu64 " bytes\n", b.smbb_extromsize); oprintf(fp, " Image Size: %u bytes\n", b.smbb_runsize); flag64_printf(fp, "Characteristics", @@ -508,12 +508,15 @@ print_cache(smbios_hdl_t *shp, id_t id, FILE *fp) (void) smbios_info_cache(shp, id, &c); oprintf(fp, " Level: %u\n", c.smba_level); - oprintf(fp, " Maximum Installed Size: %u bytes\n", c.smba_maxsize); + oprintf(fp, " Maximum Installed Size: %" PRIu64 " bytes\n", + c.smba_maxsize2); - if (c.smba_size != 0) - oprintf(fp, " Installed Size: %u bytes\n", c.smba_size); - else + if (c.smba_size2 != 0) { + oprintf(fp, " Installed Size: %" PRIu64 " bytes\n", + c.smba_size2); + } else { oprintf(fp, " Installed Size: Not Installed\n"); + } if (c.smba_speed != 0) oprintf(fp, " Speed: %uns\n", c.smba_speed); @@ -841,12 +844,12 @@ print_memdevice(smbios_hdl_t *shp, id_t id, FILE *fp) smbios_memdevice_flag_name, smbios_memdevice_flag_desc); if (md.smbmd_speed != 0) - oprintf(fp, " Speed: %u MHz\n", md.smbmd_speed); + oprintf(fp, " Speed: %u MT/s\n", md.smbmd_speed); else oprintf(fp, " Speed: Unknown\n"); if (md.smbmd_clkspeed != 0) - oprintf(fp, " Configured Speed: %u MHz\n", md.smbmd_clkspeed); + oprintf(fp, " Configured Speed: %u MT/s\n", md.smbmd_clkspeed); else oprintf(fp, " Configured Speed: Unknown\n"); diff --git a/usr/src/common/smbios/smb_info.c b/usr/src/common/smbios/smb_info.c index 2eb9d8351b..ea8caaed97 100644 --- a/usr/src/common/smbios/smb_info.c +++ b/usr/src/common/smbios/smb_info.c @@ -21,7 +21,7 @@ /* * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -66,6 +66,7 @@ */ #include +#include #ifdef _KERNEL #include @@ -347,7 +348,10 @@ smbios_info_bios(smbios_hdl_t *shp, smbios_bios_t *bp) return (smb_set_errno(shp, ESMB_CORRUPT)); bip = (smb_bios_t *)(uintptr_t)stp->smbst_hdr; - bzero(bp, sizeof (smbios_bios_t)); + bzero(bp, sizeof (smb_base_bios_t)); + if (smb_libgteq(shp, SMB_VERSION_31)) { + bp->smbb_extromsize = 0; + } bp->smbb_vendor = smb_strptr(stp, bip->smbbi_vendor); bp->smbb_version = smb_strptr(stp, bip->smbbi_version); @@ -377,6 +381,50 @@ smbios_info_bios(smbios_hdl_t *shp, smbios_bios_t *bp) bp->smbb_ecfwv.smbv_minor = bip->smbbi_xcflags[SMB_BIOSXB_ECFW_MIN]; } + + if (bp->smbb_nxcflags > SMB_BIOSXB_EXTROM + 1 && + smb_gteq(shp, SMB_VERSION_31)) { + uint16_t val; + uint64_t rs; + + /* + * Because of the fact that the extended size is a + * uint16_t and we'd need to define an explicit + * endian-aware way to access it, we don't include it in + * the number of extended flags below and thus subtract + * its size. + */ + bp->smbb_nxcflags -= sizeof (uint16_t); + bcopy(&bip->smbbi_xcflags[SMB_BIOSXB_EXTROM], &val, + sizeof (val)); + val = LE_16(val); + + /* + * The upper two bits of the extended rom size are used + * to indicate whether the other 14 bits are in MB or + * GB. + */ + rs = SMB_BIOS_EXTROM_VALUE_MASK(val); + switch (SMB_BIOS_EXTROM_SHIFT_MASK(val)) { + case 0: + rs *= 1024ULL * 1024ULL; + break; + case 1: + rs *= 1024ULL * 1024ULL * 1024ULL; + break; + default: + rs = 0; + break; + } + + if (smb_libgteq(shp, SMB_VERSION_31)) { + bp->smbb_extromsize = rs; + } + } + } + + if (smb_libgteq(shp, SMB_VERSION_31) && bp->smbb_extromsize == 0) { + bp->smbb_extromsize = bp->smbb_romsize; } return (stp->smbst_hdr->smbh_hdl); @@ -442,7 +490,7 @@ smbios_info_chassis(smbios_hdl_t *shp, id_t id, smbios_chassis_t *chp) smb_info_bcopy(stp->smbst_hdr, ch, sizeof (buf)); bzero(chp, sizeof (smb_base_chassis_t)); - if (shp->sh_libvers >= SMB_VERSION_27) { + if (smb_libgteq(shp, SMB_VERSION_27)) { bzero(chp->smbc_sku, sizeof (chp->smbc_sku)); } @@ -458,7 +506,7 @@ smbios_info_chassis(smbios_hdl_t *shp, id_t id, smbios_chassis_t *chp) chp->smbc_elems = ch->smbch_cn; chp->smbc_elemlen = ch->smbch_cm; - if (shp->sh_libvers >= SMB_VERSION_27) { + if (smb_libgteq(shp, SMB_VERSION_27)) { (void) strlcpy(chp->smbc_sku, SMB_CH_SKU(ch), sizeof (chp->smbc_sku)); } @@ -493,17 +541,18 @@ smbios_info_processor(smbios_hdl_t *shp, id_t id, smbios_processor_t *pp) pp->smbp_l2cache = p.smbpr_l2cache; pp->smbp_l3cache = p.smbpr_l3cache; - if (shp->sh_libvers >= SMB_VERSION_25) { + if (smb_libgteq(shp, SMB_VERSION_25)) { pp->smbp_corecount = p.smbpr_corecount; pp->smbp_coresenabled = p.smbpr_coresenabled; pp->smbp_threadcount = p.smbpr_threadcount; pp->smbp_cflags = p.smbpr_cflags; } - if (shp->sh_libvers >= SMB_VERSION_26) + if (smb_libgteq(shp, SMB_VERSION_26)) { pp->smbp_family2 = p.smbpr_family2; + } - if (shp->sh_libvers >= SMB_VERSION_30) { + if (smb_libgteq(shp, SMB_VERSION_30)) { pp->smbp_corecount2 = p.smbpr_corecount2; pp->smbp_coresenabled2 = p.smbpr_coresenabled2; pp->smbp_threadcount2 = p.smbpr_threadcount2; @@ -525,7 +574,7 @@ smbios_info_cache(smbios_hdl_t *shp, id_t id, smbios_cache_t *cap) return (smb_set_errno(shp, ESMB_TYPE)); smb_info_bcopy(stp->smbst_hdr, &c, sizeof (c)); - bzero(cap, sizeof (smbios_cache_t)); + bzero(cap, sizeof (smb_base_cache_t)); cap->smba_maxsize = SMB_CACHE_SIZE(c.smbca_maxsize); cap->smba_size = SMB_CACHE_SIZE(c.smbca_size); @@ -545,6 +594,17 @@ smbios_info_cache(smbios_hdl_t *shp, id_t id, smbios_cache_t *cap) if (SMB_CACHE_CFG_SOCKETED(c.smbca_config)) cap->smba_flags |= SMB_CAF_SOCKETED; + if (smb_libgteq(shp, SMB_VERSION_31)) { + if (smb_gteq(shp, SMB_VERSION_31)) { + cap->smba_maxsize2 = + SMB_CACHE_EXT_SIZE(c.smbca_maxsize2); + cap->smba_size2 = SMB_CACHE_EXT_SIZE(c.smbca_size2); + } else { + cap->smba_maxsize2 = cap->smba_maxsize; + cap->smba_size2 = cap->smba_size; + } + } + return (0); } @@ -841,13 +901,15 @@ smbios_info_memdevice(smbios_hdl_t *shp, id_t id, smbios_memdevice_t *mdp) mdp->smbmd_dloc = smb_strptr(stp, m.smbmdev_dloc); mdp->smbmd_bloc = smb_strptr(stp, m.smbmdev_bloc); - if (shp->sh_libvers >= SMB_VERSION_26) + if (smb_libgteq(shp, SMB_VERSION_26)) { mdp->smbmd_rank = m.smbmdev_attrs & 0x0F; + } - if (shp->sh_libvers >= SMB_VERSION_27) + if (smb_libgteq(shp, SMB_VERSION_27)) { mdp->smbmd_clkspeed = m.smbmdev_clkspeed; + } - if (shp->sh_libvers >= SMB_VERSION_28) { + if (smb_libgteq(shp, SMB_VERSION_28)) { mdp->smbmd_minvolt = m.smbmdev_minvolt; mdp->smbmd_maxvolt = m.smbmdev_maxvolt; mdp->smbmd_confvolt = m.smbmdev_confvolt; diff --git a/usr/src/common/smbios/smb_open.c b/usr/src/common/smbios/smb_open.c index c5417e0c0f..23d4a0aaca 100644 --- a/usr/src/common/smbios/smb_open.c +++ b/usr/src/common/smbios/smb_open.c @@ -21,7 +21,7 @@ /* * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -89,6 +89,7 @@ smbios_bufopen(const smbios_entry_t *ep, const void *buf, size_t len, case SMB_VERSION_27: case SMB_VERSION_28: case SMB_VERSION_30: + case SMB_VERSION_31: break; default: return (smb_open_error(shp, errp, ESMB_VERSION)); @@ -397,6 +398,14 @@ smb_strptr(const smb_struct_t *stp, uint_t i) return ((char *)stp->smbst_str + stp->smbst_strtab[i - 1]); } +int +smb_libgteq(smbios_hdl_t *shp, int version) +{ + return (SMB_MAJOR(shp->sh_libvers) > SMB_MAJOR(version) || ( + SMB_MAJOR(shp->sh_libvers) == SMB_MAJOR(version) && + SMB_MINOR(shp->sh_libvers) >= SMB_MINOR(version))); +} + int smb_gteq(smbios_hdl_t *shp, int version) { diff --git a/usr/src/uts/common/sys/smbios.h b/usr/src/uts/common/sys/smbios.h index 6f0f795af5..86780e68dd 100644 --- a/usr/src/uts/common/sys/smbios.h +++ b/usr/src/uts/common/sys/smbios.h @@ -21,7 +21,7 @@ /* * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -125,6 +125,7 @@ typedef struct smbios_entry { #define SMB_TYPE_ADDINFO 40 /* additional information */ #define SMB_TYPE_OBDEVEXT 41 /* on-board device extended info */ #define SMB_TYPE_MCHI 42 /* mgmt controller host interface */ +#define SMB_TYPE_TPM 43 /* TPM device */ #define SMB_TYPE_INACTIVE 126 /* inactive table entry */ #define SMB_TYPE_EOT 127 /* end of table */ @@ -174,7 +175,9 @@ typedef struct smbios_version { /* * SMBIOS Bios Information. See DSP0134 Section 7.1 for more information. - * smbb_romsize is converted from the implementation format into bytes. + * smbb_romsize is converted from the implementation format into bytes. Note, if + * we do not have an extended BIOS ROM size, it is filled in with the default + * BIOS ROM size. */ typedef struct smbios_bios { const char *smbb_vendor; /* bios vendor string */ @@ -188,6 +191,7 @@ typedef struct smbios_bios { size_t smbb_nxcflags; /* number of smbb_xcflags[] bytes */ smbios_version_t smbb_biosv; /* bios version */ smbios_version_t smbb_ecfwv; /* bios embedded ctrl f/w version */ + uint64_t smbb_extromsize; /* Extended bios ROM Size */ } smbios_bios_t; #define SMB_BIOSFL_RSV0 0x00000001 /* reserved bit zero */ @@ -223,6 +227,11 @@ typedef struct smbios_bios { #define SMB_BIOSFL_I10_CGA 0x40000000 /* int 0x10 CGA svcs */ #define SMB_BIOSFL_NEC_PC98 0x80000000 /* NEC PC-98 */ +/* + * These values are used to allow consumers to have raw access to the extended + * characteristic flags. We explicitly don't include the extended BIOS + * information from section 3.1 as part of this as it has its own member. + */ #define SMB_BIOSXB_1 0 /* bios extension byte 1 (7.1.2.1) */ #define SMB_BIOSXB_2 1 /* bios extension byte 2 (7.1.2.2) */ #define SMB_BIOSXB_BIOS_MAJ 2 /* bios major version */ @@ -349,6 +358,10 @@ typedef struct smbios_chassis { #define SMB_CHT_TABLET 0x1E /* tablet */ #define SMB_CHT_CONVERTIBLE 0x1F /* convertible */ #define SMB_CHT_DETACHABLE 0x20 /* detachable */ +#define SMB_CHT_IOTGW 0x21 /* IoT Gateway */ +#define SMB_CHT_EMBEDPC 0x22 /* Embedded PC */ +#define SMB_CHT_MINIPC 0x23 /* Mini PC */ +#define SMB_CHT_STICKPC 0x24 /* Stick PC */ #define SMB_CHST_OTHER 0x01 /* other */ #define SMB_CHST_UNKNOWN 0x02 /* unknown */ @@ -474,6 +487,13 @@ typedef struct smbios_processor { #define SMB_PRU_BGA1168 0x2E /* BGA1168 */ #define SMB_PRU_BGA1234 0x2F /* BGA1234 */ #define SMB_PRU_BGA1364 0x30 /* BGA1364 */ +#define SMB_PRU_AM4 0x31 /* socket AM4 */ +#define SMB_PRU_LGA1151 0x32 /* LGA1151 */ +#define SMB_PRU_BGA1356 0x33 /* BGA1356 */ +#define SMB_PRU_BGA1440 0x34 /* BGA1440 */ +#define SMB_PRU_BGA1515 0x35 /* BGA1515 */ +#define SMB_PRU_LGA36471 0x36 /* LGA3647-1 */ +#define SMB_PRU_SP3 0x37 /* socket SP3 */ #define SMB_PRC_RESERVED 0x0001 /* reserved */ #define SMB_PRC_UNKNOWN 0x0002 /* unknown */ @@ -526,6 +546,9 @@ typedef struct smbios_processor { #define SMB_PRF_CORE_SOLO_M 0x2A /* Core Solo mobile */ #define SMB_PRF_ATOM 0x2B /* Intel Atom */ #define SMB_PRF_CORE_M 0x2C /* Intel Core M */ +#define SMB_PRF_CORE_M3 0x2D /* Intel Core m3 */ +#define SMB_PRF_CORE_M5 0x2E /* Intel Core m5 */ +#define SMB_PRF_CORE_M7 0x2F /* Intel Core m7 */ #define SMB_PRF_ALPHA 0x30 /* Alpha */ #define SMB_PRF_ALPHA_21064 0x31 /* Alpha 21064 */ #define SMB_PRF_ALPHA_21066 0x32 /* Alpha 21066 */ @@ -577,6 +600,8 @@ typedef struct smbios_processor { #define SMB_PRF_ATHLON_X4 0x66 /* AMD Athlon X4 Quad-Core */ #define SMB_PRF_OPTERON_X1K 0x67 /* AMD Opteron X1000 */ #define SMB_PRF_OPTERON_X2K 0x68 /* AMD Opteron X2000 APU */ +#define SMB_PRF_OPTERON_A 0x69 /* AMD Opteron A Series */ +#define SMB_PRF_OPERTON_X3K 0x6A /* AMD Opteron X3000 APU */ #define SMB_PRF_HOBBIT 0x70 /* Hobbit */ #define SMB_PRF_TM5000 0x78 /* Crusoe TM5000 */ #define SMB_PRF_TM3000 0x79 /* Crusoe TM3000 */ @@ -677,6 +702,8 @@ typedef struct smbios_processor { #define SMB_PRF_SEMPRON_M 0xEF /* AMD Sempron M */ #define SMB_PRF_I860 0xFA /* i860 */ #define SMB_PRF_I960 0xFB /* i960 */ +#define SMB_PRF_ARMv7 0x100 /* ARMv7 */ +#define SMB_PRF_ARMv8 0x101 /* ARMv8 */ #define SMB_PRF_SH3 0x104 /* SH-3 */ #define SMB_PRF_SH4 0x105 /* SH-4 */ #define SMB_PRF_ARM 0x118 /* ARM */ @@ -691,6 +718,12 @@ typedef struct smbios_processor { /* * SMBIOS Cache Information. See DSP0134 Section 7.8 for more information. * If smba_size is zero, this indicates the specified cache is not present. + * + * SMBIOS 3.1 added extended cache sizes. Unfortunately, we had already baked in + * the uint32_t sizes, so we added extended uint64_t's that correspond to the + * new fields. To make life easier for consumers, we always make sure that the + * _maxsize2 and _size2 members are filled in with the old value if no other + * value is present. */ typedef struct smbios_cache { uint32_t smba_maxsize; /* maximum installed size in bytes */ @@ -705,6 +738,8 @@ typedef struct smbios_cache { uint8_t smba_mode; /* cache mode (SMB_CAM_*) */ uint8_t smba_location; /* cache location (SMB_CAL_*) */ uint8_t smba_flags; /* cache flags (SMB_CAF_*) */ + uint64_t smba_maxsize2; /* maximum installed size in bytes */ + uint64_t smba_size2; /* installed size in bytes */ } smbios_cache_t; #define SMB_CAT_OTHER 0x0001 /* other */ @@ -899,6 +934,14 @@ typedef struct smbios_slot { #define SMB_SLT_MXM3_B 0x1E /* MXM 3.0 Type B */ #define SMB_SLT_PCIEG2_SFF 0x1F /* PCI Express Gen 2 SFF-8639 */ #define SMB_SLT_PCIEG3_SFF 0x20 /* PCI Express Gen 3 SFF-8639 */ +/* + * These lines must be on one line for the string generating code. + */ +/* BEGIN CSTYLED */ +#define SMB_SLT_PCIE_M52_WBSKO 0x21 /* PCI Express Mini 52-pin with bottom-side keep-outs */ +#define SMB_SLT_PCIE_M52_WOBSKO 0x22 /* PCI Express Mini 52-pin without bottom-side keep-outs */ +/* END CSTYLED */ +#define SMB_SLT_PCIE_M76 0x23 /* PCI Express Mini 72-pin */ #define SMB_SLT_PC98_C20 0xA0 /* PC-98/C20 */ #define SMB_SLT_PC98_C24 0xA1 /* PC-98/C24 */ #define SMB_SLT_PC98_E 0xA2 /* PC-98/E */ @@ -1105,7 +1148,7 @@ typedef struct smbios_memdevice { uint8_t smbmd_type; /* memory type */ uint8_t smbmd_pad; /* padding */ uint32_t smbmd_flags; /* flags (see below) */ - uint32_t smbmd_speed; /* speed in MHz */ + uint32_t smbmd_speed; /* speed in MT/s */ const char *smbmd_dloc; /* physical device locator string */ const char *smbmd_bloc; /* physical bank locator string */ uint8_t smbmd_rank; /* rank */ @@ -1355,7 +1398,8 @@ typedef struct smbios_memdevice_ext { #define SMB_VERSION_27 0x0207 /* SMBIOS encoding for DMTF spec 2.7 */ #define SMB_VERSION_28 0x0208 /* SMBIOS encoding for DMTF spec 2.8 */ #define SMB_VERSION_30 0x0300 /* SMBIOS encoding for DMTF spec 3.0 */ -#define SMB_VERSION SMB_VERSION_30 /* SMBIOS latest version definitions */ +#define SMB_VERSION_31 0x0301 /* SMBIOS encoding for DMTF spec 3.1 */ +#define SMB_VERSION SMB_VERSION_31 /* SMBIOS latest version definitions */ #define SMB_O_NOCKSUM 0x1 /* do not verify header checksums */ #define SMB_O_NOVERS 0x2 /* do not verify header versions */ diff --git a/usr/src/uts/common/sys/smbios_impl.h b/usr/src/uts/common/sys/smbios_impl.h index 94c107bb63..24ba461620 100644 --- a/usr/src/uts/common/sys/smbios_impl.h +++ b/usr/src/uts/common/sys/smbios_impl.h @@ -21,7 +21,7 @@ /* * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2015 Joyent, Inc. + * Copyright 2016 Joyent, Inc. * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -51,6 +51,14 @@ extern "C" { #endif +/* + * Definitions required to interpret the BIOS type information. + */ +#define SMB_BIOSXB_EXTROM 6 + +#define SMB_BIOS_EXTROM_VALUE_MASK(x) ((x) & 0x3fff) +#define SMB_BIOS_EXTROM_SHIFT_MASK(x) (((x) & 0xc000) >> 14) + #pragma pack(1) typedef struct smb_header { @@ -163,6 +171,8 @@ typedef struct smb_cache { uint8_t smbca_etype; /* error correction type */ uint8_t smbca_ltype; /* logical cache type */ uint8_t smbca_assoc; /* associativity */ + uint32_t smbca_maxsize2; /* maximum installed size 2 */ + uint32_t smbca_size2; /* installed size 2 */ } smb_cache_t; /* @@ -173,6 +183,10 @@ typedef struct smb_cache { #define SMB_CACHE_SIZE(s) (((s) & 0x8000) ? \ ((uint32_t)((s) & 0x7FFF) * 64 * 1024) : ((uint32_t)(s) * 1024)) +#define SMB_CACHE_EXT_SIZE(s) (((s) & 0x80000000U) ? \ + ((uint64_t)((s) & 0x7FFFFFFFULL) * 64ULL * 1024ULL) : \ + ((uint64_t)(s) * 1024ULL)) + #define SMB_CACHE_CFG_MODE(c) (((c) >> 8) & 3) #define SMB_CACHE_CFG_ENABLED(c) (((c) >> 7) & 1) #define SMB_CACHE_CFG_LOCATION(c) (((c) >> 5) & 3) @@ -272,7 +286,7 @@ typedef struct smb_memdevice { uint8_t smbmdev_bloc; /* bank locator */ uint8_t smbmdev_type; /* memory type */ uint16_t smbmdev_flags; /* detail flags */ - uint16_t smbmdev_speed; /* speed in MHz */ + uint16_t smbmdev_speed; /* speed in MT/s */ uint8_t smbmdev_manufacturer; /* manufacturer */ uint8_t smbmdev_serial; /* serial number */ uint8_t smbmdev_asset; /* asset tag */ @@ -498,6 +512,7 @@ extern const smb_struct_t *smb_lookup_type(smbios_hdl_t *, uint_t); extern const smb_struct_t *smb_lookup_id(smbios_hdl_t *, uint_t); extern const char *smb_strptr(const smb_struct_t *, uint_t); extern int smb_gteq(smbios_hdl_t *, int); +extern int smb_libgteq(smbios_hdl_t *, int); extern int smb_set_errno(smbios_hdl_t *, int); extern smbios_hdl_t *smb_open_error(smbios_hdl_t *, int *, int); @@ -566,6 +581,34 @@ typedef struct smb_base_memdevice { uint8_t smbbmd_rank; /* rank */ } smb_base_memdevice_t; +typedef struct smb_base_bios { + const char *smbbb_vendor; /* bios vendor string */ + const char *smbbb_version; /* bios version string */ + const char *smbbb_reldate; /* bios release date */ + uint32_t smbbb_segment; /* bios address segment location */ + uint32_t smbbb_romsize; /* bios rom size in bytes */ + uint32_t smbbb_runsize; /* bios image size in bytes */ + uint64_t smbbb_cflags; /* bios characteristics */ + const uint8_t *smbbb_xcflags; /* bios characteristics extensions */ + size_t smbbb_nxcflags; /* number of smbb_xcflags[] bytes */ + smbios_version_t smbbb_biosv; /* bios version */ + smbios_version_t smbbb_ecfwv; /* bios embedded ctrl f/w version */ +} smb_base_bios_t; + +typedef struct smb_base_cache { + uint32_t smbba_maxsize; /* maximum installed size in bytes */ + uint32_t smbba_size; /* installed size in bytes */ + uint16_t smbba_stype; /* supported SRAM types (SMB_CAT_*) */ + uint16_t smbba_ctype; /* current SRAM type (SMB_CAT_*) */ + uint8_t smbba_speed; /* speed in nanoseconds */ + uint8_t smbba_etype; /* error correction type (SMB_CAE_*) */ + uint8_t smbba_ltype; /* logical cache type (SMB_CAG_*) */ + uint8_t smbba_assoc; /* associativity (SMB_CAA_*) */ + uint8_t smbba_level; /* cache level */ + uint8_t smbba_mode; /* cache mode (SMB_CAM_*) */ + uint8_t smbba_location; /* cache location (SMB_CAL_*) */ + uint8_t smbba_flags; /* cache flags (SMB_CAF_*) */ +} smb_base_cache_t; #ifdef __cplusplus } -- cgit v1.2.3 From cb159270e9e67dea31dfbd991ec758829de14d35 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Mon, 23 Jan 2017 21:32:09 +0300 Subject: 7800 Support build with OpenJDK 8 Reviewed by: Adam Števko Reviewed by: Richard Lowe Reviewed by: Toomas Soome Approved by: Dan McDonald MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/Makefile.master | 2 ++ usr/src/cmd/pools/poold/Makefile | 14 +++++++++++--- usr/src/cmd/pools/poold/libjkstat/Makefile | 3 +-- usr/src/cmd/pools/poold/libjkstat/amd64/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjkstat/sparcv9/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjlgrp/Makefile | 3 +-- usr/src/cmd/pools/poold/libjlgrp/amd64/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjlgrp/sparcv9/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjpool/Makefile | 3 +-- usr/src/cmd/pools/poold/libjpool/amd64/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjpool/sparcv9/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjsyslog/Makefile | 3 +-- usr/src/cmd/pools/poold/libjsyslog/amd64/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/libjsyslog/sparcv9/Makefile | 19 +++++++++++++++++++ usr/src/cmd/pools/poold/poold.c | 12 ------------ usr/src/lib/libdns_sd/java/com/apple/dnssd/Makefile | 6 +++--- usr/src/lib/libdtrace_jni/java/Makefile | 3 ++- usr/src/pkg/Makefile | 8 +++++++- usr/src/pkg/manifests/developer-dtrace.mf | 17 ++++++++++++----- usr/src/pkg/manifests/service-network-dns-mdns.mf | 17 ++++++++++++----- usr/src/pkg/manifests/service-resource-pools-poold.mf | 1 - 21 files changed, 205 insertions(+), 39 deletions(-) create mode 100644 usr/src/cmd/pools/poold/libjkstat/amd64/Makefile create mode 100644 usr/src/cmd/pools/poold/libjkstat/sparcv9/Makefile create mode 100644 usr/src/cmd/pools/poold/libjlgrp/amd64/Makefile create mode 100644 usr/src/cmd/pools/poold/libjlgrp/sparcv9/Makefile create mode 100644 usr/src/cmd/pools/poold/libjpool/amd64/Makefile create mode 100644 usr/src/cmd/pools/poold/libjpool/sparcv9/Makefile create mode 100644 usr/src/cmd/pools/poold/libjsyslog/amd64/Makefile create mode 100644 usr/src/cmd/pools/poold/libjsyslog/sparcv9/Makefile (limited to 'usr/src') diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 4e318c18b3..65490612ef 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -120,6 +120,8 @@ ONBLD_TOOLS= $(BUILD_TOOLS)/onbld JAVA_HOME= /usr/java # define buildtime JAVA_ROOT JAVA_ROOT= /usr/java +# define to build with JAVA 8 +BLD_JAVA_8= $(POUND_SIGN) GCC_ROOT= /opt/gcc/4.4.4 GCCLIBDIR= $(GCC_ROOT)/lib diff --git a/usr/src/cmd/pools/poold/Makefile b/usr/src/cmd/pools/poold/Makefile index 814fa34c09..cc1e3791f1 100644 --- a/usr/src/cmd/pools/poold/Makefile +++ b/usr/src/cmd/pools/poold/Makefile @@ -32,6 +32,7 @@ MANIFEST= poold.xml SVCMETHOD= svc-poold include $(SRC)/cmd/Makefile.cmd +$(BLD_JAVA_8)include $(SRC)/cmd/Makefile.cmd.64 JAVA_SUBDIRS = com/sun/solaris/service/exception \ com/sun/solaris/service/kstat \ @@ -58,6 +59,11 @@ msg := TARGET = msg $(ROOTMANIFEST):= FILEMODE= 444 JARFILE = JPool.jar +JAVA_LIB_PATH = $(JAVA_ROOT)/jre/lib/$(MACH)/client +LIBPOOL_PATH = $(ROOTLIB) +$(BLD_JAVA_8)JAVA_LIB_PATH = $(JAVA_ROOT)/jre/lib/$(MACH64)/server +$(BLD_JAVA_8)LIBPOOL_PATH = $(ROOTLIB64) + # JAVA_SUBDIRS and PACKAGEDOCS must be synchronized to ensure # javadoc documentation is generated for all packages. @@ -73,11 +79,13 @@ ROOTUSRLIBDRP = $(ROOTLIB)/pool INCS = -I../common \ -I$(JAVA_ROOT)/include \ -I$(JAVA_ROOT)/include/solaris -LDLIBS += -lpool -L$(JAVA_ROOT)/jre/lib/$(MACH)/client -ljvm +LDLIBS += -lpool -L$(JAVA_LIB_PATH) -ljvm # runpath should point to runtime JAVA_HOME -LDFLAGS += -R$(JAVA_HOME)/jre/lib/$(MACH)/client +LDFLAGS += -R$(JAVA_LIB_PATH) + LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2 -LINTLIBS += -L$(ROOTLIB) -lpool +$(BLD_JAVA_8)LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2 +LINTLIBS += -L$(LIBPOOL_PATH) -lpool CPPFLAGS += $(INCS) ROOTCMDDIR = $(ROOT)/usr/lib/pool diff --git a/usr/src/cmd/pools/poold/libjkstat/Makefile b/usr/src/cmd/pools/poold/libjkstat/Makefile index 6f9caf443b..810de1da26 100644 --- a/usr/src/cmd/pools/poold/libjkstat/Makefile +++ b/usr/src/cmd/pools/poold/libjkstat/Makefile @@ -22,12 +22,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include $(SRC)/lib/Makefile.lib SUBDIRS = $(MACH) +$(BLD_JAVA_8)SUBDIRS = $(MACH64) all := TARGET = all clean := TARGET = clean diff --git a/usr/src/cmd/pools/poold/libjkstat/amd64/Makefile b/usr/src/cmd/pools/poold/libjkstat/amd64/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjkstat/amd64/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjkstat/sparcv9/Makefile b/usr/src/cmd/pools/poold/libjkstat/sparcv9/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjkstat/sparcv9/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjlgrp/Makefile b/usr/src/cmd/pools/poold/libjlgrp/Makefile index 15721c3e8f..e8481498b8 100644 --- a/usr/src/cmd/pools/poold/libjlgrp/Makefile +++ b/usr/src/cmd/pools/poold/libjlgrp/Makefile @@ -22,12 +22,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include $(SRC)/lib/Makefile.lib SUBDIRS = $(MACH) +$(BLD_JAVA_8)SUBDIRS = $(MACH64) all := TARGET = all clean := TARGET = clean diff --git a/usr/src/cmd/pools/poold/libjlgrp/amd64/Makefile b/usr/src/cmd/pools/poold/libjlgrp/amd64/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjlgrp/amd64/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjlgrp/sparcv9/Makefile b/usr/src/cmd/pools/poold/libjlgrp/sparcv9/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjlgrp/sparcv9/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjpool/Makefile b/usr/src/cmd/pools/poold/libjpool/Makefile index 8cdd821a9e..1a1b192654 100644 --- a/usr/src/cmd/pools/poold/libjpool/Makefile +++ b/usr/src/cmd/pools/poold/libjpool/Makefile @@ -22,12 +22,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include $(SRC)/lib/Makefile.lib SUBDIRS = $(MACH) +$(BLD_JAVA_8)SUBDIRS = $(MACH64) all := TARGET = all clean := TARGET = clean diff --git a/usr/src/cmd/pools/poold/libjpool/amd64/Makefile b/usr/src/cmd/pools/poold/libjpool/amd64/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjpool/amd64/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjpool/sparcv9/Makefile b/usr/src/cmd/pools/poold/libjpool/sparcv9/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjpool/sparcv9/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjsyslog/Makefile b/usr/src/cmd/pools/poold/libjsyslog/Makefile index 80b59a3afb..e92960f43a 100644 --- a/usr/src/cmd/pools/poold/libjsyslog/Makefile +++ b/usr/src/cmd/pools/poold/libjsyslog/Makefile @@ -22,12 +22,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include $(SRC)/lib/Makefile.lib SUBDIRS = $(MACH) +$(BLD_JAVA_8)SUBDIRS = $(MACH64) all := TARGET = all clean := TARGET = clean diff --git a/usr/src/cmd/pools/poold/libjsyslog/amd64/Makefile b/usr/src/cmd/pools/poold/libjsyslog/amd64/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjsyslog/amd64/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/libjsyslog/sparcv9/Makefile b/usr/src/cmd/pools/poold/libjsyslog/sparcv9/Makefile new file mode 100644 index 0000000000..519c74c98b --- /dev/null +++ b/usr/src/cmd/pools/poold/libjsyslog/sparcv9/Makefile @@ -0,0 +1,19 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2017 Alexander Pyhalov +# + +include ../Makefile.com +include $(SRC)/Makefile.master.64 + +install: all $(ROOTLIBS) $(ROOTLINKS) diff --git a/usr/src/cmd/pools/poold/poold.c b/usr/src/cmd/pools/poold/poold.c index b354ebc99c..bb18d7e856 100644 --- a/usr/src/cmd/pools/poold/poold.c +++ b/usr/src/cmd/pools/poold/poold.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * poold - dynamically adjust pool configuration according to load. */ @@ -54,16 +52,6 @@ #define POOLD_DEF_LIBPATH "/usr/lib/pool" #define SMF_SVC_INSTANCE "svc:/system/pools/dynamic:default" -#if defined(sparc) -#define PLAT "sparc" -#else -#if defined(i386) -#define PLAT "i386" -#else -#error Unrecognized platform. -#endif -#endif - #define CLASS_FIELD_DESC(class_desc) "L" class_desc ";" #define LEVEL_CLASS_DESC "java/util/logging/Level" diff --git a/usr/src/lib/libdns_sd/java/com/apple/dnssd/Makefile b/usr/src/lib/libdns_sd/java/com/apple/dnssd/Makefile index 1da9c33f51..334b97f158 100644 --- a/usr/src/lib/libdns_sd/java/com/apple/dnssd/Makefile +++ b/usr/src/lib/libdns_sd/java/com/apple/dnssd/Makefile @@ -22,7 +22,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" include ../Makefile.com @@ -43,6 +42,7 @@ DOCAPIDIR = $(JAVASRCDIR)/docs/api DOCDESTDIR = $(ROOTDNSSDJAVAHOME)/javadoc/dnssd DOCAPIDESTDIR = $(DOCDESTDIR)/api DOCEXAMPLESDESTDIR = $(DOCDESTDIR)/examples +$(BLD_JAVA_8)XDOCLINT_OPTION = -Xdoclint:none EXAMPLESDIR = $(JAVASRCDIR)/docs/examples EXAMPLESSRC = $(JAVASRCDIR)/docs/examples/src @@ -140,11 +140,11 @@ $(DOCEXAMPLESDESTDIR)/%: % install_doc: $(CLASSES) $(DOCAPIDESTDIR) -$(RM) -r $(DOCAPIDESTDIR)/* cd $(TOP); umask 022; \ - $(JAVADOC) $(JAVASRCDIR)/*.java -notimestamp -classpath \ + $(JAVADOC) $(JAVASRCDIR)/*.java $(XDOCLINT_OPTION) -notimestamp -classpath \ $(CLASSPATH) -d $(DOCAPIDESTDIR) -public $(DNSSD_PKG) doc: -@mkdir -p $(DOCAPIDIR) cd $(TOP); umask 022; \ - $(JAVADOC) $(JAVASRCDIR)/*.java -notimestamp -classpath \ + $(JAVADOC) $(JAVASRCDIR)/*.java $(XDOCLINT_OPTION) -notimestamp -classpath \ $(CLASSPATH) -d $(DOCAPIDIR) -public $(DNSSD_PKG) diff --git a/usr/src/lib/libdtrace_jni/java/Makefile b/usr/src/lib/libdtrace_jni/java/Makefile index e0f3e8e31a..3141eeaa90 100644 --- a/usr/src/lib/libdtrace_jni/java/Makefile +++ b/usr/src/lib/libdtrace_jni/java/Makefile @@ -55,6 +55,7 @@ DOCAPIDESTDIR=$(DOCDESTDIR)/api DOCEXAMPLESDESTDIR=$(DOCDESTDIR)/examples DOCHTMLDESTDIR=$(DOCDESTDIR)/html DOCIMAGESDESTDIR=$(DOCDESTDIR)/images +$(BLD_JAVA_8)XDOCLINT_OPTION=-Xdoclint:none $(JARDESTDIR)/%: $(JARS)/% $(INS.file) @@ -189,7 +190,7 @@ $(DOCAPIDESTDIR)/index.html: $(DTRACE_API_CLASSES) -@mkdir -p $(DOCAPIDESTDIR) -$(RM) -r $(DOCAPIDESTDIR)/* cd $(APIJAVASRC); umask 022; \ - $(JAVADOC) -protected -use -notimestamp \ + $(JAVADOC) -protected -use -notimestamp $(XDOCLINT_OPTION) \ -classpath $(APICLASSPATH) -d $(DOCAPIDESTDIR) \ $(PKGNAME) diff --git a/usr/src/pkg/Makefile b/usr/src/pkg/Makefile index a00bdfc452..e1e1880dbc 100644 --- a/usr/src/pkg/Makefile +++ b/usr/src/pkg/Makefile @@ -167,6 +167,10 @@ PM_TRANSFORMS= common_actions publish restart_fmri facets defaults \ extract_metadata PM_INC= transforms manifests +JAVA_8_ONLY=$(BLD_JAVA_8) +JAVA_7_ONLY= +$(BLD_JAVA_8)JAVA_7_ONLY=$(POUND_SIGN) + PKGMOG_DEFINES= \ i386_ONLY=$(POUND_SIGN) \ sparc_ONLY=$(POUND_SIGN) \ @@ -182,7 +186,9 @@ PKGMOG_DEFINES= \ PERL_VERSION=$(PERL_VERSION) \ PERL_PKGVERS=$(PERL_PKGVERS) \ PYTHON_VERSION=$(PYTHON_VERSION) \ - PYTHON_PKGVERS=$(PYTHON_PKGVERS) + PYTHON_PKGVERS=$(PYTHON_PKGVERS) \ + JAVA_8_ONLY=$(JAVA_8_ONLY) \ + JAVA_7_ONLY=$(JAVA_7_ONLY) PKGDEP_TOKENS_i386= \ 'PLATFORM=i86hvm' \ diff --git a/usr/src/pkg/manifests/developer-dtrace.mf b/usr/src/pkg/manifests/developer-dtrace.mf index dad7a39f2e..d8ebeb21a1 100644 --- a/usr/src/pkg/manifests/developer-dtrace.mf +++ b/usr/src/pkg/manifests/developer-dtrace.mf @@ -66,7 +66,8 @@ dir path=usr/share/lib/java/javadoc/dtrace/api/org/opensolaris/os/dtrace \ dir \ path=usr/share/lib/java/javadoc/dtrace/api/org/opensolaris/os/dtrace/class-use \ group=other -dir path=usr/share/lib/java/javadoc/dtrace/api/resources group=other +$(JAVA_7_ONLY)dir path=usr/share/lib/java/javadoc/dtrace/api/resources \ + group=other dir path=usr/share/lib/java/javadoc/dtrace/examples group=other dir path=usr/share/lib/java/javadoc/dtrace/html group=other dir path=usr/share/lib/java/javadoc/dtrace/images group=other @@ -624,12 +625,18 @@ file \ group=other file path=usr/share/lib/java/javadoc/dtrace/api/overview-tree.html group=other file path=usr/share/lib/java/javadoc/dtrace/api/package-list group=other -file path=usr/share/lib/java/javadoc/dtrace/api/resources/background.gif \ +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dtrace/api/resources/background.gif \ + group=other +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dtrace/api/resources/tab.gif group=other +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar.gif \ group=other -file path=usr/share/lib/java/javadoc/dtrace/api/resources/tab.gif group=other -file path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar.gif \ +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar_end.gif \ group=other -file path=usr/share/lib/java/javadoc/dtrace/api/resources/titlebar_end.gif \ +$(JAVA_8_ONLY)file path=usr/share/lib/java/javadoc/dtrace/api/script.js \ group=other file path=usr/share/lib/java/javadoc/dtrace/api/serialized-form.html \ group=other diff --git a/usr/src/pkg/manifests/service-network-dns-mdns.mf b/usr/src/pkg/manifests/service-network-dns-mdns.mf index d88be620ac..4c809b4ae7 100644 --- a/usr/src/pkg/manifests/service-network-dns-mdns.mf +++ b/usr/src/pkg/manifests/service-network-dns-mdns.mf @@ -52,7 +52,8 @@ dir path=usr/share/lib/java/javadoc/dnssd/api group=other dir path=usr/share/lib/java/javadoc/dnssd/api/com group=other dir path=usr/share/lib/java/javadoc/dnssd/api/com/apple group=other dir path=usr/share/lib/java/javadoc/dnssd/api/com/apple/dnssd group=other -dir path=usr/share/lib/java/javadoc/dnssd/api/resources group=other +$(JAVA_7_ONLY)dir path=usr/share/lib/java/javadoc/dnssd/api/resources \ + group=other dir path=usr/share/lib/java/javadoc/dnssd/examples group=other dir path=usr/share/man dir path=usr/share/man/man1m @@ -133,12 +134,18 @@ file path=usr/share/lib/java/javadoc/dnssd/api/index-all.html group=other file path=usr/share/lib/java/javadoc/dnssd/api/index.html group=other file path=usr/share/lib/java/javadoc/dnssd/api/overview-tree.html group=other file path=usr/share/lib/java/javadoc/dnssd/api/package-list group=other -file path=usr/share/lib/java/javadoc/dnssd/api/resources/background.gif \ +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dnssd/api/resources/background.gif \ + group=other +$(JAVA_7_ONLY)file path=usr/share/lib/java/javadoc/dnssd/api/resources/tab.gif \ + group=other +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar.gif \ group=other -file path=usr/share/lib/java/javadoc/dnssd/api/resources/tab.gif group=other -file path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar.gif \ +$(JAVA_7_ONLY)file \ + path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar_end.gif \ group=other -file path=usr/share/lib/java/javadoc/dnssd/api/resources/titlebar_end.gif \ +$(JAVA_8_ONLY)file path=usr/share/lib/java/javadoc/dnssd/api/script.js \ group=other file path=usr/share/lib/java/javadoc/dnssd/api/serialized-form.html \ group=other diff --git a/usr/src/pkg/manifests/service-resource-pools-poold.mf b/usr/src/pkg/manifests/service-resource-pools-poold.mf index 9f87fa566c..28abe1ac18 100644 --- a/usr/src/pkg/manifests/service-resource-pools-poold.mf +++ b/usr/src/pkg/manifests/service-resource-pools-poold.mf @@ -48,4 +48,3 @@ link path=usr/lib/pool/libjkstat.so target=./libjkstat.so.1 link path=usr/lib/pool/libjlgrp.so target=./libjlgrp.so.1 link path=usr/lib/pool/libjpool.so target=./libjpool.so.1 link path=usr/lib/pool/libjsyslog.so target=./libjsyslog.so.1 -depend fmri=runtime/java type=require -- cgit v1.2.3