From 16d53a891df2f19b4dc37110081555be4e474d8c Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Mon, 25 May 2020 15:49:16 +0300 Subject: 13413 svc.startd: 'contract_list_pool' is multiply-defined Reviewed by: Igor Kozhukhov Reviewed by: Andrew Stormont Reviewed by: C Fraire Approved by: Dan McDonald --- usr/src/cmd/svc/startd/restarter.c | 1 + usr/src/cmd/svc/startd/startd.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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 d230ed1490..a952144c93 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; @@ -564,7 +564,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); -- cgit v1.2.3 From aa35d5f200c519c3e5425cb26762e2d01ce2e66f Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Mon, 13 Apr 2020 13:38:21 +0300 Subject: 13416 libprtdiag_psr: variable 'ap_args' set but not used Reviewed by: Andrew Stormont Reviewed by: Peter Tribble Approved by: Dan McDonald --- usr/src/lib/libprtdiag_psr/sparc/serengeti/common/serengeti.c | 2 -- 1 file changed, 2 deletions(-) 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); -- cgit v1.2.3 From 3561e562ae78c234d96711f36e19360789b0ffe3 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Thu, 31 Dec 2020 11:40:58 -0800 Subject: 13410 ddi_ufm(9E) typos and such Reviewed by: Peter Tribble Reviewed by: Ryan Zezeski Approved by: Dan McDonald --- usr/src/man/man9e/ddi_ufm.9e | 159 ++++++++++++++++++++++++++----------------- 1 file changed, 96 insertions(+), 63 deletions(-) diff --git a/usr/src/man/man9e/ddi_ufm.9e b/usr/src/man/man9e/ddi_ufm.9e index 2f75821c37..5d9d869a78 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 @@ -42,23 +42,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" @@ -77,13 +77,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. @@ -92,7 +90,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. @@ -104,35 +102,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. @@ -142,13 +147,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 @@ -180,14 +186,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 @@ -197,23 +203,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 @@ -236,16 +247,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 @@ -257,10 +268,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. @@ -275,7 +290,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 @@ -284,21 +299,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 @@ -323,21 +338,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 @@ -364,9 +387,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 @@ -375,11 +398,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 @@ -387,8 +413,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 @@ -414,15 +443,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 @@ -445,9 +474,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 @@ -463,20 +492,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. -- cgit v1.2.3 From bac90afdc3c952be2a041bb1b669ac56cef7d145 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Mon, 11 Jan 2021 16:04:05 +0000 Subject: 13444 libbe_py should provide nextboot information Reviewed by: C Fraire Reviewed by: Dominik Hassler Reviewed by: Toomas Soome Approved by: Gordon Ross --- usr/src/lib/pylibbe/common/libbe_py.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 @@ -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); -- cgit v1.2.3 From 2cbc828d66d6088914f685ae0e77169ecc9fc7f9 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Mon, 11 Jan 2021 15:29:35 +0000 Subject: 13443 gate build missing some NATIVE_LIBS Reviewed by: Toomas Soome Reviewed by: Andrew Stormont Reviewed by: Rich Lowe Approved by: Gordon Ross --- usr/src/cmd/bhyve/Makefile | 1 + usr/src/tools/smatch/Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/usr/src/cmd/bhyve/Makefile b/usr/src/cmd/bhyve/Makefile index 7126fdda17..599494871c 100644 --- a/usr/src/cmd/bhyve/Makefile +++ b/usr/src/cmd/bhyve/Makefile @@ -136,6 +136,7 @@ CSTD= $(CSTD_GNU99) C99MODE= -xc99=%all $(PROG) := LDLIBS += -lsocket -lnsl -ldlpi -ldladm -lmd -luuid -lvmmapi -lz +NATIVE_LIBS += libz.so $(MEVENT_TEST_PROG) := LDLIBS += -lsocket .KEEP_STATE: diff --git a/usr/src/tools/smatch/Makefile b/usr/src/tools/smatch/Makefile index db1bd68b8f..ef67695404 100644 --- a/usr/src/tools/smatch/Makefile +++ b/usr/src/tools/smatch/Makefile @@ -45,11 +45,14 @@ 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%) LDFLAGS += -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib +NATIVE_LIBS += libsqlite3.so libcrypto.so libm.so libc.so +LDFLAGS += $(NATIVE_LIBS:%=$(ZASSERTDEFLIB)=%) + CPPFLAGS += -nostdinc CPPFLAGS += -Isrc/ CPPFLAGS += -I$(NATIVE_ADJUNCT)/include -- cgit v1.2.3 From 71f73b0075fdda332f0e079884f3aa28497b0806 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 26 May 2020 10:28:19 +0300 Subject: 13414 libcurses: symbol '_win' is multiply-defined Reviewed by: Rich Lowe Approved by: Dan McDonald --- usr/src/ucblib/libcurses/cr_put.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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 #include "curses.ext" #include @@ -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; -- cgit v1.2.3 From 338c2f033035af5b17f61d9df825917015c95a35 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Mon, 13 Apr 2020 18:42:22 +0300 Subject: 13415 psvcpolicy: variable 'curr_state' set but not used Reviewed by: Andrew Stormont Reviewed by: Gergő Mihály Doma Approved by: Gordon Ross MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/psvcpolicy.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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, -- cgit v1.2.3 From ae9405842e25ee75c6a9fd1996e04b41fbd2eda3 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Tue, 12 May 2020 09:05:18 +0300 Subject: 13420 libld: symbol 'dynsort_compare_syms' is multiply-defined Reviewed by: Robert Mustacchi Reviewed by: Andrew Stormont Approved by: Gordon Ross --- usr/src/cmd/sgs/libld/common/update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3 From abe1d126b4a1229ee2861d65508e7a52bd8c2721 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Tue, 5 Jan 2021 17:29:32 -0800 Subject: 13440 ppin disablement path missing state transition Reviewed by: Richard Lowe Reviewed by: Dan McDonald Reviewed by: Patrick Mooney Approved by: Gordon Ross --- usr/src/uts/i86pc/cpu/generic_cpu/gcpu_main.c | 5 ++++- usr/src/uts/intel/sys/x86_archext.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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/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 -- cgit v1.2.3 From 20a2a10f2c0bcd395700659efe34b54ab4404444 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Sun, 6 Dec 2020 12:56:22 -0800 Subject: 10447 ACPI binaries should be reproducible Reviewed by: Andy Fiddaman Reviewed by: Paul Winder Approved by: Dan McDonald --- usr/src/cmd/acpi/acpidump/Makefile | 1 + usr/src/cmd/acpi/acpixtract/Makefile | 1 + usr/src/cmd/acpi/iasl/Makefile | 1 + usr/src/cmd/acpi/iasl/aslutils.c | 2 +- usr/src/uts/intel/sys/acpi/acapps.h | 2 +- 5 files changed, 5 insertions(+), 2 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/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 */ -- cgit v1.2.3 From f73e1ebf60792a8bdb2d559097c3131b68c09318 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Sun, 6 Dec 2020 14:18:15 -0800 Subject: 13352 disable mdns date and time in version string Reviewed by: Sebastian Wiedenroth Reviewed by: Andy Fiddaman Reviewed by: Paul Winder Approved by: Dan McDonald --- usr/src/cmd/cmd-inet/usr.bin/dns-sd/Makefile | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3