summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/smbios/smbios.c20
-rw-r--r--usr/src/uts/common/sys/smbios.h11
2 files changed, 21 insertions, 10 deletions
diff --git a/usr/src/cmd/smbios/smbios.c b/usr/src/cmd/smbios/smbios.c
index 0d3f110961..5597e04fc5 100644
--- a/usr/src/cmd/smbios/smbios.c
+++ b/usr/src/cmd/smbios/smbios.c
@@ -177,13 +177,23 @@ jedec_print(FILE *fp, const char *desc, uint_t id)
const char *name;
uint_t cont, vendor;
- vendor = id & 0xff;
- cont = (id >> 8) & 0xff;
+ /*
+ * SMBIOS encodes data in the way that the underlying memory standard
+ * does. In this case, the upper byte indicates the vendor that we care
+ * about while the lower byte indicates the number of continuations that
+ * are needed. libjedec indexes this based on zero (e.g. table 1 is zero
+ * continuations), which is how the spec encodes it. We add one so that
+ * we can match how the spec describes it.
+ */
+ vendor = id >> 8;
+ cont = id & 0x7f;
name = libjedec_vendor_string(cont, vendor);
if (name == NULL) {
- oprintf(fp, " %s: 0x%x\n", desc, id);
+ oprintf(fp, " %s: Bank: 0x%x Vendor: 0x%x\n", desc, cont + 1,
+ vendor);
} else {
- oprintf(fp, " %s: 0x%x (%s)\n", desc, id, name);
+ oprintf(fp, " %s: Bank: 0x%x Vendor: 0x%x (%s)\n", desc,
+ cont + 1, vendor, name);
}
}
@@ -994,7 +1004,7 @@ print_memdevice(smbios_hdl_t *shp, id_t id, FILE *fp)
}
if (md.smbmd_opcap_flags != 0) {
- flag_printf(fp, " Operating Mode Capabilities",
+ flag_printf(fp, "Operating Mode Capabilities",
md.smbmd_opcap_flags, sizeof (md.smbmd_opcap_flags) * NBBY,
smbios_memdevice_op_capab_name,
smbios_memdevice_op_capab_desc);
diff --git a/usr/src/uts/common/sys/smbios.h b/usr/src/uts/common/sys/smbios.h
index 34281898e0..55048d549d 100644
--- a/usr/src/uts/common/sys/smbios.h
+++ b/usr/src/uts/common/sys/smbios.h
@@ -1315,11 +1315,12 @@ typedef struct smbios_memdevice {
#define SMB_MTECH_NVDIMM_P 0x06 /* NVDIMM-P */
#define SMB_MTECH_INTCPM 0x07 /* Intel Optane DC Persistent Memory */
-#define SMB_MOMC_OTHER 0x01 /* other */
-#define SMB_MOMC_UNKNOWN 0x02 /* unknown */
-#define SMB_MOMC_VOLATILE 0x04 /* Volatile memory */
-#define SMB_MOMC_BYTE_PM 0x08 /* Byte-accessible persistent memory */
-#define SMB_MOMC_BLOCK_PM 0x10 /* Block-accessible persistent memory */
+#define SMB_MOMC_RESERVED 0x01 /* reserved */
+#define SMB_MOMC_OTHER 0x02 /* other */
+#define SMB_MOMC_UNKNOWN 0x04 /* unknown */
+#define SMB_MOMC_VOLATILE 0x08 /* Volatile memory */
+#define SMB_MOMC_BYTE_PM 0x10 /* Byte-accessible persistent memory */
+#define SMB_MOMC_BLOCK_PM 0x20 /* Block-accessible persistent memory */
/*
* SMBIOS Memory Array Mapped Address. See DSP0134 Section 7.20 for more