summaryrefslogtreecommitdiff
path: root/usr/src/cmd
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-09-15 11:42:47 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-09-15 11:42:47 +0000
commitf7574faa28377b92a6f201cfcf7983ca3a21c874 (patch)
treedd4c979345e7b5320516ba6ffd8ec484c7d4bd66 /usr/src/cmd
parent91d438ebb667692f17584aae5640c22818cdab70 (diff)
parentd92a2ce76311170b6aa244c3a22f3a3754dad613 (diff)
downloadillumos-joyent-f7574faa28377b92a6f201cfcf7983ca3a21c874.tar.gz
[illumos-gate merge]
commit d92a2ce76311170b6aa244c3a22f3a3754dad613 13139 bhyve bungles math for VMX ins/outs size commit 9cfcc091666d5546e419c22f4963474d11673f5e 13137 zfs: warn: inconsistent indenting commit 8ad93a826ff9af944e63c7d84b30cba79dc36d54 13121 mdb smbios dmod could work for libsmbios commit c6795799963479a5ddb9b97ebb4cf6c1c97c1fba 13119 Want support for SMBIOS 3.4 commit 1718c31669d146508ea805e88322f5b74d892762 13081 add mlxcx temp sensor commit 1045e13a248d94941f864998aa859970ae3a4154 13079 Add ksensor support for voltage and current sensors commit eee178623516e461188f137dc6e5e38875967e09 12967 default to apix over pcplusmp
Diffstat (limited to 'usr/src/cmd')
-rw-r--r--usr/src/cmd/mdb/intel/amd64/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/amd64/libsmbios/Makefile27
-rw-r--r--usr/src/cmd/mdb/intel/ia32/Makefile2
-rw-r--r--usr/src/cmd/mdb/intel/ia32/libsmbios/Makefile26
-rw-r--r--usr/src/cmd/mdb/intel/modules/smbios/smbios.c2
-rw-r--r--usr/src/cmd/smbios/smbios.c22
6 files changed, 77 insertions, 4 deletions
diff --git a/usr/src/cmd/mdb/intel/amd64/Makefile b/usr/src/cmd/mdb/intel/amd64/Makefile
index 6ddc6b59d5..39d3574f15 100644
--- a/usr/src/cmd/mdb/intel/amd64/Makefile
+++ b/usr/src/cmd/mdb/intel/amd64/Makefile
@@ -27,7 +27,7 @@
include ../../Makefile.common
MODULES = $(COMMON_MODULES_PROC) $(COMMON_MODULES_KVM)
-MODULES += disk_label uhci
+MODULES += disk_label uhci libsmbios
SUBDIRS = mdb mdb_ks kmdb libstandctf libstand .WAIT $(MODULES)
diff --git a/usr/src/cmd/mdb/intel/amd64/libsmbios/Makefile b/usr/src/cmd/mdb/intel/amd64/libsmbios/Makefile
new file mode 100644
index 0000000000..a04ca7df17
--- /dev/null
+++ b/usr/src/cmd/mdb/intel/amd64/libsmbios/Makefile
@@ -0,0 +1,27 @@
+#
+# 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 2020 Oxide Computer Company
+#
+
+MODULE = libsmbios.so
+MDBTGT = proc
+
+MODSRCS = smbios.c
+
+include ../../../../Makefile.cmd
+include ../../../../Makefile.cmd.64
+include ../../Makefile.amd64
+include ../../../Makefile.module
+
+MODSRCS_DIR = ../../modules/smbios
+LDLIBS += -lsmbios
diff --git a/usr/src/cmd/mdb/intel/ia32/Makefile b/usr/src/cmd/mdb/intel/ia32/Makefile
index cb544a52d2..9d8f9efe87 100644
--- a/usr/src/cmd/mdb/intel/ia32/Makefile
+++ b/usr/src/cmd/mdb/intel/ia32/Makefile
@@ -28,7 +28,7 @@
include ../../Makefile.common
MODULES = $(COMMON_MODULES_PROC) $(COMMON_MODULES_PROC_32BIT)
-MODULES += disk_label
+MODULES += disk_label libsmbios
SUBDIRS = mdb .WAIT $(MODULES)
diff --git a/usr/src/cmd/mdb/intel/ia32/libsmbios/Makefile b/usr/src/cmd/mdb/intel/ia32/libsmbios/Makefile
new file mode 100644
index 0000000000..14491786c2
--- /dev/null
+++ b/usr/src/cmd/mdb/intel/ia32/libsmbios/Makefile
@@ -0,0 +1,26 @@
+#
+# 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 2020 Oxide Computer Company
+#
+
+MODULE = libsmbios.so
+MDBTGT = proc
+
+MODSRCS = smbios.c
+
+include ../../../../Makefile.cmd
+include ../../Makefile.ia32
+include ../../../Makefile.module
+
+MODSRCS_DIR = ../../modules/smbios
+LDLIBS += -lsmbios
diff --git a/usr/src/cmd/mdb/intel/modules/smbios/smbios.c b/usr/src/cmd/mdb/intel/modules/smbios/smbios.c
index 429a5fba0e..1b692d45b1 100644
--- a/usr/src/cmd/mdb/intel/modules/smbios/smbios.c
+++ b/usr/src/cmd/mdb/intel/modules/smbios/smbios.c
@@ -28,7 +28,7 @@
* _KERNEL. Therefore we have to manually declare an extern delaration for
* strerror().
*/
-extern const char *strerror(int);
+extern char *strerror(int);
/*
* Take an existing smbios_hdl_t from a dump and slurp out its memory so we can
diff --git a/usr/src/cmd/smbios/smbios.c b/usr/src/cmd/smbios/smbios.c
index 9c6d058182..399a85501e 100644
--- a/usr/src/cmd/smbios/smbios.c
+++ b/usr/src/cmd/smbios/smbios.c
@@ -22,6 +22,7 @@
/*
* Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
* Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2020 Oxide Computer Company
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -736,7 +737,7 @@ print_slot(smbios_hdl_t *shp, id_t id, FILE *fp)
oprintf(fp, " Slot Peer %u:\n", i);
oprintf(fp, " Segment group: %u\n",
peer[i].smblp_group);
- oprintf(fp, " Bus/Device/Function: %u/%u/%u",
+ oprintf(fp, " Bus/Device/Function: %u/%u/%u\n",
peer[i].smblp_bus, peer[i].smblp_device,
peer[i].smblp_function);
oprintf(fp, " Electrical width: %u\n",
@@ -745,6 +746,25 @@ print_slot(smbios_hdl_t *shp, id_t id, FILE *fp)
smbios_info_slot_peers_free(shp, npeers, peer);
}
+
+ if (s.smbl_info != 0) {
+ if (s.smbl_type >= SMB_SLT_PCIE &&
+ s.smbl_type <= SMB_SLT_PCIEG6P) {
+ oprintf(fp, " PCIe Generation: %d\n", s.smbl_info);
+ } else {
+ oprintf(fp, " Slot Type: 0x%x\n", s.smbl_info);
+ }
+ }
+
+ if (s.smbl_pwidth != 0) {
+ desc_printf(smbios_slot_width_desc(s.smbl_pwidth),
+ fp, " Physical Width: 0x%x", s.smbl_pwidth);
+ }
+
+ if (s.smbl_pitch != 0) {
+ oprintf(fp, " Slot Pitch: %u.%u mm\n", s.smbl_pitch / 100,
+ s.smbl_pitch % 100);
+ }
}
static void