summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2022-01-31 11:01:15 -0500
committerDan McDonald <danmcd@joyent.com>2022-01-31 11:01:15 -0500
commit7ab5ebfd113bd9e0be117e1d0b0891593529382e (patch)
tree1ddbbeacda4faa28906a30b5a5127e002db41648 /usr/src
parentb61a8c8ab692442a9710e7766f9de1288a80f938 (diff)
parentc8f4a9f75f12adb1f76391a838d75f2b427becb6 (diff)
downloadillumos-joyent-7ab5ebfd113bd9e0be117e1d0b0891593529382e.tar.gz
[illumos-gate merge]
commit c8f4a9f75f12adb1f76391a838d75f2b427becb6 8555 vfstab(4) man incorrectly describes getvfsent(3C) commit 8ac8a393f9ba5b2bf3aeabc50511c40334e9f5c8 14413 Convert vfstab(4) to mandoc commit e8b9fe7cd6fc0b13bcf65e0380c48fcb99ac5700 6943 libmd(3lib) should mention new hash algorithms commit b51a7e2003caa1eee7cfd998a535231eb646bb8d 14412 Convert libmd(3lib) to mandoc commit 597b30361cb132283d94270df35d0536cf12895f 9855 list_next/list_prev needs a bit more detail commit 9023fe694e5cc93a381708677f172a85f250caa5 14411 Convert list_create(9F) to mandoc commit f3682895b2a97c009685f16e8a4e5d3dc80e11f2 14420 Need support for Intel I219 v16-v23 commit 89fbfe0d2fbdaef52447ae1ca77634c69a3cf220 14385 libnsl: mismatched bound commit 618372bccd696950e1d234d0ad9c94c353882dee 14358 Cron should support randomized delay commit 8c65387009c4cfaa0924c78065b46a4d4a178d41 14451 loader: want mechanism to test if we are virtualized Conflicts: usr/src/uts/intel/os/driver_aliases
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/boot/Makefile.version2
-rw-r--r--usr/src/boot/lib/libstand/stand.h2
-rw-r--r--usr/src/boot/lib/libstand/x86/hypervisor.c51
-rw-r--r--usr/src/boot/sys/boot/common/bootstrap.h3
-rw-r--r--usr/src/boot/sys/boot/efi/loader/main.c3
-rw-r--r--usr/src/boot/sys/boot/i386/loader/main.c1
-rw-r--r--usr/src/boot/sys/boot/libstand/amd64/Makefile6
-rw-r--r--usr/src/boot/sys/boot/libstand/i386/Makefile6
-rw-r--r--usr/src/cmd/cron/Makefile3
-rw-r--r--usr/src/cmd/cron/atq.c8
-rw-r--r--usr/src/cmd/cron/cron.c35
-rw-r--r--usr/src/cmd/cron/cron.h8
-rw-r--r--usr/src/cmd/cron/crontab.c28
-rw-r--r--usr/src/cmd/cron/elm.c36
-rw-r--r--usr/src/cmd/cron/permit.c11
-rw-r--r--usr/src/common/ficl/loader.c31
-rw-r--r--usr/src/lib/libnsl/nis/gen/nis_misc_proc.c2
-rw-r--r--usr/src/lib/libnsl/rpc/netname.c8
-rw-r--r--usr/src/lib/libnsl/rpc/netnamer.c13
-rw-r--r--usr/src/lib/libnsl/yp/dbm.c15
-rw-r--r--usr/src/man/man1/crontab.127
-rw-r--r--usr/src/man/man3lib/libmd.3lib208
-rw-r--r--usr/src/man/man4/vfstab.4330
-rw-r--r--usr/src/man/man5/loader.57
-rw-r--r--usr/src/man/man7d/e1000g.7d7
-rw-r--r--usr/src/man/man9f/list_create.9f504
-rw-r--r--usr/src/pkg/manifests/driver-network-e1000g.p5m34
-rw-r--r--usr/src/uts/common/io/e1000api/README.illumos5
-rw-r--r--usr/src/uts/common/io/e1000api/e1000_api.c25
-rw-r--r--usr/src/uts/common/io/e1000api/e1000_hw.h28
-rw-r--r--usr/src/uts/common/io/e1000api/e1000_ich8lan.c28
-rw-r--r--usr/src/uts/common/io/e1000g/e1000g_main.c19
-rw-r--r--usr/src/uts/intel/os/driver_aliases34
33 files changed, 994 insertions, 534 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version
index dbad5babd0..6e0fa00d86 100644
--- a/usr/src/boot/Makefile.version
+++ b/usr/src/boot/Makefile.version
@@ -34,4 +34,4 @@ LOADER_VERSION = 1.1
# Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
# The version is processed from left to right, the version number can only
# be increased.
-BOOT_VERSION = $(LOADER_VERSION)-2021.12.02.1
+BOOT_VERSION = $(LOADER_VERSION)-2022.01.25.1
diff --git a/usr/src/boot/lib/libstand/stand.h b/usr/src/boot/lib/libstand/stand.h
index 408ebd73da..14270065e9 100644
--- a/usr/src/boot/lib/libstand/stand.h
+++ b/usr/src/boot/lib/libstand/stand.h
@@ -273,6 +273,8 @@ extern char *sbrk(int incr);
extern void mallocstats(void);
+const char *x86_hypervisor(void);
+
extern int printf(const char *fmt, ...) __printflike(1, 2);
extern void vprintf(const char *fmt, __va_list);
extern int asprintf(char **buf, const char *cfmt, ...) __printflike(2, 3);
diff --git a/usr/src/boot/lib/libstand/x86/hypervisor.c b/usr/src/boot/lib/libstand/x86/hypervisor.c
new file mode 100644
index 0000000000..ea28863262
--- /dev/null
+++ b/usr/src/boot/lib/libstand/x86/hypervisor.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013-2019 Juniper Networks, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+
+#include <stand.h>
+#include <machine/cpufunc.h>
+#include <machine/specialreg.h>
+
+const char *
+x86_hypervisor(void)
+{
+ static union {
+ struct {
+ uint_t high;
+ char name[13];
+ } hv;
+ uint_t regs[4];
+ } u;
+
+ /* Return NULL when no hypervisor is present. */
+ do_cpuid(1, u.regs);
+ if ((u.regs[2] & CPUID2_HV) == 0)
+ return (NULL);
+ /* Return the hypervisor's identification. */
+ do_cpuid(0x40000000, u.regs);
+ return (u.hv.name);
+}
diff --git a/usr/src/boot/sys/boot/common/bootstrap.h b/usr/src/boot/sys/boot/common/bootstrap.h
index 1703045266..689905ae68 100644
--- a/usr/src/boot/sys/boot/common/bootstrap.h
+++ b/usr/src/boot/sys/boot/common/bootstrap.h
@@ -367,6 +367,9 @@ struct arch_switch
/* Probe ZFS pool(s), if needed. */
void (*arch_zfs_probe)(void);
+
+ /* Return the hypervisor name/type or NULL if not virtualized. */
+ const char *(*arch_hypervisor)(void);
};
extern struct arch_switch archsw;
diff --git a/usr/src/boot/sys/boot/efi/loader/main.c b/usr/src/boot/sys/boot/efi/loader/main.c
index 9d229be58b..d8daf4ce7d 100644
--- a/usr/src/boot/sys/boot/efi/loader/main.c
+++ b/usr/src/boot/sys/boot/efi/loader/main.c
@@ -512,6 +512,9 @@ main(int argc, CHAR16 *argv[])
archsw.arch_readin = efi_readin;
archsw.arch_loadaddr = efi_loadaddr;
archsw.arch_free_loadaddr = efi_free_loadaddr;
+#if defined(__amd64) || defined(__i386)
+ archsw.arch_hypervisor = x86_hypervisor;
+#endif
/* Note this needs to be set before ZFS init. */
archsw.arch_zfs_probe = efi_zfs_probe;
diff --git a/usr/src/boot/sys/boot/i386/loader/main.c b/usr/src/boot/sys/boot/i386/loader/main.c
index 7c6fc2dcde..2659bf577d 100644
--- a/usr/src/boot/sys/boot/i386/loader/main.c
+++ b/usr/src/boot/sys/boot/i386/loader/main.c
@@ -159,6 +159,7 @@ main(void)
archsw.arch_isainb = isa_inb;
archsw.arch_isaoutb = isa_outb;
archsw.arch_loadaddr = i386_loadaddr;
+ archsw.arch_hypervisor = x86_hypervisor;
archsw.arch_zfs_probe = i386_zfs_probe;
/*
diff --git a/usr/src/boot/sys/boot/libstand/amd64/Makefile b/usr/src/boot/sys/boot/libstand/amd64/Makefile
index ec11ff2156..e79d2deef5 100644
--- a/usr/src/boot/sys/boot/libstand/amd64/Makefile
+++ b/usr/src/boot/sys/boot/libstand/amd64/Makefile
@@ -33,11 +33,17 @@ OBJECTS += _setjmp.o
SRCS += sha1-x86_64.s
OBJECTS += sha1-x86_64.o
+SRCS += $(SASRC)/x86/hypervisor.c
+OBJECTS += hypervisor.o
+
CLEANFILES += sha1-x86_64.s
pics/%.o: $(SASRC)/amd64/%.S
$(COMPILE.S) -o $@ $<
+pics/%.o: $(SASRC)/x86/%.c
+ $(COMPILE.c) -o $@ $<
+
include $(SRC)/boot/sys/boot/Makefile.lib
FRC:
diff --git a/usr/src/boot/sys/boot/libstand/i386/Makefile b/usr/src/boot/sys/boot/libstand/i386/Makefile
index aa55779a26..7902d44a86 100644
--- a/usr/src/boot/sys/boot/libstand/i386/Makefile
+++ b/usr/src/boot/sys/boot/libstand/i386/Makefile
@@ -31,9 +31,15 @@ CCASFLAGS += -m32
SRCS += $(SASRC)/i386/_setjmp.S
OBJECTS += _setjmp.o
+SRCS += $(SASRC)/x86/hypervisor.c
+OBJECTS += hypervisor.o
+
pics/%.o objs/%.o: $(SASRC)/i386/%.S
$(COMPILE.S) -o $@ $<
+pics/%.o objs/%.o: $(SASRC)/x86/%.c
+ $(COMPILE.c) -o $@ $<
+
include $(SRC)/boot/sys/boot/Makefile.lib
FRC:
diff --git a/usr/src/cmd/cron/Makefile b/usr/src/cmd/cron/Makefile
index 3e1eebe136..405b7d5f61 100644
--- a/usr/src/cmd/cron/Makefile
+++ b/usr/src/cmd/cron/Makefile
@@ -42,8 +42,7 @@ CERRWARN += $(CNOWARN_UNINIT)
CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += -_gcc=-Wno-unused-value
-# not linted
-SMATCH=off
+SMOFF += signed_integer_overflow_check,all_func_returns
ROOTVAR = $(ROOT)/var
diff --git a/usr/src/cmd/cron/atq.c b/usr/src/cmd/cron/atq.c
index 99ce381440..d2e8b973a7 100644
--- a/usr/src/cmd/cron/atq.c
+++ b/usr/src/cmd/cron/atq.c
@@ -6,7 +6,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
@@ -93,14 +93,14 @@ main(int argc, char **argv)
(void) setlocale(LC_ALL, "");
pp = getpwuid(getuid());
- pr.pw_uid = pp->pw_uid;
- pr.pw_name = pp->pw_name;
-
if (pp == NULL)
atabort(INVALIDUSER);
if (!allowed(pp->pw_name, ATALLOW, ATDENY))
atabort(NOTALLOWED);
+ pr.pw_uid = pp->pw_uid;
+ pr.pw_name = pp->pw_name;
+
/*
* Interpret command line flags if they exist.
*/
diff --git a/usr/src/cmd/cron/cron.c b/usr/src/cmd/cron/cron.c
index 8b549c3f0d..d3a4e0b699 100644
--- a/usr/src/cmd/cron/cron.c
+++ b/usr/src/cmd/cron/cron.c
@@ -27,6 +27,7 @@
* Copyright (c) 2014 Gary Mills
* Copyright (c) 2016 by Delphix. All rights reserved.
* Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2022 Sebastian Wiedenroth
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
@@ -194,6 +195,7 @@ struct event {
struct shared *tz; /* timezone of this event */
struct shared *home; /* directory for this event */
struct shared *shell; /* shell for this event */
+ uint32_t max_random_delay; /* max. random delay */
} ct;
struct { /* for at events */
short exists; /* for revising at events */
@@ -1221,7 +1223,9 @@ readcronfile(FILE *cf, struct usr *u, time_t reftime)
struct shared *tz = NULL;
struct shared *home = NULL;
struct shared *shell = NULL;
+ uint32_t max_random_delay = 0;
int lineno = 0;
+ const char *errstr;
/* read the crontab file */
cte_init(); /* Init error handling */
@@ -1282,6 +1286,23 @@ readcronfile(FILE *cf, struct usr *u, time_t reftime)
continue;
}
+ if (strncmp(&line[cursor], ENV_RANDOM_DELAY,
+ strlen(ENV_RANDOM_DELAY)) == 0) {
+ if ((tmp = strchr(&line[cursor], '\n')) != NULL) {
+ *tmp = '\0';
+ }
+
+ max_random_delay = strtonum(
+ &line[cursor + strlen(ENV_RANDOM_DELAY)], 0,
+ UINT32_MAX / 60, &errstr);
+ if (errstr != NULL) {
+ cte_add(lineno, line);
+ break;
+ }
+
+ continue;
+ }
+
e = xmalloc(sizeof (struct event));
e->etype = CRONEVENT;
@@ -1336,6 +1357,8 @@ again:
e->of.ct.shell = dup_shared(shell);
/* set the home of this entry */
e->of.ct.home = dup_shared(home);
+ /* set the maximum random delay */
+ e->of.ct.max_random_delay = max_random_delay;
/* have the event point to it's owner */
e->u = u;
/* insert this event at the front of this user's event list */
@@ -1925,18 +1948,22 @@ recalc:
static time_t
next_time(struct event *e, time_t tflag)
{
- if (e->of.ct.tz != NULL) {
- time_t ret;
+ time_t ret;
+ if (e->of.ct.tz != NULL) {
(void) putenv((char *)get_obj(e->of.ct.tz));
tzset();
ret = tz_next_time(e, tflag);
(void) putenv(tzone);
tzset();
- return (ret);
} else {
- return (tz_next_time(e, tflag));
+ ret = tz_next_time(e, tflag);
+ }
+
+ if (e->of.ct.max_random_delay > 0) {
+ ret += arc4random_uniform(e->of.ct.max_random_delay * 60 - 1);
}
+ return (ret);
}
/*
diff --git a/usr/src/cmd/cron/cron.h b/usr/src/cmd/cron/cron.h
index 0620572f8c..743fde1d24 100644
--- a/usr/src/cmd/cron/cron.h
+++ b/usr/src/cmd/cron/cron.h
@@ -25,6 +25,7 @@
/*
* Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2022 Sebastian Wiedenroth
*/
#ifndef _CRON_H
@@ -105,9 +106,10 @@ typedef enum {
#define SHELL "/usr/bin/sh" /* shell to execute */
-#define ENV_SHELL "SHELL="
-#define ENV_TZ "TZ="
-#define ENV_HOME "HOME="
+#define ENV_SHELL "SHELL="
+#define ENV_TZ "TZ="
+#define ENV_HOME "HOME="
+#define ENV_RANDOM_DELAY "RANDOM_DELAY="
#define CTLINESIZE 1000 /* max chars in a crontab line */
diff --git a/usr/src/cmd/cron/crontab.c b/usr/src/cmd/cron/crontab.c
index ef30309819..fad9131ad0 100644
--- a/usr/src/cmd/cron/crontab.c
+++ b/usr/src/cmd/cron/crontab.c
@@ -27,6 +27,7 @@
/*
* Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2022 Sebastian Wiedenroth
*/
#include <sys/types.h>
@@ -96,6 +97,7 @@
#define BAD_TZ "Timezone unrecognized in: %s"
#define BAD_SHELL "Invalid shell specified: %s"
#define BAD_HOME "Unable to access directory: %s\t%s\n"
+#define BAD_RAND_DELAY "Invalid delay: %s"
extern int per_errno;
@@ -450,6 +452,7 @@ copycron(FILE *fp)
char pid[6], *tnam_end;
int t;
char buf[LINE_MAX];
+ const char *errstr;
cferror_t cferr;
sprintf(pid, "%-5d", getpid());
@@ -482,7 +485,7 @@ copycron(FILE *fp)
if (strncmp(&line[cursor], ENV_TZ, strlen(ENV_TZ)) == 0) {
char *x;
- strncpy(buf, &line[cursor + strlen(ENV_TZ)],
+ (void) strncpy(buf, &line[cursor + strlen(ENV_TZ)],
sizeof (buf));
if ((x = strchr(buf, '\n')) != NULL)
*x = '\0';
@@ -498,7 +501,7 @@ copycron(FILE *fp)
strlen(ENV_SHELL)) == 0) {
char *x;
- strncpy(buf, &line[cursor + strlen(ENV_SHELL)],
+ (void) strncpy(buf, &line[cursor + strlen(ENV_SHELL)],
sizeof (buf));
if ((x = strchr(buf, '\n')) != NULL)
*x = '\0';
@@ -514,7 +517,7 @@ copycron(FILE *fp)
strlen(ENV_HOME)) == 0) {
char *x;
- strncpy(buf, &line[cursor + strlen(ENV_HOME)],
+ (void) strncpy(buf, &line[cursor + strlen(ENV_HOME)],
sizeof (buf));
if ((x = strchr(buf, '\n')) != NULL)
*x = '\0';
@@ -526,6 +529,25 @@ copycron(FILE *fp)
strerror(errno));
continue;
}
+ } else if (strncmp(&line[cursor], ENV_RANDOM_DELAY,
+ strlen(ENV_RANDOM_DELAY)) == 0) {
+ char *x;
+
+ (void) strncpy(buf,
+ &line[cursor + strlen(ENV_RANDOM_DELAY)],
+ sizeof (buf));
+ if ((x = strchr(buf, '\n')) != NULL)
+ *x = '\0';
+
+ (void) strtonum(buf, 0, UINT32_MAX / 60, &errstr);
+ if (errstr == NULL) {
+ goto cont;
+ } else {
+ err = 1;
+ fprintf(stderr, BAD_RAND_DELAY,
+ &line[cursor], strerror(errno));
+ continue;
+ }
}
if ((cferr = next_field(0, 59, line, &cursor, NULL)) != CFOK ||
diff --git a/usr/src/cmd/cron/elm.c b/usr/src/cmd/cron/elm.c
index 7956a0f26b..324135150b 100644
--- a/usr/src/cmd/cron/elm.c
+++ b/usr/src/cmd/cron/elm.c
@@ -25,7 +25,7 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
@@ -125,12 +125,9 @@ struct index { struct key *key;
/* index pts to the front of the index list */
static struct index *index = NULL;
-/* ******************* */
+
void
-el_init(du, lb, dt, nlim)
-/* ******************* */
-int du, nlim;
-time_t lb, dt;
+el_init(int du, time_t lb, time_t dt, int nlim)
{
int i;
time_t t;
@@ -217,13 +214,8 @@ time_t lb, dt;
}
-/* ********************** */
int
-el_add(event, time, id)
-/* ********************** */
-void *event;
-int id;
-time_t time;
+el_add(void *event, time_t time, int id)
{
/*
* add works slightly differently than in the reference. if the
@@ -303,11 +295,8 @@ time_t time;
}
-/* ******************** */
void
-el_remove(id, flag)
-/* ******************** */
-int id, flag;
+el_remove(int id, int flag)
{
/*
* remove finds notices n that need to be removed by traversing thru
@@ -334,11 +323,13 @@ int id, flag;
(k->left)->right = k->right;
(k->right)->left = k->left;
free(k);
- } else { if (n->key != NULL) {
+ } else {
+ if (n->key != NULL) {
/* n has a key pointing to it */
(n->left)->key = n->key;
(n->key)->time = (n->left)->time;
- (n->key)->notice = n->left; }
+ (n->key)->notice = n->left;
+ }
/* find the key that points to this sublist */
n2 = n;
while (n2->key == NULL) n2 = n2->right;
@@ -359,8 +350,7 @@ int id, flag;
k->left = kl->left;
free(kl);
} else if ((!(k->notice)->isdummy) &&
- ((kr->numnote+k->numnote)
- <= NLIM)) {
+ ((kr->numnote+k->numnote) <= NLIM)) {
/* delete this key */
(k->notice)->key = NULL;
kr->numnote += k->numnote;
@@ -386,10 +376,8 @@ int id, flag;
}
-/* ********************* */
int
el_empty(void)
-/* ********************* */
{
if (current == NULL)
return (1);
@@ -398,10 +386,8 @@ el_empty(void)
}
-/* ********************* */
void *
el_first(void)
-/* ********************* */
{
struct notice *n, *fn;
struct key *k, *fk;
@@ -496,10 +482,8 @@ el_first(void)
}
-/* ************** */
void
el_delete(void)
-/* ************** */
{
/* el_delete frees up all the space associated with the event list */
diff --git a/usr/src/cmd/cron/permit.c b/usr/src/cmd/cron/permit.c
index a5a951200b..6b5ea10577 100644
--- a/usr/src/cmd/cron/permit.c
+++ b/usr/src/cmd/cron/permit.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
@@ -46,8 +46,7 @@ static int within(char *, char *);
char *
-getuser(uid)
-uid_t uid;
+getuser(uid_t uid)
{
struct passwd *nptr;
@@ -69,8 +68,7 @@ uid_t uid;
}
int
-allowed(user, allow, deny)
-char *user, *allow, *deny;
+allowed(char *user, char *allow, char *deny)
{
if (exists(allow)) {
if (within(user, allow)) {
@@ -92,8 +90,7 @@ char *user, *allow, *deny;
}
static int
-within(username, filename)
-char *username, *filename;
+within(char *username, char *filename)
{
char line[UNAMESIZE];
FILE *cap;
diff --git a/usr/src/common/ficl/loader.c b/usr/src/common/ficl/loader.c
index c1f5c5d0eb..515330f849 100644
--- a/usr/src/common/ficl/loader.c
+++ b/usr/src/common/ficl/loader.c
@@ -430,6 +430,35 @@ ficlFindfile(ficlVm *pVM)
ficlStackPushPointer(ficlVmGetDataStack(pVM), fp);
}
+/*
+ * isvirtualized? - Return whether the loader runs under a
+ * hypervisor.
+ *
+ * isvirtualized? ( -- addr len flag | flag )
+ */
+static void
+ficlIsvirtualizedQ(ficlVm *pVM)
+{
+ const char *hv;
+
+ FICL_STACK_CHECK(ficlVmGetDataStack(pVM), 0, 3);
+
+#ifdef _STANDALONE
+ hv = (archsw.arch_hypervisor != NULL)
+ ? (*archsw.arch_hypervisor)()
+ : NULL;
+#else
+ hv = NULL;
+#endif
+ if (hv != NULL) {
+ ficlStackPushPointer(ficlVmGetDataStack(pVM), (void *)hv);
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), strlen(hv));
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), FICL_TRUE);
+ } else {
+ ficlStackPushInteger(ficlVmGetDataStack(pVM), FICL_FALSE);
+ }
+}
+
void
ficlCcall(ficlVm *pVM)
{
@@ -1087,6 +1116,8 @@ ficlSystemCompilePlatform(ficlSystem *pSys)
FICL_WORD_DEFAULT);
(void) ficlDictionarySetPrimitive(dp, "findfile", ficlFindfile,
FICL_WORD_DEFAULT);
+ (void) ficlDictionarySetPrimitive(dp, "isvirtualized?",
+ ficlIsvirtualizedQ, FICL_WORD_DEFAULT);
(void) ficlDictionarySetPrimitive(dp, "ccall", ficlCcall,
FICL_WORD_DEFAULT);
(void) ficlDictionarySetPrimitive(dp, "uuid-from-string",
diff --git a/usr/src/lib/libnsl/nis/gen/nis_misc_proc.c b/usr/src/lib/libnsl/nis/gen/nis_misc_proc.c
index a116d08125..f392c999d4 100644
--- a/usr/src/lib/libnsl/nis/gen/nis_misc_proc.c
+++ b/usr/src/lib/libnsl/nis/gen/nis_misc_proc.c
@@ -200,7 +200,7 @@ Done:
(memcmp((o1)->elements, (o2)->elements, (o1)->length) == 0))
int
-__nis_gssprin2netname(rpc_gss_principal_t prin, char netname[MAXNETNAMELEN+1])
+__nis_gssprin2netname(rpc_gss_principal_t prin, char netname[])
{
gss_buffer_desc display_name;
gss_name_t name;
diff --git a/usr/src/lib/libnsl/rpc/netname.c b/usr/src/lib/libnsl/rpc/netname.c
index 0e5b19d2a0..3dc17d383d 100644
--- a/usr/src/lib/libnsl/rpc/netname.c
+++ b/usr/src/lib/libnsl/rpc/netname.c
@@ -139,7 +139,7 @@ user2netname_nis(int *err, char netname[MAXNETNAMELEN + 1], uid_t uid,
* Figure out my fully qualified network name
*/
int
-getnetname(char name[MAXNETNAMELEN + 1])
+getnetname(char *name)
{
uid_t uid;
@@ -174,8 +174,7 @@ __getnetnamebyuid(char name[MAXNETNAMELEN + 1], uid_t uid)
* so only the first entry would be relevant for those cases.
*/
int
-user2netname(char netname[MAXNETNAMELEN + 1], const uid_t uid,
- const char *domain)
+user2netname(char *netname, const uid_t uid, const char *domain)
{
struct __nsw_switchconfig *conf;
struct __nsw_lookup *look;
@@ -265,8 +264,7 @@ user2netname(char netname[MAXNETNAMELEN + 1], const uid_t uid,
* h.w.x a.b unix.h@a.b
*/
int
-host2netname(char netname[MAXNETNAMELEN + 1], const char *host,
- const char *domain)
+host2netname(char *netname, const char *host, const char *domain)
{
char *p;
char hostname[MAXHOSTNAMELEN + 1];
diff --git a/usr/src/lib/libnsl/rpc/netnamer.c b/usr/src/lib/libnsl/rpc/netnamer.c
index b257403b70..e1ca4919cd 100644
--- a/usr/src/lib/libnsl/rpc/netnamer.c
+++ b/usr/src/lib/libnsl/rpc/netnamer.c
@@ -159,7 +159,7 @@ parse_gidlist(char *p, struct netid_userdata *argp)
* Parse uid and group information from the passed string.
*
* The format of the string passed is
- * uid:gid,grp,grp, ...
+ * uid:gid,grp,grp, ...
*
*/
static int
@@ -194,10 +194,10 @@ parse_netid_str(char *s, struct netid_userdata *argp)
static int
netname2user_files(int *err, char *netname, struct netid_userdata *argp)
{
- char buf[512]; /* one line from the file */
+ char buf[512]; /* one line from the file */
char *name;
char *value;
- char *res;
+ char *res;
FILE *fd;
fd = fopen(NETIDFILE, "rF");
@@ -372,8 +372,8 @@ netname2user_ldap(int *err, char *netname, struct netid_userdata *argp)
* Convert network-name into unix credential
*/
int
-netname2user(const char netname[MAXNETNAMELEN + 1], uid_t *uidp, gid_t *gidp,
- int *gidlenp, gid_t *gidlist)
+netname2user(const char *netname, uid_t *uidp, gid_t *gidp, int *gidlenp,
+ gid_t *gidlist)
{
struct __nsw_switchconfig *conf;
struct __nsw_lookup *look;
@@ -464,8 +464,7 @@ netname2user(const char netname[MAXNETNAMELEN + 1], uid_t *uidp, gid_t *gidp,
* We just construct the hostname using information from the domainname.
*/
int
-netname2host(const char netname[MAXNETNAMELEN + 1], char *hostname,
- const int hostlen)
+netname2host(const char *netname, char *hostname, const int hostlen)
{
char *p, *domainname;
int len, dlen;
diff --git a/usr/src/lib/libnsl/yp/dbm.c b/usr/src/lib/libnsl/yp/dbm.c
index 561ac1d432..c367a25617 100644
--- a/usr/src/lib/libnsl/yp/dbm.c
+++ b/usr/src/lib/libnsl/yp/dbm.c
@@ -34,8 +34,6 @@
* California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "mt.h"
#include <rpcsvc/dbm.h>
#include <sys/types.h>
@@ -391,7 +389,7 @@ setbit(void)
}
datum
-makdatum(char buf[PBLKSIZ], int n)
+makdatum(char *buf, int n)
{
short *sp;
int t;
@@ -427,10 +425,10 @@ cmpdatum(datum d1, datum d2)
return (0);
p1 = d1.dptr;
p2 = d2.dptr;
- do
+ do {
if (*p1++ != *p2++)
return (*--p1 - *--p2);
- while (--n);
+ } while (--n);
return (0);
}
@@ -503,7 +501,7 @@ calchash(datum item)
}
void
-delitem(char buf[PBLKSIZ], int n)
+delitem(char *buf, int n)
{
short *sp;
int i1, i2, i3;
@@ -537,12 +535,11 @@ bad:
}
int
-additem(char buf[PBLKSIZ], datum item)
+additem(char *buf, datum item)
{
short *sp;
int i1, i2;
- /* LINTED pointer cast */
sp = (short *)buf;
i1 = PBLKSIZ;
if (sp[0] > 0)
@@ -561,7 +558,7 @@ additem(char buf[PBLKSIZ], datum item)
}
void
-chkblk(char buf[PBLKSIZ])
+chkblk(char *buf)
{
short *sp;
int t, i;
diff --git a/usr/src/man/man1/crontab.1 b/usr/src/man/man1/crontab.1
index d48b995045..334e012dc6 100644
--- a/usr/src/man/man1/crontab.1
+++ b/usr/src/man/man1/crontab.1
@@ -46,8 +46,10 @@
.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
+.\" Copyright 2022 Sebastian Wiedenroth
+
.\"
-.TH CRONTAB 1 "Aug 20, 2020"
+.TH CRONTAB 1 "Jan 9, 2022"
.SH NAME
crontab \- user crontab file
.SH SYNOPSIS
@@ -329,6 +331,29 @@ TZ=Iceland
.RE
.sp
+.ne 2
+.na
+\fBRANDOM_DELAY\fR
+.ad
+.sp .6
+.RS 4n
+Allows the user to specify an upper bound in minutes for which execution
+may be delayed. The default is 0 which means no delay. A value that is
+larger than the scheduled interval may result in the command running less
+often. For example, to have the command run at some random time within
+two minutes after the schedule use:
+.sp
+.in +2
+.nf
+RANDOM_DELAY=2
+.fi
+.in -2
+.sp
+
+.RE
+
+
+.sp
.LP
Each of these variables affects all of the lines that follow it in the
\fBcrontab\fR file, until it is reset by a subsequent line resetting that
diff --git a/usr/src/man/man3lib/libmd.3lib b/usr/src/man/man3lib/libmd.3lib
index d442d1fd36..70aac14fee 100644
--- a/usr/src/man/man3lib/libmd.3lib
+++ b/usr/src/man/man3lib/libmd.3lib
@@ -1,94 +1,118 @@
-'\" te
+.\"
.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
-.\" 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 LIBMD 3LIB "Jun 16, 2008"
-.SH NAME
-libmd \- Message Digest library
-.SH SYNOPSIS
-.LP
-.nf
-cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmd\fR [ \fIlibrary\fR... ]
-#include <\fBmd4.h\fR>
-#include <\fBmd5.h\fR>
-#include <\fBsha1.h\fR>
-#include <\fBsha2.h\fR>
-.fi
-
-.SH DESCRIPTION
-.sp
-.LP
-Functions in this library provide hashing routines for \fBMD4 (RFC1320)\fR,
-\fBMD5 (RFC1321)\fR, \fBSHA1 (RFC3174)\fR, \fBSHA256 (FIPS 180-2)\fR, \fBSHA384
-(FIPS 180-2)\fR, \fBSHA512 (FIPS 180-2)\fR.
-.SH INTERFACES
-.sp
-.LP
-The shared object \fBlibmd.so.1\fR provides the public interfaces defined
-below. See \fBIntro\fR(3) for additional information on shared object
-interfaces.
-.sp
-
-.sp
-.TS
-l l
-l l .
-\fBMD4Final\fR \fBMD4Init\fR
-\fBMD4Update\fR \fBmd5_calc\fR
-\fBMD5Final\fR \fBMD5Init\fR
-\fBMD5Update\fR \fBSHA1Final\fR
-\fBSHA1Init\fR \fBSHA1Update\fR
-\fBSHA2Final\fR \fBSHA2Init\fR
-\fBSHA2Update\fR
-.TE
-
-.SH SECURITY
-.sp
-.LP
-The \fBMD4\fR and \fBMD5\fR algorithms are currently considered weak for
-cryptographic use. The algorithms should be used only for compatibility with
-legacy systems or protocols.
-.sp
-.LP
-The \fBSHA1\fR algorithm is also believed to have some weaknesses. Migration to
-one of the \fBSHA2\fR algorithms-including \fBSHA256\fR, \fBSHA386\fR or
-\fBSHA512\fR-is highly recommended when compatibility with data formats and on
-wire protocols is permitted.
-.SH FILES
-.sp
-.ne 2
-.na
-\fB\fB/lib/libmd.so.1\fR\fR
-.ad
-.RS 22n
-shared object
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fB/lib/64/libmd.so.1\fR\fR
-.ad
-.RS 22n
+.\" Copyright 2022 Oxide Computer Company
+.\"
+.\" 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]
+.\"
+.Dd January 16, 2022
+.Dt LIBMD 3LIB
+.Os
+.Sh NAME
+.Nm libmd
+.Nd Message Digest library
+.Sh LIBRARY
+.Lb libmd
+.Sh SYNOPSIS
+.In md4.h
+.In md5.h
+.In sha1.h
+.In sha2.h
+.In sys/edonr.h
+.In sys/skein.h
+.Sh DESCRIPTION
+This library provides hashing routines for the following suites of hash
+functions:
+.Bl -bullet -offset indent -compact
+.It
+MD4
+.Pq RFC1320
+.It
+MD5
+.Pq RFC1321
+.It
+SHA1
+.Pq RFC3174
+.It
+SHA256
+.Pq FIPS 180-2
+.It
+SHA384
+.Pq FIPS 180-2
+.It
+SHA512
+.Pq FIPS 180-2
+.It
+Edon-R
+.Po
+.Rs
+.%T Cryptographic hash function Edon-R
+.Re
+.Pc
+.It
+Skein 256, 512, and 1024
+.Po
+.Rs
+.%T The Skein Hash Function Family
+.Re
+.Pc
+.El
+.Sh INTERFACES
+The shared object
+.Sy libmd.so.1
+provides the public interfaces defined below.
+See
+.Xr Intro 3
+for additional information on shared object interfaces.
+.Bl -column -offset indent ".Sy Skein1024_Final_Pad" ".Sy Skein1024_Final_Pad"
+.It Sy EdonRFinal Ta Sy EdonRHash
+.It Sy EdonRInit Ta Sy EdonRUpdate
+.It Sy MD4Final Ta Sy MD4Init
+.It Sy MD4Update Ta Sy md5_calc
+.It Sy MD5Final Ta Sy MD5Init
+.It Sy MD5Update Ta Sy SHA1Final
+.It Sy SHA1Init Ta Sy SHA1Update
+.It Sy SHA2Final Ta Sy SHA2Init
+.It Sy SHA2Update Ta Sy Skein_256_Final
+.It Sy Skein_256_Final_Pad Ta Sy Skein_256_Init
+.It Sy Skein_256_InitExt Ta Sy Skein_256_Output
+.It Sy Skein_256_Update Ta Sy Skein_512_Final
+.It Sy Skein_512_Final_Pad Ta Sy Skein_512_Init
+.It Sy Skein_512_InitExt Ta Sy Skein_512_Output
+.It Sy Skein_512_Update Ta Sy Skein1024_Final
+.It Sy Skein1024_Final_Pad Ta Sy Skein1024_Init
+.It Sy Skein1024_InitExt Ta Sy Skein1024_Output
+.It Sy Skein1024_Update Ta ""
+.El
+.Sh SECURITY
+The MD4 and MD5 algorithms are currently considered weak for cryptographic use.
+The algorithms should be used only for compatibility with legacy systems or
+protocols.
+.Pp
+The SHA1 algorithm is also believed to have some weaknesses.
+Migration to one of the SHA2 algorithms \(em including SHA256, SHA386 or SHA512
+\(em is highly recommended when data formats and on wire protocols support the
+use of SHA2.
+.Sh FILES
+.Bl -tag -width Ds
+.It Pa /lib/libmd.so.1
+32-bit shared object
+.It Pa /lib/64/libmd.so.1
64-bit shared object
-.RE
-
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE ATTRIBUTE VALUE
-_
-Interface Stability Committed
-_
-MT-Level MT-Safe
-.TE
-
+.El
+.Sh INTERFACE STABILITY
+.Sy Committed
+.Sh MT-LEVEL
+.Sy MT-Safe
diff --git a/usr/src/man/man4/vfstab.4 b/usr/src/man/man4/vfstab.4
index 3b2bec5a69..5b6a815784 100644
--- a/usr/src/man/man4/vfstab.4
+++ b/usr/src/man/man4/vfstab.4
@@ -1,168 +1,196 @@
-'\" te
+'\"
.\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 1989 AT&T
.\" Copyright 2015 Nexenta Systems, Inc. All rights reserved.
-.\" 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 VFSTAB 4 "Sep 8, 2015"
-.SH NAME
-vfstab \- table of file system defaults
-.SH DESCRIPTION
-.LP
-The file \fB/etc/vfstab\fR describes defaults for each file system. The
-information is stored in a table with the following column headings:
-.sp
-.in +2
-.nf
+.\" Copyright 2022 Oxide Computer Company
+.\"
+.\" 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]
+.\"
+.Dd January 16, 2022
+.Dt VFSTAB 4
+.Os
+.Sh NAME
+.Nm vfstab
+.Nd table of file system defaults
+.Sh DESCRIPTION
+The file
+.Pa /etc/vfstab
+describes defaults for each file system.
+The information is stored in a table with the following column headings:
+.Bd -literal
device device mount FS fsck mount mount
to mount to fsck point type pass at boot options
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Pp
The fields in the table are space-separated and show the resource name
-(\fIdevice to mount\fR), the raw device to \fBfsck\fR (\fIdevice to fsck\fR),
-the default mount directory (\fImount point\fR), the name of the file system
-type (\fIFS type\fR), the number used by \fBfsck\fR to decide whether to check
-the file system automatically (\fIfsck pass\fR), whether the file system should
-be mounted automatically by \fBmountall\fR (\fImount at boot\fR), and the file
-system mount options (\fImount options\fR). (See respective mount file system
-man page below in \fBSEE ALSO\fR for \fImount options\fR.) A '-' is used to
-indicate no entry in a field. This may be used when a field does not apply to
-the resource being mounted.
-.sp
-.LP
-The \fBgetvfsent\fR(3C) family of routines is used to read and write to
-\fB/etc/vfstab\fR.
-.sp
-.LP
-\fB/etc/vfstab\fR can be used to specify swap areas. An entry so specified,
-(which can be a file or a device), will automatically be added as a swap area
-by the \fB/sbin/swapadd\fR script when the system boots. To specify a swap
-area, the \fIdevice-to-mount\fR field contains the name of the swap file or
-device, the \fIFS-type\fR is "swap", \fImount-at-boot\fR is "no" and all other
-fields have no entry.
-.SH EXAMPLES
-.LP
-The following are \fBvfstab\fR entries for various file system types supported
-in the Solaris operating environment.
-.LP
-\fBExample 1 \fRNFS and UFS Mounts
-.sp
-.LP
+.Pq Fa device to mount ,
+the raw device to
+.Sy fsck
+.Pq Em device to fsck ,
+the default mount directory
+.Pq Em mount point ,
+the name of the file system type
+.Pq Em FS type ,
+the number used by
+.Xr fsck 1M
+to decide whether to check the file system automatically
+.Pq Em fsck pass ,
+whether the file system should be mounted automatically by
+.Xr mountall 1M
+.Pq Em mount at boot ,
+and the file system mount options
+.Pq Em mount options .
+See respective mount file system man page below in
+.Sx SEE ALSO
+for
+.Em mount options.
+A
+.Sq -
+is used to indicate no entry in a field.
+This may be used when a field does not apply to the resource being mounted.
+.Pp
+The
+.Xr getvfsent 3C
+family of routines is used to read
+.Pa /etc/vfstab .
+There are currently no library routines to automate the writing of
+.Pa /etc/vfstab .
+.Pp
+.Pa /etc/vfstab
+can be used to specify swap areas.
+An entry so specified,
+.Pq which can be a file or a device ,
+will automatically be added as a swap area by the
+.Pa /sbin/swapadd
+script when the system boots.
+To specify a swap area, the
+.Em device-to-mount
+field contains the name of the swap file or device, the
+.Em FS-type
+is
+.Dq swap ,
+.Em mount-at-boot
+is
+.Dq no
+and all other fields have no entry.
+.Sh EXAMPLES
+The following are
+.Pa /etc/vfstab
+entries for various file system types supported in illumos.
+.Pp
+.Sy Example 1
+NFS and UFS Mounts
+.Pp
The following entry invokes NFS to automatically mount the directory
-\fB/usr/local\fR of the server \fBexample1\fR on the client's \fB/usr/local\fR
+.Pa /usr/local
+of the server
+.Sy example1
+on the client's
+.Pa /usr/local
directory with read-only permission:
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
example1:/usr/local - /usr/local nfs - yes ro
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Pp
The following example assumes a small departmental mail setup, in which clients
-mount \fB/var/mail\fR from a server \fBmailsvr\fR. The following entry would be
-listed in each client's \fBvfstab\fR:
-
-.sp
-.in +2
-.nf
+mount
+.Pa /var/mail
+from a server
+.Sy mailsvr .
+The following entry would be listed in each client's
+.Pa /etc/vfstab:
+.Bd -literal -offset indent
mailsvr:/var/mail - /var/mail nfs - yes intr,bg
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Pp
The following is an example for a UFS file system in which logging is enabled:
-
-.sp
-.in +2
-.nf
+.Bd -literal -offset indent
/dev/dsk/c2t10d0s0 /dev/rdsk/c2t10d0s0 /export/local ufs 3 yes logging
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-See \fBmount_nfs\fR(1M) for a description of NFS mount options and
-\fBmount_ufs\fR(1M) for a description of UFS options.
-
-.LP
-\fBExample 2 \fR\fBpcfs\fR Mounts
-.sp
-.LP
-The following example mounts a \fBpcfs\fR file system on a fixed hard disk on
-an x86 machine:
-
-.sp
-.in +2
-.nf
+.Ed
+.Pp
+See
+.Xr mount_nfs 1M
+for a description of NFS mount options and
+.Xr mount_ufs 1M
+for a description of UFS options.
+.Pp
+.Sy Example 2
+pcfs Mounts
+.Pp
+The following example mounts a pcfs file system on a fixed hard disk on an x86
+machine:
+.Bd -literal -offset indent
/dev/dsk/c1t2d0p0:c - /win98 pcfs - yes -
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-The example below mounts a Jaz drive on a SPARC machine. Normally, the volume
-management software handles mounting of removable media, obviating a
-\fBvfstab\fR entry. Specifying a device that supports removable media in
-\fBvfstab\fR with set the mount-at-boot field to \fBno\fR (as shown below)
-disables the automatic handling of that device. Such an entry presumes you are
-not running volume management software.
-
-.sp
-.in +2
-.nf
+.Ed
+.Pp
+The example below mounts a Jaz drive on a SPARC machine.
+Normally, the volume management software handles mounting of removable media,
+obviating a
+.Nm
+entry.
+Specifying a device that supports removable media in
+.Pa /etc/vfstab
+with set the mount-at-boot field to
+.Dq no
+.Pq as shown below
+disables the automatic handling of that device.
+Such an entry presumes you are not running volume management software.
+.Bd -literal -offset indent
/dev/dsk/c1t2d0s2:c - /jaz pcfs - no -
-.fi
-.in -2
-.sp
-
-.sp
-.LP
+.Ed
+.Pp
For removable media on a SPARC machine, the convention for the slice portion of
-the disk identifier is to specify \fBs2\fR, which stands for the entire medium.
-
-.sp
-.LP
-For \fBpcfs\fR file systems on x86 machines, note that the disk identifier uses
-a \fBp\fR (\fBp0\fR) and a logical drive (\fBc\fR, in the \fB/win98\fR example
-above) for a \fBpcfs\fR logical drive. See \fBmount_pcfs\fR(1M) for syntax for
-\fBpcfs\fR logical drives and for \fBpcfs\fR-specific mount options.
-
-.LP
-\fBExample 3 \fRLoopback File System Mount
-.sp
-.LP
-The following is an example of mounting a loopback (\fBlofs\fR) file system:
-
-.sp
-.in +2
-.nf
+the disk identifier is to specify
+.Sy s2 ,
+which stands for the entire medium.
+.Pp
+For pcfs file systems on x86 machines, note that the disk identifier uses
+a
+.Sy p
+.Pq Sy p0
+and a logical drive
+.Po
+.Sy c ,
+in the
+.Pa /win98
+example above
+.Pc
+for a pcfs logical drive.
+See
+.Xr mount_pcfs 1M
+for syntax for pcfs logical drives and for pcfs-specific mount options.
+.Pp
+.Sy Example 3
+loopback File System Mount
+.Pp
+The following is an example of mounting a loopback
+.Pq lofs
+file system:
+.Bd -literal
/export/test - /opt/test lofs - yes -
-.fi
-.in -2
-.sp
-
-.sp
-.LP
-See \fBlofs\fR(7FS) for an overview of the loopback file system.
-
-.SH SEE ALSO
-.LP
-\fBfsck\fR(1M), \fBmount\fR(1M), \fBmount_hsfs\fR(1M),
-\fBmount_nfs\fR(1M), \fBmount_tmpfs\fR(1M), \fBmount_ufs\fR(1M),
-\fBswap\fR(1M), \fBgetvfsent\fR(3C)
-.sp
-.LP
-\fISystem Administration Guide: Basic Administration\fR
+.Ed
+See
+.Xr lofs 7FS
+for an overview of the loopback file system.
+.Sh SEE ALSO
+.Xr fsck 1M ,
+.Xr mount 1M ,
+.Xr mount_hsfs 1M ,
+.Xr mount_nfs 1M ,
+.Xr mount_tmpfs 1M ,
+.Xr mount_ufs 1M ,
+.Xr swap 1M ,
+.Xr getvfsent 3C
diff --git a/usr/src/man/man5/loader.5 b/usr/src/man/man5/loader.5
index 745197e8d0..4c8edf3d3f 100644
--- a/usr/src/man/man5/loader.5
+++ b/usr/src/man/man5/loader.5
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 14, 2019
+.Dd January 25, 2022
.Dt LOADER 5
.Os
.Sh NAME
@@ -687,6 +687,11 @@ Return the space remaining in the dictionary heap, in cells.
This is not related to the heap used by dynamic memory allocation words.
.It Ic inb Pq Ar port -- char
Reads a byte from a port.
+.It Ic isvirtualized? Pq -- Ar addr len flag | Ar flag
+Returns
+.Ic true
+and string with virtualization engine name or
+.Ic false .
.It Ic key Pq -- Ar char
Reads a single character from the console.
.It Ic key? Pq -- Ar flag
diff --git a/usr/src/man/man7d/e1000g.7d b/usr/src/man/man7d/e1000g.7d
index ffa71f9d20..3582d0dc20 100644
--- a/usr/src/man/man7d/e1000g.7d
+++ b/usr/src/man/man7d/e1000g.7d
@@ -10,8 +10,9 @@
.\"
.\"
.\" Copyright 2020 Robert Mustacchi
+.\" Copyright 2022 Oxide Computer Company
.\"
-.Dd March 14, 2020
+.Dd January 17, 2022
.Dt E1000G 7D
.Os
.Sh NAME
@@ -140,9 +141,9 @@ Ethernet Connection I218-LM v1-3
.It
Ethernet Connection I218-V v1-3
.It
-Ethernet Connection I219-LM v1-15
+Ethernet Connection I219-LM v1-23
.It
-Ethernet Connection I219-V v1-14
+Ethernet Connection I219-V v1-23
.El
.Pp
The following specific devices are supported by this driver:
diff --git a/usr/src/man/man9f/list_create.9f b/usr/src/man/man9f/list_create.9f
index 94d1866490..44fb617163 100644
--- a/usr/src/man/man9f/list_create.9f
+++ b/usr/src/man/man9f/list_create.9f
@@ -1,215 +1,303 @@
-'\" te
+.\"
+.\"
.\" Copyright (c) 2009, Sun Microsystems Inc. All Rights Reserved.
-.\" 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 LIST_CREATE 9F "May 3, 2018"
-.SH NAME
-list_create, list_destroy, list_insert_after, list_insert_before,
-list_insert_head, list_insert_tail, list_remove, list_remove_head,
-list_remove_tail, list_head, list_tail, list_next, list_prev, list_is_empty,
-list_link_init, list_link_active, list_move_tail, list_link_replace \- list
-functions
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/list.h>
-
-\fBvoid\fR \fBlist_create\fR(\fBlist_t *\fR \fIlist\fR, \fBsize_t\fR \fIsize\fR, \fBsize_t\fR \fIoffset\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_destroy\fR(\fBlist_t *\fR \fIlist\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_insert_after\fR(\fBlist_t *\fR \fIlist\fR, \fBvoid *\fR\fIreference_item\fR,
- \fBvoid *\fR\fInew_item\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_insert_before\fR(\fBlist_t *\fR \fIlist\fR, \fBvoid *\fR\fIreference_item\fR,
- \fBvoid *\fR\fInew_item\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_insert_head\fR(\fBlist_t *\fR \fIlist\fR*, \fBvoid *\fR\fInew_item\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_insert_tail\fR(\fBlist_t *\fR \fIlist\fR, \fBvoid *\fR\fInew_item\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_remove\fR(\fBlist_t *\fR \fIlist\fR, \fBvoid *\fRitem);
-.fi
-
-.LP
-.nf
-\fBvoid *\fR\fBlist_remove_head\fR(\fBlist_t *\fR \fIlist\fR);
-.fi
-
-.LP
-.nf
-\fBvoid *\fR\fBlist_remove_tail\fR(\fBlist_t *\fR \fIlist\fR);
-.fi
-
-.LP
-.nf
-\fBvoid *\fR\fBlist_head\fR(\fBlist_t *\fR \fIlist\fR);
-.fi
-
-.LP
-.nf
-\fBvoid *\fR\fBlist_tail\fR(\fBlist_t *\fR \fIlist\fR);
-.fi
-
-.LP
-.nf
-\fBvoid *\fR\fBlist_next\fR(\fBlist_t *\fR \fIlist\fR, \fBvoid *\fR\fIreference_item\fR);
-.fi
-
-.LP
-.nf
-\fBvoid *\fR\fBlist_prev\fR(\fBlist_t *\fR \fIlist\fR, \fBvoid *\fR\fIreference_item\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBlist_is_empty\fR(\fBlist_t *\fR \fIlist\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_link_init\fR(\fBlist_node_t *\fR\fInode\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBlist_link_active\fR(\fBlist_node_t *\fR\fInode\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_move_tail\fR(\fBlist_t *\fR\fIdst\fR, \fBlist_t *\fR\fIsrc\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBlist_link_replace\fR(\fBlist_node_t *\fR\fIlold\fR, \fBlist_node_t *\fR\fIlnew\fR);
-.fi
-
-.SH DESCRIPTION
-.LP
-These functions provide a generic doubly-linked list implementation. To
-utilize it, simply embed a \fBlist_node_t\fR field in the structures
-that will constitute the linked list elements and pass the
-\fBlist_node_t\fR field offset to \fBlist_create()\fR in the appropriate
-parameter (see below). A single \fBlist_node_t\fR field can only be used
-in a single list simultaneously, so to add a structure to multiple
-lists, embed multiple \fBlist_node_t\fR fields in your user structure.
-.sp
-.LP
-Please note that a \fBlist_node_t\fR contains pointers back to its
-parent \fBlist_t\fR so you cannot copy the \fBlist_t\fR around once it
-has been initialized. In particular, this kind of construct won't work:
-.sp
-.in +2
-.nf
+.\" Copyright 2022 Oxide Computer Company
+.\"
+.\" 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]
+.\"
+.Dd January 16, 2022
+.Dt LIST_CREATE 9F
+.Os
+.Sh NAME
+.Nm list_create ,
+.Nm list_destroy ,
+.Nm list_insert_after ,
+.Nm list_insert_before ,
+.Nm list_insert_head ,
+.Nm list_insert_tail ,
+.Nm list_remove ,
+.Nm list_remove_head ,
+.Nm list_remove_tail ,
+.Nm list_head ,
+.Nm list_tail ,
+.Nm list_next ,
+.Nm list_prev ,
+.Nm list_is_empty, ,
+.Nm list_link_init ,
+.Nm list_link_active ,
+.Nm list_move_tail ,
+.Nm list_link_replace
+.Nd list functions
+.Sh SYNOPSIS
+.In sys/list.h
+.Ft void
+.Fo list_create
+.Fa "list_t *list"
+.Fa "size_t size"
+.Fa "size_t offset"
+.Fc
+.Ft void
+.Fo list_destroy
+.Fa "list_t *list"
+.Fc
+.Ft void
+.Fo list_insert_after
+.Fa "list_t *list"
+.Fa "void *reference_item"
+.Fa "void *new_item"
+.Fc
+.Ft void
+.Fo list_insert_before
+.Fa "list_t *list"
+.Fa "void *reference_item"
+.Fa "void *new_item"
+.Fc
+.Ft void
+.Fo list_insert_head
+.Fa "list_t *list*"
+.Fa "void *new_item"
+.Fc
+.Ft void
+.Fo list_insert_tail
+.Fa "list_t *list"
+.Fa "void *new_item"
+.Fc
+.Ft void
+.Fo list_remove
+.Fa "list_t *list"
+.Fa "void *item"
+.Fc
+.Ft "void *"
+.Fo list_remove_head
+.Fa "list_t *list"
+.Fc
+.Ft "void *"
+.Fo list_remove_tail
+.Fa "list_t *list"
+.Fc
+.Ft "void *"
+.Fo list_head
+.Fa "list_t *list"
+.Fc
+.Ft "void *"
+.Fo list_tail
+.Fa "list_t *list"
+.Fc
+.Ft "void *"
+.Fo list_next
+.Fa "list_t *list"
+.Fa "void *reference_item"
+.Fc
+.Ft "void *"
+.Fo list_prev
+.Fa "list_t *list"
+.Fa "void *reference_item"
+.Fc
+.Ft int
+.Fo list_is_empty
+.Fa "list_t *list"
+.Fc
+.Ft void
+.Fo list_link_init
+.Fa "list_node_t *node"
+.Fc
+.Ft int
+.Fo list_link_active
+.Fa "list_node_t *node"
+.Fc
+.Ft void
+.Fo list_move_tail
+.Fa "list_t *dst"
+.Fa "list_t *src"
+.Fc
+.Ft void
+.Fo list_link_replace
+.Fa "list_node_t *lold"
+.Fa "list_node_t *lnew"
+.Fc
+.Sh DESCRIPTION
+These functions provide a generic doubly-linked list implementation.
+To utilize it, simply embed a
+.Vt list_node_t
+field in the structures that will constitute the linked list elements and pass
+the
+.Vt list_node_t
+field offset to
+.Fn list_create
+in the appropriate
+parameter
+.Pq see below .
+A single
+.Vt list_node_t
+field can only be used in a single list simultaneously, so to add a structure to
+multiple lists, embed multiple
+.Vt list_node_t
+fields in your user structure.
+.Pp
+Please note that a
+.Vt list_node_t
+contains pointers back to its parent
+.Vt list_t
+so you cannot copy the
+.Vt list_t
+around once it has been initialized.
+In particular, this kind of construct will not work:
+.Bd -literal -offset indent
struct { list_t l; } a, b;
list_create(&a.l, ...);
b = a; <= This will break the list in `b', as the `l' element
in `a' got copied to a different memory address.
-.fi
-.in -2
-.sp
+.Ed
+.Pp
To do this you must move the list items to the new list using functions
-such as \fBlist_move_tail()\fR.
-.sp
-.LP
-The \fBlist_create()\fR function initializes a new list. The driver supplies
-the storage for the list handle, the size of an individual element, and the
-offset of a \fBlist_node_t\fR within the element to use for the links of the
-list.
-.sp
-.LP
-The \fBlist_destroy()\fR function destroys the list handle, including freeing
-any resources that may have been internally allocated for the list. The list
-must be empty when this function is called.
-.sp
-.LP
-The \fBlist_insert_after()\fR and \fBlist_insert_before()\fR functions insert
-\fInew_item\fR into the linked list at a location after or before the reference
-item, which must already be on the list.
-.sp
-.LP
-The \fBlist_insert_head()\fR and \fBlist_insert_tail()\fR functions insert the
-\fInew_item\fR on the list at either the head or tail of the list. (The head
-is the first item, the tail is the last item).
-.sp
-.LP
-The \fBlist_remove()\fR function removes the item from the list.
-.sp
-.LP
-The \fBlist_remove_head()\fR and \fBlist_remove_tail()\fR functions remove the
-head (first) or tail (last) item from the list. The item removed is returned to
-the caller. If the list is empty when these functions are called, then no
-change is made and \fINULL\fR is returned to the caller.
-.sp
-.LP
-The \fBlist_head()\fR and \fBlist_tail()\fR functions simply return the head
-(first) or tail (last) item on the list. \fINULL\fR is returned if the list is
-empty.
-.sp
-.LP
-The \fBlist_next()\fR and \fBlist_prev()\fR functions return the next or
-previous item in the list, relative to the named reference item which must be
-linked on the list.
-.sp
-.LP
-The \fBlist_is_empty()\fR function returns 0 if the list has items in it, or
-non-zero otherwise.
-.sp
-.LP
-The \fBlist_link_init()\fR function initializes the \fBlist_node_t\fR. It is
-functionally equivalent to \fBbzero\fR(\fInode\fR, \fBsizeof\fR(*\fInode\fR));
-.sp
-.LP
-The \fBlist_link_active()\fR function returns non-zero if the node is on an
-active list.
-.sp
-.LP
-The \fBlist_move_tail()\fR function is used to append the items on the
-\fIsrc\fR list to the end of the \fIdst\fR list. It is mandatory that the two
-lists were initialized using identical size and offset parameters. Upon
-completion, the \fIsrc\fR list will be empty.
-.sp
-.LP
-The \fBlist_link_replace()\fR function replaces \fIlold\fR node on an active
-list with the \fIlnew\fR node. When the function is called the \fIlnew\fR node
-must not be linked on any list. Upon completion the \fIlold\fR node will be
-left unlinked from any list.
-.SH ATTRIBUTES
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
+such as
+.Fn list_move_tail .
+.Pp
+The
+.Fn list_create
+function initializes a new list.
+The driver supplies the storage for the list handle, the size of an individual
+element, and the offset of a
+.Vt list_node_t
+within the element to use for the links of the list.
+.Pp
+The
+.Fn list_destroy
+function destroys the list handle, including freeing any resources that may have
+been internally allocated for the list.
+The list must be empty when this function is called.
+.Pp
+The
+.Fn list_insert_after
+and
+.Fn list_insert_before
+functions insert
+.Fa new_item
+into the linked list at a location after or before the reference item, which
+must already be on the list.
+.Pp
+The
+.Fn list_insert_head
+and
+.Fn list_insert_tail
+functions insert the
+.Fa new_item
+on the list at either the head or tail of the list.
+The head is the first item, the tail is the last item.
+.Pp
+The
+.Fn list_remove
+function removes the item from the list.
+.Pp
+The
+.Fn list_remove_head
+and
+.Fn list_remove_tail
+functions remove the head
+.Pq first
+or tail
+.Pq last
+item from the list.
+The item removed is returned to the caller.
+If the list is empty when these functions are called, then no change is made and
+.Dv NULL
+is returned to the caller.
+.Pp
+The
+.Fn list_head
+and
+.Fn list_tail
+functions simply return the head
+.Pq first
+or tail
+.Pq last
+item on the list.
+.Dv NULL
+is returned if the list is empty.
+.Pp
+The
+.Fn list_next
+and
+.Fn list_prev
+functions return the next or previous item in the list, relative to the named
+reference item which must be linked on the list.
+If the referenced item is either the last entry in the list for
+.Fn list_next
+or the first entry in the list for
+.Fn list_prev ,
+then the functions will return
+.Dv NULL .
+This is useful for iterating over a list with the following pattern:
+.Bd -literal -offset indent
+list_t list_t;
+\&...
+for (foo_t *foo = list_head(&list_t); foo != NULL;
+ foo = list_next(&list_t, foo)) {
+ /* Process each entry of the list */
+}
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE ATTRIBUTE VALUE
-_
-Interface Stability Committed
-.TE
-
-.SH SEE ALSO
-.LP
-\fBattributes\fR(5)
+for (foo_t *foo = list_tail(&list_t); foo != NULL;
+ foo = list_prev(&list_t, foo)) {
+ /* Same thing, but in reverse */
+}
+.Ed
+.Pp
+The
+.Fn list_is_empty
+function returns 0 if the list has items in it, or non-zero otherwise.
+.Pp
+The
+.Fn list_link_init
+function initializes the
+.Vt list_node_t .
+It is functionally equivalent to
+.Fo bzero
+.Fa "node"
+.Fa "sizeof (*node)"
+.Fc ; .
+.Pp
+The
+.Fn list_link_active
+function returns non-zero if the node is on an active list.
+.Pp
+The
+.Fn list_move_tail
+function is used to append the items on the
+.Fa src
+list to the end of the
+.Fa dst
+list.
+It is mandatory that the two lists were initialized using identical size and
+offset parameters.
+Upon completion, the
+.Fa src
+list will be empty.
+.Pp
+The
+.Fn list_link_replace
+function replaces
+.Fa lold
+node on an active list with the
+.Fa lnew
+node.
+When the function is called the
+.Fa lnew
+node must not be linked on any list.
+Upon completion the
+.Fa lold
+node will be left unlinked from any list.
+.Sh INTERFACE STABILITY
+.Sy Committed
diff --git a/usr/src/pkg/manifests/driver-network-e1000g.p5m b/usr/src/pkg/manifests/driver-network-e1000g.p5m
index 8eb5247e29..28cfe93d77 100644
--- a/usr/src/pkg/manifests/driver-network-e1000g.p5m
+++ b/usr/src/pkg/manifests/driver-network-e1000g.p5m
@@ -51,6 +51,10 @@ driver name=e1000g perms="* 0666 root sys" clone_perms="e1000g 0666 root sys" \
alias=pci8086,d4f,p \
alias=pci8086,d53,p \
alias=pci8086,d55,p \
+ alias=pci8086,dc5,p \
+ alias=pci8086,dc6,p \
+ alias=pci8086,dc7,p \
+ alias=pci8086,dc8,p \
alias=pci8086,1000 \
alias=pci8086,1001 \
alias=pci8086,1004.0e11.49 \
@@ -172,11 +176,24 @@ driver name=e1000g perms="* 0666 root sys" clone_perms="e1000g 0666 root sys" \
alias=pci8086,15e2 \
alias=pci8086,15e3 \
alias=pci8086,15f4,p \
+ alias=pci8086,15f5,p \
alias=pci8086,15f9,p \
alias=pci8086,15fa,p \
alias=pci8086,15fb,p \
alias=pci8086,15fc,p \
+ alias=pci8086,1a1c,p \
+ alias=pci8086,1a1d,p \
+ alias=pci8086,1a1e,p \
+ alias=pci8086,1a1f,p \
alias=pci8086,294c \
+ alias=pci8086,550a,p \
+ alias=pci8086,550b,p \
+ alias=pci8086,550c,p \
+ alias=pci8086,550d,p \
+ alias=pci8086,550e,p \
+ alias=pci8086,550f,p \
+ alias=pci8086,5510,p \
+ alias=pci8086,5511,p \
alias=pci8086,f0fe \
alias=pciex8086,d4c \
alias=pciex8086,d4d \
@@ -184,6 +201,10 @@ driver name=e1000g perms="* 0666 root sys" clone_perms="e1000g 0666 root sys" \
alias=pciex8086,d4f \
alias=pciex8086,d53 \
alias=pciex8086,d55 \
+ alias=pciex8086,dc5 \
+ alias=pciex8086,dc6 \
+ alias=pciex8086,dc7 \
+ alias=pciex8086,dc8 \
alias=pciex8086,1049 \
alias=pciex8086,104a \
alias=pciex8086,104b \
@@ -259,11 +280,24 @@ driver name=e1000g perms="* 0666 root sys" clone_perms="e1000g 0666 root sys" \
alias=pciex8086,15e2 \
alias=pciex8086,15e3 \
alias=pciex8086,15f4 \
+ alias=pciex8086,15f5 \
alias=pciex8086,15f9 \
alias=pciex8086,15fa \
alias=pciex8086,15fb \
alias=pciex8086,15fc \
+ alias=pciex8086,1a1c \
+ alias=pciex8086,1a1d \
+ alias=pciex8086,1a1e \
+ alias=pciex8086,1a1f \
alias=pciex8086,294c \
+ alias=pciex8086,550a \
+ alias=pciex8086,550b \
+ alias=pciex8086,550c \
+ alias=pciex8086,550d \
+ alias=pciex8086,550e \
+ alias=pciex8086,550f \
+ alias=pciex8086,5510 \
+ alias=pciex8086,5511 \
alias=pciex8086,f0fe
legacy pkg=SUNWintgige desc="Intel(R) PRO/1000 Server Adapter Driver" \
name="Intel(R) PRO/1000 Server Adapter Driver"
diff --git a/usr/src/uts/common/io/e1000api/README.illumos b/usr/src/uts/common/io/e1000api/README.illumos
index d00891614d..e88eddc913 100644
--- a/usr/src/uts/common/io/e1000api/README.illumos
+++ b/usr/src/uts/common/io/e1000api/README.illumos
@@ -45,11 +45,12 @@ are. DO NOT just blindly copy over new common code. There is more work that
needs to be done in terms of changed interfaces and expectations for the
drivers.
-# Support for Ice Lake, Cannon Lake, and Tiger Lake
+# Support for Ice Lake, Cannon Lake, Tiger Lake, and the more recent I219 LM/V
Due to several changes that have been made to the core e1000 code in
FreeBSD that's specific to changes for iflib, a whole sale update was
-not done and instead support was manually merged based on Intel.
+not done and instead support was manually merged based on information from
+Intel.
# e1000_defines.h
diff --git a/usr/src/uts/common/io/e1000api/e1000_api.c b/usr/src/uts/common/io/e1000api/e1000_api.c
index a6e8d2378d..80e6805503 100644
--- a/usr/src/uts/common/io/e1000api/e1000_api.c
+++ b/usr/src/uts/common/io/e1000api/e1000_api.c
@@ -331,8 +331,33 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_PCH_TGP_I219_LM14:
case E1000_DEV_ID_PCH_TGP_I219_V14:
case E1000_DEV_ID_PCH_TGP_I219_LM15:
+ case E1000_DEV_ID_PCH_TGP_I219_V15:
mac->type = e1000_pch_tgp;
break;
+ case E1000_DEV_ID_PCH_ADP_I219_LM16:
+ case E1000_DEV_ID_PCH_ADP_I219_V16:
+ case E1000_DEV_ID_PCH_ADP_I219_LM17:
+ case E1000_DEV_ID_PCH_ADP_I219_V17:
+ mac->type = e1000_pch_adp;
+ break;
+ case E1000_DEV_ID_PCH_MTP_I219_LM18:
+ case E1000_DEV_ID_PCH_MTP_I219_V18:
+ case E1000_DEV_ID_PCH_MTP_I219_LM19:
+ case E1000_DEV_ID_PCH_MTP_I219_V19:
+ mac->type = e1000_pch_mtp;
+ break;
+ case E1000_DEV_ID_PCH_LNP_I219_LM20:
+ case E1000_DEV_ID_PCH_LNP_I219_V20:
+ case E1000_DEV_ID_PCH_LNP_I219_LM21:
+ case E1000_DEV_ID_PCH_LNP_I219_V21:
+ mac->type = e1000_pch_lnp;
+ break;
+ case E1000_DEV_ID_PCH_RPL_I219_LM22:
+ case E1000_DEV_ID_PCH_RPL_I219_V22:
+ case E1000_DEV_ID_PCH_RPL_I219_LM23:
+ case E1000_DEV_ID_PCH_RPL_I219_V23:
+ mac->type = e1000_pch_rpl;
+ break;
case E1000_DEV_ID_82575EB_COPPER:
case E1000_DEV_ID_82575EB_FIBER_SERDES:
case E1000_DEV_ID_82575GB_QUAD_COPPER:
diff --git a/usr/src/uts/common/io/e1000api/e1000_hw.h b/usr/src/uts/common/io/e1000api/e1000_hw.h
index a9bb3cef75..9d440c3e71 100644
--- a/usr/src/uts/common/io/e1000api/e1000_hw.h
+++ b/usr/src/uts/common/io/e1000api/e1000_hw.h
@@ -165,6 +165,23 @@ struct e1000_hw;
#define E1000_DEV_ID_PCH_TGP_I219_LM14 0x15F9
#define E1000_DEV_ID_PCH_TGP_I219_V14 0x15FA
#define E1000_DEV_ID_PCH_TGP_I219_LM15 0x15F4
+#define E1000_DEV_ID_PCH_TGP_I219_V15 0x15F5
+#define E1000_DEV_ID_PCH_ADP_I219_LM16 0x1A1E
+#define E1000_DEV_ID_PCH_ADP_I219_V16 0x1A1F
+#define E1000_DEV_ID_PCH_ADP_I219_LM17 0x1A1C
+#define E1000_DEV_ID_PCH_ADP_I219_V17 0x1A1D
+#define E1000_DEV_ID_PCH_MTP_I219_LM18 0x550A
+#define E1000_DEV_ID_PCH_MTP_I219_V18 0x550B
+#define E1000_DEV_ID_PCH_MTP_I219_LM19 0x550C
+#define E1000_DEV_ID_PCH_MTP_I219_V19 0x550D
+#define E1000_DEV_ID_PCH_LNP_I219_LM20 0x550E
+#define E1000_DEV_ID_PCH_LNP_I219_V20 0x550F
+#define E1000_DEV_ID_PCH_LNP_I219_LM21 0x5510
+#define E1000_DEV_ID_PCH_LNP_I219_V21 0x5511
+#define E1000_DEV_ID_PCH_RPL_I219_LM22 0x0DC7
+#define E1000_DEV_ID_PCH_RPL_I219_V22 0x0DC8
+#define E1000_DEV_ID_PCH_RPL_I219_LM23 0x0DC5
+#define E1000_DEV_ID_PCH_RPL_I219_V23 0x0DC6
#define E1000_DEV_ID_82576 0x10C9
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
@@ -254,9 +271,10 @@ enum e1000_mac_type {
/*
* The following MACs all share the ich8 style of hardware and are
* implemented in ich8, though some are a little more different than
- * others. The pch_lpt, pch_spt, pch_cnp, and pch_tgp families are a bit
- * more different than the others and just have slight variants in
- * behavior between them. They are ordered based on release.
+ * others. The pch_lpt, pch_spt, pch_cnp, pch_tgp, pch_adp, pch_mtp,
+ * pch_lnp, and pch_rpl families are a bit more different than the
+ * others and just have slight variants in behavior between them. They
+ * are ordered based on release.
*/
e1000_ich8lan,
e1000_ich9lan,
@@ -267,6 +285,10 @@ enum e1000_mac_type {
e1000_pch_spt,
e1000_pch_cnp,
e1000_pch_tgp,
+ e1000_pch_adp,
+ e1000_pch_mtp,
+ e1000_pch_lnp,
+ e1000_pch_rpl,
/*
* After this point all MACs are used by the igb(7D) driver as opposed
* to e1000g(7D). If a new MAC is specific to e1000g series of devices,
diff --git a/usr/src/uts/common/io/e1000api/e1000_ich8lan.c b/usr/src/uts/common/io/e1000api/e1000_ich8lan.c
index 57f03e211b..a6bab1312f 100644
--- a/usr/src/uts/common/io/e1000api/e1000_ich8lan.c
+++ b/usr/src/uts/common/io/e1000api/e1000_ich8lan.c
@@ -346,6 +346,10 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
if (e1000_phy_is_accessible_pchlan(hw))
break;
@@ -496,6 +500,10 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
/* In case the PHY needs to be in mdio slow mode,
* set slow mode and try to get the PHY id again.
*/
@@ -799,6 +807,10 @@ static s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
/* multicast address update for pch2 */
mac->ops.update_mc_addr_list =
e1000_update_mc_addr_list_pch2lan;
@@ -1832,6 +1844,10 @@ void e1000_init_function_pointers_ich8lan(struct e1000_hw *hw)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
hw->phy.ops.init_params = e1000_init_phy_params_pchlan;
break;
default:
@@ -2298,6 +2314,10 @@ static s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
sw_cfg_mask = E1000_FEXTNVM_SW_CONFIG_ICH8M;
break;
default:
@@ -3417,6 +3437,10 @@ static s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
bank1_offset = nvm->flash_bank_size;
act_offset = E1000_ICH_NVM_SIG_WORD;
@@ -4393,6 +4417,10 @@ static s32 e1000_validate_nvm_checksum_ich8lan(struct e1000_hw *hw)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
word = NVM_COMPAT;
valid_csum_mask = NVM_COMPAT_VALID_CSUM;
break;
diff --git a/usr/src/uts/common/io/e1000g/e1000g_main.c b/usr/src/uts/common/io/e1000g/e1000g_main.c
index 7d55a00682..eb579a54ee 100644
--- a/usr/src/uts/common/io/e1000g/e1000g_main.c
+++ b/usr/src/uts/common/io/e1000g/e1000g_main.c
@@ -26,6 +26,7 @@
* Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2022 Oxide Computer Company
*/
/*
@@ -51,7 +52,7 @@
static char ident[] = "Intel PRO/1000 Ethernet";
/* LINTED E_STATIC_UNUSED */
-static char e1000g_version[] = "Driver Ver. 5.3.24";
+static char e1000g_version[] = "Driver Ver. 5.4.00";
/*
* Proto types for DDI entry points
@@ -713,6 +714,10 @@ e1000g_regs_map(struct e1000g *Adapter)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
/*
* On the SPT, the device flash is actually in BAR0, not a
* separate BAR. Therefore we end up setting the
@@ -913,6 +918,10 @@ e1000g_setup_max_mtu(struct e1000g *Adapter)
case e1000_pch_spt:
case e1000_pch_cnp:
case e1000_pch_tgp:
+ case e1000_pch_adp:
+ case e1000_pch_mtp:
+ case e1000_pch_lnp:
+ case e1000_pch_rpl:
Adapter->max_mtu = MAXIMUM_MTU_9K;
break;
/* types with a special limit */
@@ -1494,6 +1503,14 @@ e1000g_init(struct e1000g *Adapter)
pba = E1000_PBA_26K;
} else if (hw->mac.type == e1000_pch_tgp) {
pba = E1000_PBA_26K;
+ } else if (hw->mac.type == e1000_pch_adp) {
+ pba = E1000_PBA_26K;
+ } else if (hw->mac.type == e1000_pch_mtp) {
+ pba = E1000_PBA_26K;
+ } else if (hw->mac.type == e1000_pch_lnp) {
+ pba = E1000_PBA_26K;
+ } else if (hw->mac.type == e1000_pch_rpl) {
+ pba = E1000_PBA_26K;
} else {
/*
* Total FIFO is 40K
diff --git a/usr/src/uts/intel/os/driver_aliases b/usr/src/uts/intel/os/driver_aliases
index c79c7349a5..ffceefc9a9 100644
--- a/usr/src/uts/intel/os/driver_aliases
+++ b/usr/src/uts/intel/os/driver_aliases
@@ -455,17 +455,34 @@ e1000g "pci8086,15e1"
e1000g "pci8086,15e2"
e1000g "pci8086,15e3"
e1000g "pci8086,15f4,p"
+e1000g "pci8086,15f5,p"
e1000g "pci8086,15f9,p"
e1000g "pci8086,15fa,p"
e1000g "pci8086,15fb,p"
e1000g "pci8086,15fc,p"
+e1000g "pci8086,1a1c,p"
+e1000g "pci8086,1a1d,p"
+e1000g "pci8086,1a1e,p"
+e1000g "pci8086,1a1f,p"
e1000g "pci8086,294c"
+e1000g "pci8086,550a,p"
+e1000g "pci8086,550b,p"
+e1000g "pci8086,550c,p"
+e1000g "pci8086,550d,p"
+e1000g "pci8086,550e,p"
+e1000g "pci8086,550f,p"
+e1000g "pci8086,5510,p"
+e1000g "pci8086,5511,p"
e1000g "pci8086,d4c,p"
e1000g "pci8086,d4d,p"
e1000g "pci8086,d4e,p"
e1000g "pci8086,d4f,p"
e1000g "pci8086,d53,p"
e1000g "pci8086,d55,p"
+e1000g "pci8086,dc5,p"
+e1000g "pci8086,dc6,p"
+e1000g "pci8086,dc7,p"
+e1000g "pci8086,dc8,p"
e1000g "pci8086,f0fe"
e1000g "pciex8086,1049"
e1000g "pciex8086,104a"
@@ -542,17 +559,34 @@ e1000g "pciex8086,15e1"
e1000g "pciex8086,15e2"
e1000g "pciex8086,15e3"
e1000g "pciex8086,15f4"
+e1000g "pciex8086,15f5"
e1000g "pciex8086,15f9"
e1000g "pciex8086,15fa"
e1000g "pciex8086,15fb"
e1000g "pciex8086,15fc"
+e1000g "pciex8086,1a1c"
+e1000g "pciex8086,1a1d"
+e1000g "pciex8086,1a1e"
+e1000g "pciex8086,1a1f"
e1000g "pciex8086,294c"
+e1000g "pciex8086,550a"
+e1000g "pciex8086,550b"
+e1000g "pciex8086,550c"
+e1000g "pciex8086,550d"
+e1000g "pciex8086,550e"
+e1000g "pciex8086,550f"
+e1000g "pciex8086,5510"
+e1000g "pciex8086,5511"
e1000g "pciex8086,d4c"
e1000g "pciex8086,d4d"
e1000g "pciex8086,d4e"
e1000g "pciex8086,d4f"
e1000g "pciex8086,d53"
e1000g "pciex8086,d55"
+e1000g "pciex8086,dc5"
+e1000g "pciex8086,dc6"
+e1000g "pciex8086,dc7"
+e1000g "pciex8086,dc8"
e1000g "pciex8086,f0fe"
ecpp "lp"
ehci "pciclass,0c0320"