summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2022-02-01 10:12:39 -0500
committerDan McDonald <danmcd@joyent.com>2022-02-01 10:12:39 -0500
commit10c79a1a1d03fb8007e4508e87ec7ecdc0066a92 (patch)
treed23d9fb0e2d4ed4a45d052e5686185883c4f4884 /usr/src
parent7ab5ebfd113bd9e0be117e1d0b0891593529382e (diff)
parent64168f2b8a303c222446ec487be7806acd67caab (diff)
downloadillumos-joyent-10c79a1a1d03fb8007e4508e87ec7ecdc0066a92.tar.gz
[illumos-gate merge]
commit 64168f2b8a303c222446ec487be7806acd67caab 14091 Add AMD Cezanne info commit 3b5bbfc55d79c42ba1d3c6de2178627cbfcccff8 4795 /usr/bin/ld manpage and help should indicate '-soname' not '--soname' commit 11029d9dcf6c3fb63ae0cbb0ad67f86d267db4eb 14446 ar cqs doesn't work commit f07cc83a341c0d7b586da85b15c1782072b14d2a 14432 Want NVMe vendor-unique log page support commit 33f457d3d8477163eb130a64c4f182faa274b40f 14391 pmcs: build errors with gcc 11 commit 0d48c3fdfa345b461d90342d8a96a773f386cb76 14395 zfs: array subscript is partly outside array bounds Conflicts: usr/src/uts/intel/os/driver_aliases
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/sgs/ar/common/ar.msg6
-rw-r--r--usr/src/cmd/sgs/ar/common/file.c4
-rw-r--r--usr/src/cmd/sgs/ar/common/main.c4
-rw-r--r--usr/src/cmd/sgs/libld/common/libld.msg4
-rw-r--r--usr/src/cmd/sgs/tools/SUNWonld-README3
-rw-r--r--usr/src/man/man1/ar.15
-rw-r--r--usr/src/man/man1/ld.14
-rw-r--r--usr/src/man/man3cpc/cpc.3cpc3
-rw-r--r--usr/src/man/man7d/amdzen.7d4
-rw-r--r--usr/src/pkg/manifests/driver-cpu-amd-zen.p5m15
-rw-r--r--usr/src/test/util-tests/tests/ar/artest.ksh43
-rw-r--r--usr/src/uts/common/fs/zfs/zio_crypt.c13
-rw-r--r--usr/src/uts/common/io/nvme/nvme.c95
-rw-r--r--usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_attach.c4
-rw-r--r--usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c5
-rw-r--r--usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c8
-rw-r--r--usr/src/uts/i86pc/os/cpuid_subr.c23
-rw-r--r--usr/src/uts/intel/io/amdzen/amdzen.c2
-rw-r--r--usr/src/uts/intel/os/driver_aliases8
-rw-r--r--usr/src/uts/intel/pcbe/opteron_pcbe.c3
20 files changed, 189 insertions, 67 deletions
diff --git a/usr/src/cmd/sgs/ar/common/ar.msg b/usr/src/cmd/sgs/ar/common/ar.msg
index 6682ca42af..2c165d0afa 100644
--- a/usr/src/cmd/sgs/ar/common/ar.msg
+++ b/usr/src/cmd/sgs/ar/common/ar.msg
@@ -21,7 +21,7 @@
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2021 Oxide Computer Company
+# Copyright 2022 Oxide Computer Company
#
@ _START_
@@ -33,7 +33,7 @@
@ MSG_USAGE "usage: ar -d[-SvV] archive file ...\n \
ar -m[-abiSvV] [posname] archive file ...\n \
ar -p[-vV][-sS] archive [file ...]\n \
- ar -q[-cuvSV] [file ...]\n \
+ ar -q[-csuvSV] [file ...]\n \
ar -r[-cuvSV] [-abi] [posname] [file ...]\n \
ar -s[-vV] archive\n \
ar -t[-vV][-sS] archive [file ...]\n \
@@ -56,6 +56,8 @@
included in archive or not\n"
@ MSG_INTERNAL_02 "ar: internal header generation error\n"
+@ MSG_BAD_CREATE "ar: failed to create %s: %s, is the path correct?\n"
+
@ MSG_SYS_OPEN "ar: cannot open %s: %s\n"
@ MSG_SYS_CLOSE "ar: cannot close %s: %s\n"
@ MSG_SYS_WRITE "ar: %s: cannot write: %s\n"
diff --git a/usr/src/cmd/sgs/ar/common/file.c b/usr/src/cmd/sgs/ar/common/file.c
index 77e91c5898..c729617132 100644
--- a/usr/src/cmd/sgs/ar/common/file.c
+++ b/usr/src/cmd/sgs/ar/common/file.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2022 Oxide Computer Company
*/
/*
@@ -1187,7 +1188,8 @@ writefile(Cmd_info *cmd_info)
ar_outfile.fd = open(ar_outfile.path, O_RDWR|O_CREAT|O_LARGEFILE, 0666);
if (ar_outfile.fd == -1) {
int err = errno;
- (void) fprintf(stderr, MSG_INTL(MSG_SYS_OPEN),
+ (void) fprintf(stderr, new_archive ?
+ MSG_INTL(MSG_BAD_CREATE) : MSG_INTL(MSG_SYS_OPEN),
ar_outfile.path, strerror(err));
exit(1);
}
diff --git a/usr/src/cmd/sgs/ar/common/main.c b/usr/src/cmd/sgs/ar/common/main.c
index 3f918e15db..3b95560816 100644
--- a/usr/src/cmd/sgs/ar/common/main.c
+++ b/usr/src/cmd/sgs/ar/common/main.c
@@ -27,7 +27,7 @@
/*
* Copyright (c) 2018, Joyent, Inc.
- * Copyright 2021 Oxide Computer Company
+ * Copyright 2022 Oxide Computer Company
*/
#include "inc.h"
@@ -141,7 +141,7 @@ main(int argc, char **argv, char *envp[])
boolean_t req_r = (cmd_info->opt_flgs & r_FLAG) &&
(cmd_info->opt_flgs & (a_FLAG | b_FLAG));
boolean_t req_s = (cmd_info->opt_flgs & s_FLAG) &&
- (cmd_info->opt_flgs & r_FLAG) == 0;
+ (cmd_info->opt_flgs & (r_FLAG | q_FLAG)) == 0;
if (req_arg || req_r || req_s) {
(void) fprintf(stderr, MSG_INTL(MSG_NOT_FOUND_AR),
diff --git a/usr/src/cmd/sgs/libld/common/libld.msg b/usr/src/cmd/sgs/libld/common/libld.msg
index 86d8d2e9f3..4184f8c1e3 100644
--- a/usr/src/cmd/sgs/libld/common/libld.msg
+++ b/usr/src/cmd/sgs/libld/common/libld.msg
@@ -88,7 +88,7 @@
\t\t\tspecify library for which this file is a filter\n"
@ MSG_ARG_DETAIL_CG "\t[-G], [-shared]\n\
\t\t\tcreate a shared object\n"
-@ MSG_ARG_DETAIL_H "\t[-h name], [--soname name]\n\
+@ MSG_ARG_DETAIL_H "\t[-h name], [-soname name]\n\
\t\t\tuse 'name' as internal shared object identifier\n"
@ MSG_ARG_DETAIL_I "\t[-i]\t\tignore LD_LIBRARY_PATH setting\n"
@ MSG_ARG_DETAIL_CI "\t[-I name]\tuse 'name' as path of interpreter\n"
@@ -976,7 +976,7 @@
-z type=reloc)"
@ MSG_MARG_RPATH "runpath option (-R, -rpath)"
@ MSG_MARG_SO "shared object option (-G, -shared, -z type=shared)"
-@ MSG_MARG_SONAME "soname option (-h, --soname)"
+@ MSG_MARG_SONAME "soname option (-h, -soname)"
@ MSG_MARG_STRIP "strip option (-s, --strip-all)"
@ MSG_MARG_TYPE_KMOD "-z type=kmod"
diff --git a/usr/src/cmd/sgs/tools/SUNWonld-README b/usr/src/cmd/sgs/tools/SUNWonld-README
index 5429da0a1e..3e9f4432fc 100644
--- a/usr/src/cmd/sgs/tools/SUNWonld-README
+++ b/usr/src/cmd/sgs/tools/SUNWonld-README
@@ -1625,7 +1625,7 @@ Bugid Risk Synopsis
--------------------------------------------------------------------------------
--------------
-Illumos
+illumos
--------------
Bugid Risk Synopsis
================================================================================
@@ -1686,3 +1686,4 @@ Bugid Risk Synopsis
14308 discard SHF_EXCLUDE sections when linking kernel modules
14319 ld shouldn't warn about SHF_EXCLUDE unknown sections
14401 elfdump should understand LLVM section types
+4795 /usr/bin/ld manpage and help should indicate '-soname' not '--soname'
diff --git a/usr/src/man/man1/ar.1 b/usr/src/man/man1/ar.1
index 66512b0fb7..0a922efc28 100644
--- a/usr/src/man/man1/ar.1
+++ b/usr/src/man/man1/ar.1
@@ -43,8 +43,9 @@
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
+.\" Copyright 2022 Oxide Computer Company
.\"
-.TH AR 1 "September 20, 2021"
+.TH AR 1 "January 23, 2022"
.SH NAME
ar \- maintain portable archive or library
.SH SYNOPSIS
@@ -64,7 +65,7 @@ ar \- maintain portable archive or library
.LP
.nf
-\fB/usr/bin/ar\fR \fB-q\fR [\fB-cVv\fR] \fIarchive\fR \fIfile\fR...
+\fB/usr/bin/ar\fR \fB-q\fR [\fB-csVv\fR] \fIarchive\fR \fIfile\fR...
.fi
.LP
diff --git a/usr/src/man/man1/ld.1 b/usr/src/man/man1/ld.1
index 9ff3680e82..8d5e0453d1 100644
--- a/usr/src/man/man1/ld.1
+++ b/usr/src/man/man1/ld.1
@@ -5,7 +5,7 @@
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (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]
-.TH LD 1 "May 13, 2017"
+.TH LD 1 "Jan 28, 2022"
.SH NAME
ld \- link-editor for object files
.SH SYNOPSIS
@@ -452,7 +452,7 @@ See Chapter 4, \fIShared Objects,\fR in \fILinker and Libraries Guide\fR.
.ad
.br
.na
-\fB\fB--soname\fR \fIname\fR\fR
+\fB\fB-soname\fR \fIname\fR\fR
.ad
.sp .6
.RS 4n
diff --git a/usr/src/man/man3cpc/cpc.3cpc b/usr/src/man/man3cpc/cpc.3cpc
index 2011cfad39..63a0ac70fe 100644
--- a/usr/src/man/man3cpc/cpc.3cpc
+++ b/usr/src/man/man3cpc/cpc.3cpc
@@ -145,7 +145,8 @@ Includes Ryzen, ThreadRipper, and EPYC branded processors.
AMD Family 17h Zen 2 processors, including models 30-7fh.
Includes Ryzen, ThreadRipper, and EPYC branded processors.
.It Xr amd_f17h_zen3_events 3CPC
-AMD Family 19h Zen 3 processors, including models 00-0fh and 20-2fh.
+AMD Family 19h Zen 3 processors, including models 00-0fh, 20-2fh, and
+50-5fh.
Includes Ryzen and EPYC branded processors.
.El
.Ss Using Attributes
diff --git a/usr/src/man/man7d/amdzen.7d b/usr/src/man/man7d/amdzen.7d
index 7c24b7106a..919fba4e2a 100644
--- a/usr/src/man/man7d/amdzen.7d
+++ b/usr/src/man/man7d/amdzen.7d
@@ -9,7 +9,7 @@
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
-.\" Copyright 2020 Oxide Computer Company
+.\" Copyright 2021 Oxide Computer Company
.\"
.Dd September 26, 2020
.Dt AMDZEN 7D
@@ -37,7 +37,7 @@ AMD Zen+ Colfax, Picasso, and Pinnacle Ridge
AMD Zen 2 Castle Peak, Matisse, Rome, and Renoir
.Pq Family 17h
.It
-AMD Zen 3 Milan and Vermeer
+AMD Zen 3 Cezanne, Milan, and Vermeer
.Pq Family 19h
.El
.Pp
diff --git a/usr/src/pkg/manifests/driver-cpu-amd-zen.p5m b/usr/src/pkg/manifests/driver-cpu-amd-zen.p5m
index 7cb6a8bf78..f2a3067374 100644
--- a/usr/src/pkg/manifests/driver-cpu-amd-zen.p5m
+++ b/usr/src/pkg/manifests/driver-cpu-amd-zen.p5m
@@ -10,7 +10,7 @@
#
#
-# Copyright 2020 Oxide Computer Company
+# Copyright 2021 Oxide Computer Company
#
<include global_zone_only_component>
@@ -39,8 +39,9 @@ driver name=amdzen
# 1490-1497: f17h m30-3f df
# 15d0: f17h m10-m2f nb
# 15e8-15ef: f17h m10-m2f df
-# 1630: f17h m60-6f nb
+# 1630: f17h m60-6f, f19h m50-5f nb
# 1650-1657: f19h m00-0f df
+# 166a-1671: f19h m50-5f df
#
driver name=amdzen_stub \
alias=pci1022,1440,p \
@@ -94,5 +95,13 @@ driver name=amdzen_stub \
alias=pci1022,1654,p \
alias=pci1022,1655,p \
alias=pci1022,1656,p \
- alias=pci1022,1657,p
+ alias=pci1022,1657,p \
+ alias=pci1022,166a,p \
+ alias=pci1022,166b,p \
+ alias=pci1022,166c,p \
+ alias=pci1022,166d,p \
+ alias=pci1022,166e,p \
+ alias=pci1022,166f,p \
+ alias=pci1022,1670,p \
+ alias=pci1022,1671,p
license lic_CDDL license=lic_CDDL
diff --git a/usr/src/test/util-tests/tests/ar/artest.ksh b/usr/src/test/util-tests/tests/ar/artest.ksh
index ad494ef85a..5854a95c3a 100644
--- a/usr/src/test/util-tests/tests/ar/artest.ksh
+++ b/usr/src/test/util-tests/tests/ar/artest.ksh
@@ -11,7 +11,7 @@
#
#
-# Copyright 2021 Oxide Computer Company
+# Copyright 2022 Oxide Computer Company
#
#
@@ -437,6 +437,46 @@ function test_t
fi
}
+function test_q
+{
+ typeset alt="$ar_tmpdir/q.a"
+
+ if ! $ar_prog q $alt $ar_data1 $ar_data0; then
+ warn "ar -q: did not create an archive"
+ fi
+
+ if ! compare_files $ar_f10 $alt; then
+ warn "ar -q: did not create expected file"
+ else
+ print "TEST PASSED: ar -q creates archives"
+ fi
+
+ rm -f $alt
+
+ if ! $ar_prog cq $alt $ar_data1 $ar_data0; then
+ warn "ar -rs: did not create an archive"
+ fi
+
+ if ! compare_files $ar_f10 $alt; then
+ warn "ar -cq: did not create expected file"
+ else
+ print "TEST PASSED: ar -cq creates archives"
+ fi
+
+ rm -f $alt
+
+ if ! $ar_prog cqs $alt $ar_data1 $ar_data0; then
+ warn "ar -cqs: did not create an archive"
+ fi
+
+ if ! compare_files $ar_f10 $alt; then
+ warn "ar -cqs: did not create expected file"
+ else
+ print "TEST PASSED: ar -cqs creates archives"
+ fi
+
+}
+
function test_err
{
if $ar_prog $@ 2>/dev/null 1>/dev/null; then
@@ -483,6 +523,7 @@ test_x
test_xs
test_m
test_t
+test_q
#
# Note, there are many cases here which probably should be failures and
diff --git a/usr/src/uts/common/fs/zfs/zio_crypt.c b/usr/src/uts/common/fs/zfs/zio_crypt.c
index 78c26e3e90..9541a0a734 100644
--- a/usr/src/uts/common/fs/zfs/zio_crypt.c
+++ b/usr/src/uts/common/fs/zfs/zio_crypt.c
@@ -1061,14 +1061,17 @@ zio_crypt_do_dnode_hmac_updates(crypto_context_t ctx, uint64_t version,
dnode_phys_t *adnp;
boolean_t le_bswap = (should_bswap == ZFS_HOST_BYTEORDER);
crypto_data_t cd;
- uint8_t tmp_dncore[offsetof(dnode_phys_t, dn_blkptr)];
+ uint8_t tmp_dncore[sizeof (dnode_phys_t)];
+ adnp = (dnode_phys_t *)tmp_dncore;
cd.cd_format = CRYPTO_DATA_RAW;
cd.cd_offset = 0;
+ cd.cd_length = offsetof(dnode_phys_t, dn_blkptr);
+ cd.cd_raw.iov_base = (char *)adnp;
+ cd.cd_raw.iov_len = cd.cd_length;
/* authenticate the core dnode (masking out non-portable bits) */
- bcopy(dnp, tmp_dncore, sizeof (tmp_dncore));
- adnp = (dnode_phys_t *)tmp_dncore;
+ bcopy(dnp, tmp_dncore, cd.cd_length);
if (le_bswap) {
adnp->dn_datablkszsec = BSWAP_16(adnp->dn_datablkszsec);
adnp->dn_bonuslen = BSWAP_16(adnp->dn_bonuslen);
@@ -1078,10 +1081,6 @@ zio_crypt_do_dnode_hmac_updates(crypto_context_t ctx, uint64_t version,
adnp->dn_flags &= DNODE_CRYPT_PORTABLE_FLAGS_MASK;
adnp->dn_used = 0;
- cd.cd_length = sizeof (tmp_dncore);
- cd.cd_raw.iov_base = (char *)adnp;
- cd.cd_raw.iov_len = cd.cd_length;
-
ret = crypto_mac_update(ctx, &cd, NULL);
if (ret != CRYPTO_SUCCESS) {
ret = SET_ERROR(EIO);
diff --git a/usr/src/uts/common/io/nvme/nvme.c b/usr/src/uts/common/io/nvme/nvme.c
index ae631771b7..e2f42e466f 100644
--- a/usr/src/uts/common/io/nvme/nvme.c
+++ b/usr/src/uts/common/io/nvme/nvme.c
@@ -343,7 +343,7 @@ int nvme_commit_save_cmd_timeout = 15;
/*
* tunable for the size of arbitrary vendor specific admin commands,
- * default is 16MiB
+ * default is 16MiB.
*/
uint32_t nvme_vendor_specific_admin_cmd_size = 1 << 24;
@@ -456,7 +456,35 @@ static ddi_ufm_ops_t nvme_ufm_ops = {
#define NVME_MINOR_INST(minor) ((minor) >> NVME_MINOR_INST_SHIFT)
#define NVME_MINOR_NSID(minor) ((minor) & ((1 << NVME_MINOR_INST_SHIFT) - 1))
#define NVME_MINOR_MAX (NVME_MINOR(1, 0) - 2)
-#define NVME_IS_VENDOR_UNIQUE_CMD(x) (((x) >= 0xC0) && ((x) <= 0xFF))
+#define NVME_IS_VENDOR_SPECIFIC_CMD(x) (((x) >= 0xC0) && ((x) <= 0xFF))
+#define NVME_VENDOR_SPECIFIC_LOGPAGE_MIN 0xC0
+#define NVME_VENDOR_SPECIFIC_LOGPAGE_MAX 0xFF
+#define NVME_IS_VENDOR_SPECIFIC_LOGPAGE(x) \
+ (((x) >= NVME_VENDOR_SPECIFIC_LOGPAGE_MIN) && \
+ ((x) <= NVME_VENDOR_SPECIFIC_LOGPAGE_MAX))
+
+/*
+ * NVMe versions 1.3 and later actually support log pages up to UINT32_MAX
+ * DWords in size. However, revision 1.3 also modified the layout of the Get Log
+ * Page command significantly relative to version 1.2, including changing
+ * reserved bits, adding new bitfields, and requiring the use of command DWord
+ * 11 to fully specify the size of the log page (the lower and upper 16 bits of
+ * the number of DWords in the page are split between DWord 10 and DWord 11,
+ * respectively).
+ *
+ * All of these impose significantly different layout requirements on the
+ * `nvme_getlogpage_t` type. This could be solved with two different types, or a
+ * complicated/nested union with the two versions as the overlying members. Both
+ * of these are reasonable, if a bit convoluted. However, these is no current
+ * need for such large pages, or a way to test them, as most log pages actually
+ * fit within the current size limit. So for simplicity, we retain the size cap
+ * from version 1.2.
+ *
+ * Note that the number of DWords is zero-based, so we add 1. It is subtracted
+ * to form a zero-based value in `nvme_get_logpage`.
+ */
+#define NVME_VENDOR_SPECIFIC_LOGPAGE_MAX_SIZE \
+ (((1 << 12) + 1) * sizeof (uint32_t))
static void *nvme_state;
static kmem_cache_t *nvme_cmd_cache;
@@ -1988,6 +2016,12 @@ nvme_format_nvm(nvme_t *nvme, boolean_t user, uint32_t nsid, uint8_t lbaf,
return (ret);
}
+/*
+ * The `bufsize` parameter is usually an output parameter, set by this routine
+ * when filling in the supported types of logpages from the device. However, for
+ * vendor-specific pages, it is an input parameter, and must be set
+ * appropriately by callers.
+ */
static int
nvme_get_logpage(nvme_t *nvme, boolean_t user, void **buf, size_t *bufsize,
uint8_t logpage, ...)
@@ -2011,11 +2045,7 @@ nvme_get_logpage(nvme_t *nvme, boolean_t user, void **buf, size_t *bufsize,
switch (logpage) {
case NVME_LOGPAGE_ERROR:
cmd->nc_sqe.sqe_nsid = (uint32_t)-1;
- /*
- * The GET LOG PAGE command can use at most 2 pages to return
- * data, PRP lists are not supported.
- */
- *bufsize = MIN(2 * nvme->n_pagesize,
+ *bufsize = MIN(NVME_VENDOR_SPECIFIC_LOGPAGE_MAX_SIZE,
nvme->n_error_log_len * sizeof (nvme_error_log_entry_t));
break;
@@ -2030,11 +2060,20 @@ nvme_get_logpage(nvme_t *nvme, boolean_t user, void **buf, size_t *bufsize,
break;
default:
- dev_err(nvme->n_dip, CE_WARN, "!unknown log page requested: %d",
- logpage);
- atomic_inc_32(&nvme->n_unknown_logpage);
- ret = EINVAL;
- goto fail;
+ /*
+ * This intentionally only checks against the minimum valid
+ * log page ID. `logpage` is a uint8_t, and `0xFF` is a valid
+ * page ID, so this one-sided check avoids a compiler error
+ * about a check that's always true.
+ */
+ if (logpage < NVME_VENDOR_SPECIFIC_LOGPAGE_MIN) {
+ dev_err(nvme->n_dip, CE_WARN,
+ "!unknown log page requested: %d", logpage);
+ atomic_inc_32(&nvme->n_unknown_logpage);
+ ret = EINVAL;
+ goto fail;
+ }
+ cmd->nc_sqe.sqe_nsid = va_arg(ap, uint32_t);
}
va_end(ap);
@@ -2051,22 +2090,8 @@ nvme_get_logpage(nvme_t *nvme, boolean_t user, void **buf, size_t *bufsize,
goto fail;
}
- if (cmd->nc_dma->nd_ncookie > 2) {
- dev_err(nvme->n_dip, CE_WARN,
- "!too many DMA cookies for GET LOG PAGE");
- atomic_inc_32(&nvme->n_too_many_cookies);
- ret = ENOMEM;
+ if ((ret = nvme_fill_prp(cmd, cmd->nc_dma->nd_dmah)) != 0)
goto fail;
- }
-
- cmd->nc_sqe.sqe_dptr.d_prp[0] = cmd->nc_dma->nd_cookie.dmac_laddress;
- if (cmd->nc_dma->nd_ncookie > 1) {
- ddi_dma_nextcookie(cmd->nc_dma->nd_dmah,
- &cmd->nc_dma->nd_cookie);
- cmd->nc_sqe.sqe_dptr.d_prp[1] =
- cmd->nc_dma->nd_cookie.dmac_laddress;
- }
-
nvme_admin_cmd(cmd, nvme_admin_cmd_timeout);
if ((ret = nvme_check_cmd_status(cmd)) != 0) {
@@ -4426,7 +4451,19 @@ nvme_ioctl_get_logpage(nvme_t *nvme, int nsid, nvme_ioctl_t *nioc,
return (EINVAL);
break;
default:
- return (EINVAL);
+ if (!NVME_IS_VENDOR_SPECIFIC_LOGPAGE(nioc->n_arg))
+ return (EINVAL);
+ if (nioc->n_len > NVME_VENDOR_SPECIFIC_LOGPAGE_MAX_SIZE) {
+ dev_err(nvme->n_dip, CE_NOTE, "!Vendor-specific log "
+ "page size exceeds device maximum supported size: "
+ "%lu", NVME_VENDOR_SPECIFIC_LOGPAGE_MAX_SIZE);
+ return (EINVAL);
+ }
+ if (nioc->n_len == 0)
+ return (EINVAL);
+ bufsize = nioc->n_len;
+ if (nsid == 0)
+ nsid = (uint32_t)-1;
}
if (nvme_get_logpage(nvme, B_TRUE, &log, &bufsize, nioc->n_arg, nsid)
@@ -4977,7 +5014,7 @@ nvme_ioctl_passthru(nvme_t *nvme, int nsid, nvme_ioctl_t *nioc, int mode,
if (nvme_passthru_copy_cmd_in((const void*)nioc->n_buf, &cmd, mode))
return (EFAULT);
- if (!NVME_IS_VENDOR_UNIQUE_CMD(cmd.npc_opcode)) {
+ if (!NVME_IS_VENDOR_SPECIFIC_CMD(cmd.npc_opcode)) {
cmd.npc_err = NVME_PASSTHRU_ERR_INVALID_OPCODE;
rv = EINVAL;
goto out;
diff --git a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_attach.c b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_attach.c
index 02243c4171..189edbefd5 100644
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_attach.c
+++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_attach.c
@@ -3100,12 +3100,10 @@ pmcs_create_one_phy_stats(pmcs_iport_t *iport, pmcs_phy_t *phyp)
static void
pmcs_create_all_phy_stats(pmcs_iport_t *iport)
{
- pmcs_hw_t *pwp;
pmcs_phy_t *phyp;
ASSERT(iport != NULL);
- pwp = iport->pwp;
- ASSERT(pwp != NULL);
+ ASSERT(iport->pwp != NULL);
mutex_enter(&iport->lock);
diff --git a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c
index 03e632e161..688ae0c07e 100644
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c
+++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c
@@ -23,7 +23,7 @@
* Use is subject to license terms.
*/
/*
- * SATA midlayer interface for PMC drier.
+ * SATA midlayer interface for PMC driver.
*/
#include <sys/scsi/adapters/pmcs/pmcs.h>
@@ -52,7 +52,8 @@ SATAcopy(pmcs_cmd_t *sp, void *kbuf, uint32_t amt)
*
* Called with PHY lock and xp statlock held.
*/
-#define SRESPSZ 128
+#define SRESPSZ 132
+CTASSERT(SRESPSZ == sizeof (struct scsi_inquiry));
static int
pmcs_sata_special_work(pmcs_hw_t *pwp, pmcs_xscsi_t *xp)
diff --git a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c
index fb5bb00420..a3b22a9adc 100644
--- a/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c
+++ b/usr/src/uts/common/io/scsi/adapters/pmcs/pmcs_subr.c
@@ -58,7 +58,9 @@ static void pmcs_flush_observations(pmcs_hw_t *);
static boolean_t pmcs_report_observations(pmcs_hw_t *);
static boolean_t pmcs_report_iport_observations(pmcs_hw_t *, pmcs_iport_t *,
pmcs_phy_t *);
+#ifdef DEBUG
static pmcs_phy_t *pmcs_find_phy_needing_work(pmcs_hw_t *, pmcs_phy_t *);
+#endif
static int pmcs_kill_devices(pmcs_hw_t *, pmcs_phy_t *);
static void pmcs_lock_phy_impl(pmcs_phy_t *, int);
static void pmcs_unlock_phy_impl(pmcs_phy_t *, int);
@@ -958,7 +960,7 @@ pmcs_stop_phys(pmcs_hw_t *pwp)
/*
* Run SAS_DIAG_EXECUTE with cmd and cmd_desc passed.
- * ERR_CNT_RESET: return status of cmd
+ * ERR_CNT_RESET: return status of cmd
* DIAG_REPORT_GET: return value of the counter
*/
int
@@ -2631,6 +2633,7 @@ restart:
mutex_exit(&pwp->config_lock);
}
+#ifdef DEBUG
/*
* Return any PHY that needs to have scheduled work done. The PHY is returned
* locked.
@@ -2665,6 +2668,7 @@ pmcs_find_phy_needing_work(pmcs_hw_t *pwp, pmcs_phy_t *pptr)
return (NULL);
}
+#endif
/*
* We may (or may not) report observations to SCSA. This is prefaced by
@@ -6726,7 +6730,7 @@ pmcs_wr_oqpi(pmcs_hw_t *pwp, uint32_t qnum, uint32_t val)
void
pmcs_check_iomb_status(pmcs_hw_t *pwp, uint32_t *iomb)
{
- uint16_t opcode;
+ uint16_t opcode;
int offset;
if (iomb == NULL) {
diff --git a/usr/src/uts/i86pc/os/cpuid_subr.c b/usr/src/uts/i86pc/os/cpuid_subr.c
index 18d242eb55..1c79138139 100644
--- a/usr/src/uts/i86pc/os/cpuid_subr.c
+++ b/usr/src/uts/i86pc/os/cpuid_subr.c
@@ -91,10 +91,11 @@
* 18 for family 0x18, models 00 - 0f
* 19 for family 0x19, models 00 - 0f
* 20 for family 0x19, models 20 - 2f
+ * 21 for family 0x19, models 50 - 5f
* Second index by (model & 0x3) for family 0fh,
* CPUID pkg bits (Fn8000_0001_EBX[31:28]) for later families.
*/
-static uint32_t amd_skts[21][8] = {
+static uint32_t amd_skts[22][8] = {
/*
* Family 0xf revisions B through E
*/
@@ -408,7 +409,22 @@ static uint32_t amd_skts[21][8] = {
X86_SOCKET_UNKNOWN, /* 0b101 */
X86_SOCKET_UNKNOWN, /* 0b110 */
X86_SOCKET_UNKNOWN /* 0b111 */
- }
+ },
+
+ /*
+ * Family 0x19 models 50-5f (Zen 3 - Cezanne)
+ */
+#define A_SKTS_21 21
+ {
+ X86_SOCKET_FP6, /* 0b000 */
+ X86_SOCKET_UNKNOWN, /* 0b001 */
+ X86_SOCKET_AM4, /* 0b010 */
+ X86_SOCKET_UNKNOWN, /* 0b011 */
+ X86_SOCKET_UNKNOWN, /* 0b100 */
+ X86_SOCKET_UNKNOWN, /* 0b101 */
+ X86_SOCKET_UNKNOWN, /* 0b110 */
+ X86_SOCKET_UNKNOWN /* 0b111 */
+ },
};
struct amd_sktmap_s {
@@ -480,7 +496,8 @@ static const struct amd_skt_mapent {
{ 0x17, 0x70, 0x7f, A_SKTS_17 },
{ 0x18, 0x00, 0x0f, A_SKTS_18 },
{ 0x19, 0x00, 0x0f, A_SKTS_19 },
- { 0x19, 0x20, 0x2f, A_SKTS_20 }
+ { 0x19, 0x20, 0x2f, A_SKTS_20 },
+ { 0x19, 0x50, 0x5f, A_SKTS_21 }
};
/*
diff --git a/usr/src/uts/intel/io/amdzen/amdzen.c b/usr/src/uts/intel/io/amdzen/amdzen.c
index 99670abfec..3715a2c035 100644
--- a/usr/src/uts/intel/io/amdzen/amdzen.c
+++ b/usr/src/uts/intel/io/amdzen/amdzen.c
@@ -146,7 +146,7 @@ static const uint16_t amdzen_nb_ids[] = {
0x15d0,
/* Family 17h/19h Rome, Milan, Matisse, Vermeer Zen 2/Zen 3 uarch */
0x1480,
- /* Family 17h Renoir Models 60-6fh (Zen 2 uarch) */
+ /* Family 17h/19h Renoir, Cezanne Zen 2/3 uarch) */
0x1630
};
diff --git a/usr/src/uts/intel/os/driver_aliases b/usr/src/uts/intel/os/driver_aliases
index ffceefc9a9..ea8d8ee918 100644
--- a/usr/src/uts/intel/os/driver_aliases
+++ b/usr/src/uts/intel/os/driver_aliases
@@ -121,6 +121,14 @@ amdzen_stub "pci1022,1654,p"
amdzen_stub "pci1022,1655,p"
amdzen_stub "pci1022,1656,p"
amdzen_stub "pci1022,1657,p"
+amdzen_stub "pci1022,166a,p"
+amdzen_stub "pci1022,166b,p"
+amdzen_stub "pci1022,166c,p"
+amdzen_stub "pci1022,166d,p"
+amdzen_stub "pci1022,166e,p"
+amdzen_stub "pci1022,166f,p"
+amdzen_stub "pci1022,1670,p"
+amdzen_stub "pci1022,1671,p"
amdnbtemp "pci1022,1203,p"
amdnbtemp "pci1022,1303,p"
amdnbtemp "pci1022,1403,p"
diff --git a/usr/src/uts/intel/pcbe/opteron_pcbe.c b/usr/src/uts/intel/pcbe/opteron_pcbe.c
index 6fb22b1751..2cae323ee5 100644
--- a/usr/src/uts/intel/pcbe/opteron_pcbe.c
+++ b/usr/src/uts/intel/pcbe/opteron_pcbe.c
@@ -631,7 +631,8 @@ opt_pcbe_init(void)
amd_events = opteron_pcbe_f17h_zen2_events;
amd_generic_events = family_17h_zen2_papi_events;
} else if (amd_family == 0x19 && (amd_model <= 0xf ||
- (amd_model >= 0x20 && amd_model <= 0x2f))) {
+ (amd_model >= 0x20 && amd_model <= 0x2f) ||
+ (amd_model >= 0x50 && amd_model <= 0x5f))) {
amd_pcbe_cpuref = amd_fam_19h_zen3_reg;
amd_events = opteron_pcbe_f19h_zen3_events;
amd_generic_events = family_19h_zen3_papi_events;