diff options
author | Dan McDonald <danmcd@joyent.com> | 2021-01-13 08:48:39 -0500 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2021-01-13 08:48:44 -0500 |
commit | 86eced9f5769d6e9b723d7ecd844842d1cf2982c (patch) | |
tree | 1422a6602a5cce573812c1ff8b45890cf79a2bb0 | |
parent | 7fab0ca77cdcb2a9ec0d10bd58bca415c5138dc0 (diff) | |
parent | f73e1ebf60792a8bdb2d559097c3131b68c09318 (diff) | |
download | illumos-joyent-release-20210114.tar.gz |
[illumos-gate merge]release-20210114
commit f73e1ebf60792a8bdb2d559097c3131b68c09318
13352 disable mdns date and time in version string
commit 20a2a10f2c0bcd395700659efe34b54ab4404444
10447 ACPI binaries should be reproducible
commit abe1d126b4a1229ee2861d65508e7a52bd8c2721
13440 ppin disablement path missing state transition
commit ae9405842e25ee75c6a9fd1996e04b41fbd2eda3
13420 libld: symbol 'dynsort_compare_syms' is multiply-defined
commit 338c2f033035af5b17f61d9df825917015c95a35
13415 psvcpolicy: variable 'curr_state' set but not used
commit 71f73b0075fdda332f0e079884f3aa28497b0806
13414 libcurses: symbol '_win' is multiply-defined
commit 2cbc828d66d6088914f685ae0e77169ecc9fc7f9
13443 gate build missing some NATIVE_LIBS
commit bac90afdc3c952be2a041bb1b669ac56cef7d145
13444 libbe_py should provide nextboot information
commit 3561e562ae78c234d96711f36e19360789b0ffe3
13410 ddi_ufm(9E) typos and such
commit aa35d5f200c519c3e5425cb26762e2d01ce2e66f
13416 libprtdiag_psr: variable 'ap_args' set but not used
commit 16d53a891df2f19b4dc37110081555be4e474d8c
13413 svc.startd: 'contract_list_pool' is multiply-defined
Conflicts:
usr/src/cmd/bhyve/Makefile
-rw-r--r-- | usr/src/cmd/acpi/acpidump/Makefile | 1 | ||||
-rw-r--r-- | usr/src/cmd/acpi/acpixtract/Makefile | 1 | ||||
-rw-r--r-- | usr/src/cmd/acpi/iasl/Makefile | 1 | ||||
-rw-r--r-- | usr/src/cmd/acpi/iasl/aslutils.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/bhyve/Makefile | 1 | ||||
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile | 1 | ||||
-rw-r--r-- | usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c | 9 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libld/common/update.c | 2 | ||||
-rw-r--r-- | usr/src/cmd/svc/startd/restarter.c | 1 | ||||
-rw-r--r-- | usr/src/cmd/svc/startd/startd.h | 4 | ||||
-rw-r--r-- | usr/src/lib/libprtdiag_psr/sparc/serengeti/common/serengeti.c | 2 | ||||
-rw-r--r-- | usr/src/lib/pylibbe/common/libbe_py.c | 7 | ||||
-rw-r--r-- | usr/src/man/man9e/ddi_ufm.9e | 159 | ||||
-rw-r--r-- | usr/src/tools/smatch/Makefile | 7 | ||||
-rw-r--r-- | usr/src/ucblib/libcurses/cr_put.c | 15 | ||||
-rw-r--r-- | usr/src/uts/i86pc/cpu/generic_cpu/gcpu_main.c | 5 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/acpi/acapps.h | 2 | ||||
-rw-r--r-- | usr/src/uts/intel/sys/x86_archext.h | 1 |
18 files changed, 129 insertions, 92 deletions
diff --git a/usr/src/cmd/acpi/acpidump/Makefile b/usr/src/cmd/acpi/acpidump/Makefile index 29efef7992..c6102b2275 100644 --- a/usr/src/cmd/acpi/acpidump/Makefile +++ b/usr/src/cmd/acpi/acpidump/Makefile @@ -30,6 +30,7 @@ CERRWARN += -_gcc=-Wno-unused-function SMOFF = all_func_returns CPPFLAGS += -I$(SRC)/uts/intel/sys/acpi -DACPI_DUMP_APP +CPPFLAGS += -DACPI_DATE=\"$(VERSION)\" LDLIBS += -ldevinfo diff --git a/usr/src/cmd/acpi/acpixtract/Makefile b/usr/src/cmd/acpi/acpixtract/Makefile index e2446ec33d..875c54420d 100644 --- a/usr/src/cmd/acpi/acpixtract/Makefile +++ b/usr/src/cmd/acpi/acpixtract/Makefile @@ -31,6 +31,7 @@ VPATH = ../common:$(SRC)/common/acpica/utilities SMOFF = all_func_returns,macros CPPFLAGS += -I$(SRC)/uts/intel/sys/acpi -DACPI_XTRACT_APP +CPPFLAGS += -DACPI_DATE=\"$(VERSION)\" .KEEP_STATE: diff --git a/usr/src/cmd/acpi/iasl/Makefile b/usr/src/cmd/acpi/iasl/Makefile index 80885ceb40..a762f324de 100644 --- a/usr/src/cmd/acpi/iasl/Makefile +++ b/usr/src/cmd/acpi/iasl/Makefile @@ -105,6 +105,7 @@ INTERMEDIATES = \ SMATCH=off CPPFLAGS += -I$(SRC)/uts/intel/sys/acpi -DACPI_ASL_COMPILER -I. +CPPFLAGS += -DACPI_DATE=\"$(VERSION)\" LEX_C_FILES = aslcompilerlex.c dtparserlex.c prparserlex.c YACC_C_FILES = aslcompilerparse.c dtparserparse.c prparserparse.c diff --git a/usr/src/cmd/acpi/iasl/aslutils.c b/usr/src/cmd/acpi/iasl/aslutils.c index 16ef1f478f..e1bc50a26a 100644 --- a/usr/src/cmd/acpi/iasl/aslutils.c +++ b/usr/src/cmd/acpi/iasl/aslutils.c @@ -542,7 +542,7 @@ UtDisplaySummary ( /* Compiler name and version number */ FlPrintFile (FileId, "%s version %X [%s]\n\n", - ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, __DATE__); + ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_DATE); } /* Summary of main input and output files */ diff --git a/usr/src/cmd/bhyve/Makefile b/usr/src/cmd/bhyve/Makefile index 4dc737c768..d9991287f0 100644 --- a/usr/src/cmd/bhyve/Makefile +++ b/usr/src/cmd/bhyve/Makefile @@ -140,6 +140,7 @@ C99MODE= -xc99=%all $(PROG) := LDLIBS += -lsocket -lnsl -ldlpi -ldladm -lmd -lsunw_crypto -luuid \ -lvmmapi -lz +NATIVE_LIBS += libz.so $(ZHYVE_PROG) := LDLIBS += -lnvpair $(MEVENT_TEST_PROG) := LDLIBS += -lsocket diff --git a/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile b/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile index 9bc700ab29..8afabd17fe 100644 --- a/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile +++ b/usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile @@ -26,6 +26,7 @@ SRCDIR= $(SRC)/contrib/mDNSResponder CFLAGS += $(CSTD_GNU99) CPPFLAGS += -I$(SRCDIR)/mDNSShared CPPFLAGS += -DmDNSResponderVersion=878.1.1 +CPPFLAGS += -DMDNS_VERSIONSTR_NODTS LDLIBS += -lsocket -ldns_sd # not linted diff --git a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c index 3dcd6972d3..c8806c9fe3 100644 --- a/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c +++ b/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Daktari platform platform specific environment monitoring policies */ @@ -98,7 +96,7 @@ static int dak_policy_debug = 0; #define GET_SENSOR_FAILED_MSG \ gettext("Failed to get sensor value, id = %s, errno = %d\n") #define ADD_PS_MSG \ -gettext("WARNING: Only 1 Power Supply in system. ADD a 2nd Power Supply.\n") + gettext("WARNING: Only 1 Power Supply in system. ADD a 2nd Power Supply.\n") #define REMOVE_LOAD_MSG \ gettext("WARNING: Power Supply at 95%% current. Remove some load.\n") #define PS_OVER_CURRENT_MSG \ @@ -201,7 +199,7 @@ static i2c_noise_param_t i2cparams[] = { static void i2cparams_debug(i2c_noise_param_t *pi2cparams, char *platform, - int usingDefaults) + int usingDefaults) { char s[128]; i2c_noise_param_t *p; @@ -1849,7 +1847,7 @@ psvc_check_disk_fault_policy_0(psvc_opaque_t hdlp, char *id) { int32_t status = PSVC_SUCCESS; int32_t i; - char curr_state[32], prev_state[32], led_state[32]; + char prev_state[32], led_state[32]; char disk_fault[32], disk_state[32]; static char *disk_id[DAK_MAX_DISKS] = {NULL}; static char *led_id[DAK_MAX_DISKS] = {NULL}; @@ -1884,7 +1882,6 @@ psvc_check_disk_fault_policy_0(psvc_opaque_t hdlp, char *id) } for (i = 0; i < DAK_MAX_DISKS; i++) { - curr_state[0] = 0; prev_state[0] = 0; status = psvc_get_attr(hdlp, disk_id[i], PSVC_PRESENCE_ATTR, diff --git a/usr/src/cmd/sgs/libld/common/update.c b/usr/src/cmd/sgs/libld/common/update.c index 7626520cd7..d61d4cfcd5 100644 --- a/usr/src/cmd/sgs/libld/common/update.c +++ b/usr/src/cmd/sgs/libld/common/update.c @@ -58,7 +58,7 @@ sym_hash_compare(Sym_s_list * s1, Sym_s_list * s2) * we need to examine the symbols the indices reference. It is safe, because * the linker is single threaded. */ -Sym *dynsort_compare_syms; +static Sym *dynsort_compare_syms; static int dynsort_compare(const void *idx1, const void *idx2) diff --git a/usr/src/cmd/svc/startd/restarter.c b/usr/src/cmd/svc/startd/restarter.c index 516004c894..70f84a06d6 100644 --- a/usr/src/cmd/svc/startd/restarter.c +++ b/usr/src/cmd/svc/startd/restarter.c @@ -135,6 +135,7 @@ #include "startd.h" #include "protocol.h" +uu_list_pool_t *contract_list_pool; static uu_list_pool_t *restarter_instance_pool; static restarter_instance_list_t instance_list; diff --git a/usr/src/cmd/svc/startd/startd.h b/usr/src/cmd/svc/startd/startd.h index df3e98a27b..cf6e7e5cc5 100644 --- a/usr/src/cmd/svc/startd/startd.h +++ b/usr/src/cmd/svc/startd/startd.h @@ -325,7 +325,7 @@ typedef struct graph_vertex { * * Currently, only relevant for GVT_SVC and GVT_INST type vertices. */ - int gv_refs; + int gv_refs; int32_t gv_stn_tset; int32_t gv_reason; @@ -566,7 +566,7 @@ typedef struct contract_entry { extern volatile uint16_t storing_contract; -uu_list_pool_t *contract_list_pool; +extern uu_list_pool_t *contract_list_pool; /* contract.c */ ctid_t contract_init(void); diff --git a/usr/src/lib/libprtdiag_psr/sparc/serengeti/common/serengeti.c b/usr/src/lib/libprtdiag_psr/sparc/serengeti/common/serengeti.c index 6d95747413..0f1b5d8efc 100644 --- a/usr/src/lib/libprtdiag_psr/sparc/serengeti/common/serengeti.c +++ b/usr/src/lib/libprtdiag_psr/sparc/serengeti/common/serengeti.c @@ -959,7 +959,6 @@ cpu_node_configured(char *const node) int nlist = 0; boolean_t rv; char *err_string = NULL; - char *const *ap_args = NULL; struct cfga_list_data *statlist = NULL; struct cfga_list_data dat; cfga_flags_t flags = CFGA_FLAG_LIST_ALL; @@ -967,7 +966,6 @@ cpu_node_configured(char *const node) if (node == NULL) return (FALSE); - ap_args = &node; ret = config_list_ext(1, &node, &statlist, &nlist, NULL, NULL, &err_string, flags); diff --git a/usr/src/lib/pylibbe/common/libbe_py.c b/usr/src/lib/pylibbe/common/libbe_py.c index 554e029fda..4671001685 100644 --- a/usr/src/lib/pylibbe/common/libbe_py.c +++ b/usr/src/lib/pylibbe/common/libbe_py.c @@ -22,7 +22,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved. - * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. + * Copyright 2021 OmniOS Community Edition (OmniOSce) Association. */ #include <Python.h> @@ -871,6 +871,11 @@ convertBEInfoToDictionary(be_node_list_t *be, PyObject **listDict) return (B_FALSE); } + if (PyDict_SetItemString(*listDict, BE_ATTR_ACTIVE_NEXTBOOT, + (be->be_active_next ? Py_True : Py_False)) != 0) { + return (B_FALSE); + } + if (PyDict_SetItemString(*listDict, BE_ATTR_GLOBAL_ACTIVE, (be->be_global_active ? Py_True : Py_False)) != 0) { return (B_FALSE); diff --git a/usr/src/man/man9e/ddi_ufm.9e b/usr/src/man/man9e/ddi_ufm.9e index 8f2ebdf1f9..08ea919f6d 100644 --- a/usr/src/man/man9e/ddi_ufm.9e +++ b/usr/src/man/man9e/ddi_ufm.9e @@ -10,7 +10,7 @@ .\" .\" .\" Copyright 2019 Joyent, Inc. -.\" Copyright 2020 Oxide Computer Company +.\" Copyright 2021 Oxide Computer Company .\" .Dd May 19, 2020 .Dt DDI_UFM 9E @@ -43,23 +43,23 @@ .Fo ddi_ufm_op_fill_image .Fa "ddi_ufm_handle_t *uhp" .Fa "void *drv_arg" -.Fa "uint_t imgid" +.Fa "uint_t imgno" .Fa "ddi_ufm_image_t *imgp" .Fc .Ft int .Fo ddi_ufm_op_fill_slot .Fa "ddi_ufm_handle_t *uhp" .Fa "void *drv_arg" -.Fa "uint_t imgid" -.Fa "uint_t slotid" +.Fa "uint_t imgno" +.Fa "uint_t slotno" .Fa "ddi_ufm_slot_t *slotp" .Fc .Ft int .Fo ddi_ufm_op_readimg .Fa "ddi_ufm_handle_t *uhp" .Fa "void *drv_arg" -.Fa "uint_t imgid" -.Fa "uint_t slotid" +.Fa "uint_t imgno" +.Fa "uint_t slotno" .Fa "uint64_t len" .Fa "uint64_t offset" .Fa "void *buf" @@ -78,13 +78,11 @@ This is a private value that the driver passed in when calling .Xr ddi_ufm_init 9F . .It Fa nimgp A pointer that the driver should set with a number of images. -.It Fa nslotp -A pointer that the driver should set with a number of slots. -.It Fa imgid +.It Fa imgno An integer indicating which image information is being requested for. .It Fa imgp An opaque pointer that represents a UFM image. -.It Fa slotid +.It Fa slotno An integer indicating which slot information is being requested for. .It Fa slotp An opaque pointer that represents a UFM slot. @@ -93,7 +91,7 @@ Indicates the number of bytes from a firmware payload that are desired. .It Fa offset Indicates an offset in a firmware payload to start reading from. .It Fa buf -A buffer to place data firmware data read into. +A buffer to place raw firmware data from the device into. .It Fa nreadp A pointer whose value should be updated with the number of bytes actually read from the image. @@ -105,35 +103,42 @@ These interfaces aim to provide a simple series of callbacks for a device driver to implement such that it is easy to report information and in the future, manipulate firmware modules. .Ss UFM Background -UFMs may come in different flavors and styles ranging from a -firmware blob, to an EEPROM image, to microcode, and more. +UFMs come in different flavors and styles that vary from device to +device. +.Qq Firmware +generally refers to some form of software that runs on a device and is often +packaged up as a binary payload. +However, many things that aren't always called +.Qq firmware , +such as EEPROM images, CPU microcode, flash based configuration, and more, are +all just as important here. Take for example a hard drive. While it is a field replaceable unit (FRU), it also contains some amount of firmware that manages the drive which can be updated independently of replacing the drive. .Pp The motherboard often has a UFM in the form of the BIOS or UEFI. -The Lights out management controller on a system has a UFM, which is usually +The Lights Out Management controller on a system has a UFM, which is usually the entire system image. CPUs also have a UFM in the form of microcode. .Pp -An important property of a UFM is that it is a property of the device +An important property of a UFM is that it is a persistent part of the device itself. For example, many WiFi device drivers are required to send a binary blob of firmware to the device after every reset. -Because these images are not properties of the device and must be upgraded by -either changing the device driver or related system files, we do not consider +Because these images are not persistent parts of the device and must be upgraded +by either changing the device driver or related system files, we do not consider these UFMs. .Pp -There are also devices that have firmware which is a property of the +There are also devices that have firmware which is a part of the device, but may not be upgradable from the running OS. This may be because the vendor doesn't have tooling to upgrade the image or because the firmware image itself cannot be upgraded in the field at all. For example, a YubiKey has a firmware image that's burned into it in the factory, but there is no way to change the firmware on it short of replacing the device in its entirety. -However, because these images are a permanent part of the device, we also -consider them a UFM. +However, because these images are a permanent and persistent part of the device, +we also consider them a UFM. .Ss Images and Slots A device that supports UFMs is made up of one or more distinct firmware images. @@ -143,13 +148,14 @@ has independent firmware revisions. .Pp A given image may have a number of slots. A slot represents a particular version of the image. -Only one slot can be active at a given time. -Devices support slots such that a firmware image can be downloaded -to the device without impacting the current device if it fails half-way -through. -The slot that's currently in use is referred to as the +Only one slot is considered the .Em active slot. +It represents the currently running version of the image. +Devices support multiple slots so that an image can be downloaded to an inactive +slot without risking damage to the active slot. +This ensures that a power-loss or failure halfway through writing to a slot +doesn't leave the device with corrupted firmware. .Pp The various entry points are designed such that all a driver has to do is provide information about the image and its slots to the kernel, it @@ -181,14 +187,14 @@ typedef struct ddi_ufm_ops { int (*ddi_ufm_op_nimages)(ddi_ufm_handle_t *uhp, void *drv_arg, uint_t *nimgp); int (*ddi_ufm_op_fill_image)(ddi_ufm_handle_t *uhp, void *drv_arg, - uint_t imgid, ddi_ufm_image_t *imgp); + uint_t imgno, ddi_ufm_image_t *imgp); int (*ddi_ufm_op_fill_slot)(ddi_ufm_handle_t *uhp, void *drv_arg, - int imgid, ddi_ufm_image_t *img, uint_t slotid, + int imgno, ddi_ufm_image_t *img, uint_t slotno, ddi_ufm_slot_t *slotp); int (*ddi_ufm_op_getcaps)(ddi_ufm_handle_t *uhp, void *drv_arg, ddi_ufm_cap_t *caps); int (*ddi_ufm_op_readimg)(ddi_ufm_handle_t *uhp, void *drv_arg, - uint_t imgid, uint_t slotid, uint64_t len, uint64_t offset, + uint_t imgno, uint_t slotno, uint64_t len, uint64_t offset, void *buf, uint64_t *nreadp); } ddi_ufm_ops_t; .Ed @@ -198,23 +204,28 @@ The and .Fn ddi_ufm_op_readimg entry points are optional. -If a device only has a single image, then there is no reason to implement the +If a device only has a single image, then there is no requirement to implement +the .Fn ddi_ufm_op_nimages -entry point. +entry point and it may be set to +.Dv NULL . The system will assume that there is only a single image. .Pp Slots and images are numbered starting at zero. -If a driver indicates support for multiple images or slots then the images +If a driver indicates support for multiple images, through the +.Fn ddi_ufm_op_nimages +entry point, or slots, by using the +.Xr ddi_ufm_image_set_nslots 9F +function in the +.Fn ddi_fum_op_fill_image +callback then the images or slots will be numbered sequentially going from 0 to the number of images or slots minus one. These values will be passed to the various entry points to indicate which image and slot the system is interested in. It is up to the driver to maintain a consistent view of the images and slots for a given UFM. -.Pp -The members of this structure should be filled in the following ways: -.Bl -tag -width Fn -.It Fn ddi_ufm_op_nimages +.Ss Fn ddi_ufm_op_nimages The .Fn ddi_ufm_op_nimages entry point is an optional entry point that answers the question of how @@ -237,16 +248,16 @@ Common values are: An error occurred while communicating with the device to determine the number of firmware images. .El -.It Fn ddi_ufm_op_fill_image +.Ss Fn ddi_ufm_op_fill_image The .Fn ddi_ufm_op_fill_image entry point is used to fill in information about a given image. The value in -.Fa imgid +.Fa imgno is used to indicate which image the system is asking to fill information about. If the driver does not recognize the image ID in -.Fa imgid +.Fa imgno then it should return an error. .Pp The @@ -258,10 +269,14 @@ To fill in information about the image, the driver should call the functions described in .Xr ddi_ufm_image 9F . .Pp -The driver should call the +The driver must call the .Xr ddi_ufm_image_set_desc 9F function to set a description of the image which indicates its purpose. This should be a human-readable string. +In addition, the driver must call the +.Xr ddi_ufm_image_set_nslots 9F +function to indicate the number of slots that the device supports for +that particular firmware image. The driver may also set any ancillary data that it deems may be useful with the .Xr ddi_ufm_image_set_misc 9F function. This function takes an nvlist, allowing the driver to set arbitrary keys and values. @@ -276,7 +291,7 @@ Common values are: .Bl -tag -width Er -offset width .It Er EINVAL The image indicated by -.Fa imgid +.Fa imgno is unknown. .It Er EIO An error occurred talking to the device while trying to fill out @@ -285,21 +300,21 @@ firmware image information. The driver was unable to allocate memory while filling out image information. .El -.It Fn ddi_ufm_op_fill_slot +.Ss Fn ddi_ufm_op_fill_slot The .Fn ddi_ufm_op_fill_slot function is used to fill in information about a specific slot for a specific image. The value in -.Fa imgid +.Fa imgno indicates the image the system wants slot information for and the value in -.Fa slotid +.Fa slotno indicates which slot of that image the system is interested in. If the device driver does not recognize the value in either or -.Fa imgid +.Fa imgno or -.Fa slotid , +.Fa slotno , then it should return an error. .Pp The @@ -324,21 +339,29 @@ function should be used to set the attributes of the UFM slot. These attributes include the following enumeration values: .Bl -tag -width Dv .It Dv DDI_UFM_ATTR_READABLE -This attribute indicates that the firmware image in the specified slot +The +.Dv DDI_UFM_ATTR_READABLE +attribute indicates that the firmware image in the specified slot may be read, even if the device driver does not currently support such functionality. .It Dv DDI_UFM_ATTR_WRITEABLE -This attributes indicates that the firmware image in the specified slot +The +.Dv DDI_UFM_ATTR_WRITEABLE +attribute indicates that the firmware image in the specified slot may be updated, even if the driver does not currently support such functionality. .It Dv DDI_UFM_ATTR_ACTIVE -This attributes indicates that the firmware image in the specified slot +The +.Dv DDI_UFM_ATTR_ACTIVE +attribute indicates that the firmware image in the specified slot is the active .Pq i.e. currently running firmware. Only one slot should be marked active. .It Dv DDI_UFM_ATTR_EMPTY -This attributes indicates that the specified slot does not currently contain +The +.Dv DDI_UFM_ATTR_EMPTY +attribute indicates that the specified slot does not currently contain any firmware image. .El .Pp @@ -365,9 +388,9 @@ Common values are: .Bl -tag -width Er -offset width .It Er EINVAL The image or slot indicated by -.Fa imgid +.Fa imgno and -.Fa slotid +.Fa slotno is unknown. .It Er EIO An error occurred talking to the device while trying to fill out @@ -376,11 +399,14 @@ firmware slot information. The driver was unable to allocate memory while filling out slot information. .El -.It Fn ddi_ufm_op_getcaps +.Ss Fn ddi_ufm_op_getcaps The .Fn ddi_ufm_op_getcaps function is used to indicate which DDI UFM capabilities are supported by this driver instance. +Currently, all UFM-capable drivers are required to implement the +.Dv DDI_UFM_CAP_REPORT +capability. The following capabilities are supported and the drivers should return a bitwise-inclusive-OR of the following values: .Bl -tag -width Dv -offset width @@ -388,8 +414,11 @@ bitwise-inclusive-OR of the following values: Indicates that the driver is capable of reporting UFM information and implements the .Fn ddi_ufm_op_fill_slot -entry point and optionally the +and .Fn ddi_ufm_op_fill_image +entry points. +It also indicates, that it optionally implements +.Fn ddi_ufm_op_nimages entry point. .It Dv DDI_UFM_CAP_READIMG Indicates that the driver is capable of reading a binary firmware @@ -415,15 +444,15 @@ capabilities. .It Er ENOMEM The driver was unable to allocate memory. .El -.It Fn ddi_ufm_op_readimg +.Ss Fn ddi_ufm_op_readimg The .Fn ddi_ufm_op_readimg is an optional entry point that allows the system to read a binary firmware payload from the device. The driver should read the firmware payload indicated by both -.Fa imgid +.Fa imgno and -.Fa slotid . +.Fa slotno . The driver should check to make sure that the region requested, starting at .Fa offset @@ -446,9 +475,9 @@ Common values are: .Bl -tag -width Er -offset width .It Er EINVAL The image or slot indicate by -.Fa imgid +.Fa imgno and -.Fa slotid +.Fa slotno is unknown. The combination of .Fa offset @@ -464,20 +493,24 @@ firmware image. The driver does not support reading a firmware payload on this device or from a particular image and slot. .El -.El .Ss Caching and Updates The system will fetch firmware and slot information on an as-needed basis. Once it obtains some information, it may end up caching this information on behalf of the driver. -Whenever the driver believes that something could have changed -- it need know -that it has -- then the driver must call +Whenever the driver believes that something could have changed then the driver +must call +.Xr ddi_ufm_update 9F . +The driver does not need to know for certain that something has changed. +For example, after a device reset or firmware upgrade, the driver doesn't need +to check if the firmware revision changed at all, it can simply call .Xr ddi_ufm_update 9F . .Ss Locking All UFM operations on a single UFM handle will always be run serially. However, the device driver may still need to apply adequate locking to -its structure members as other may be accessing the same data structure -or trying to communicate with the device. +its structure members as other entry points may be called on the device in +parallel, which could access the same data structures and try to communicate +with the device. .Ss Unregistering from the UFM subsystem When a device driver is detached, it should unregister from the UFM subsystem. diff --git a/usr/src/tools/smatch/Makefile b/usr/src/tools/smatch/Makefile index 4b2c909785..bb1cfee458 100644 --- a/usr/src/tools/smatch/Makefile +++ b/usr/src/tools/smatch/Makefile @@ -45,8 +45,8 @@ CFLAGS += -DSMATCHDATADIR='"$(SMATCHDATADIR)"' CFLAGS += -DGCC_BASE='"/no/such/dir"' CFLAGS += -DMULTIARCH_TRIPLET=NULL -LDCHECKS = -Wl,$(ZASSERTDEFLIB) -Wl,$(ZGUIDANCE) -Wl,$(ZFATALWARNINGS) -LDLIBS += -Wl,$(ZLAZYLOAD) -Wl,$(ZDIRECT) -lsqlite3 -lcrypto -lgcc -lm -lc +LDCHECKS = $(ZASSERTDEFLIB) $(ZGUIDANCE) $(ZFATALWARNINGS) +LDLIBS += $(ZLAZYLOAD) $(ZDIRECT) -lsqlite3 -lcrypto -lgcc -lm -lc LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%) # @@ -58,6 +58,9 @@ LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%) LDFLAGS += -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib LDFLAGS += -L$(NATIVE_ADJUNCT)/lib/$(MACH64) -R$(NATIVE_ADJUNCT)/lib/$(MACH64) +NATIVE_LIBS += libsqlite3.so libcrypto.so libm.so libc.so +LDFLAGS += $(NATIVE_LIBS:%=$(ZASSERTDEFLIB)=%) + CPPFLAGS += -nostdinc CPPFLAGS += -Isrc/ CPPFLAGS += -I$(NATIVE_ADJUNCT)/include diff --git a/usr/src/ucblib/libcurses/cr_put.c b/usr/src/ucblib/libcurses/cr_put.c index ba71354053..7eb6fcc59b 100644 --- a/usr/src/ucblib/libcurses/cr_put.c +++ b/usr/src/ucblib/libcurses/cr_put.c @@ -4,7 +4,7 @@ */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ /* * Copyright (c) 1980 Regents of the University of California. @@ -12,15 +12,6 @@ * specifies the terms and conditions for redistribution. */ -#pragma ident "%Z%%M% %I% %E% SMI" - -/*LINTLIBRARY*/ - -#ifndef lint -static char -sccsid[] = "@(#)cr_put.c 1.7 89/03/27 SMI"; /* from UCB 5.1 85/06/07 */ -#endif /* not lint */ - #include <string.h> #include "curses.ext" #include <term.h> @@ -51,14 +42,14 @@ int tabcol(int, int); static int outcol, outline, destcol, destline; -WINDOW *_win; +extern WINDOW *_win; int mvcur(int ly, int lx, int y, int x) { #ifdef DEBUG fprintf(outf, "MVCUR: moving cursor from (%d,%d) to (%d,%d)\n", - ly, lx, y, x); + ly, lx, y, x); #endif destcol = x; destline = y; diff --git a/usr/src/uts/i86pc/cpu/generic_cpu/gcpu_main.c b/usr/src/uts/i86pc/cpu/generic_cpu/gcpu_main.c index 04286b642c..b4ba720d63 100644 --- a/usr/src/uts/i86pc/cpu/generic_cpu/gcpu_main.c +++ b/usr/src/uts/i86pc/cpu/generic_cpu/gcpu_main.c @@ -150,7 +150,10 @@ gcpu_init_ident_ppin(cmi_hdl_t hdl) * failure of this part, as we will have gotten everything that we need. * It is possible that it locked open, for example. */ - (void) cmi_hdl_wrmsr(hdl, ppin_ctl_msr, MSR_PPIN_CTL_LOCKED); + if (cmi_hdl_wrmsr(hdl, ppin_ctl_msr, MSR_PPIN_CTL_DISABLED) == + CMI_SUCCESS) { + (void) cmi_hdl_wrmsr(hdl, ppin_ctl_msr, MSR_PPIN_CTL_LOCKED); + } return (kmem_asprintf("iv0-%s-%x-%llx", vendor, cmi_hdl_chipsig(hdl), value)); diff --git a/usr/src/uts/intel/sys/acpi/acapps.h b/usr/src/uts/intel/sys/acpi/acapps.h index dcaebd792c..580c9bcf75 100644 --- a/usr/src/uts/intel/sys/acpi/acapps.h +++ b/usr/src/uts/intel/sys/acpi/acapps.h @@ -189,7 +189,7 @@ Prefix #define ACPI_COMMON_BUILD_TIME \ - "Build date/time: %s %s\n", __DATE__, __TIME__ + "Build version: %s\n", ACPI_DATE /* Macros for usage messages */ diff --git a/usr/src/uts/intel/sys/x86_archext.h b/usr/src/uts/intel/sys/x86_archext.h index 2ec543677b..689ed9cc76 100644 --- a/usr/src/uts/intel/sys/x86_archext.h +++ b/usr/src/uts/intel/sys/x86_archext.h @@ -472,6 +472,7 @@ extern "C" { * These values are currently the same between Intel and AMD. */ #define MSR_PPIN_CTL_MASK 0x03 +#define MSR_PPIN_CTL_DISABLED 0x00 #define MSR_PPIN_CTL_LOCKED 0x01 #define MSR_PPIN_CTL_ENABLED 0x02 |