summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2021-06-21 13:44:28 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-06-23 22:05:39 +0000
commitada023d26fbb04273c643d7c7fade1b24da764fb (patch)
tree052f64e0e72a3cc7e72bd4389a56793a09183216
parentfa9eb22261c7b7a35c7a6957acb3c2b26c39e15b (diff)
downloadillumos-joyent-ada023d26fbb04273c643d7c7fade1b24da764fb.tar.gz
13891 ucodeadm cannot handle latest Intel microcode
Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/ucodeadm/Makefile7
-rw-r--r--usr/src/cmd/ucodeadm/ucodeadm.c2
-rw-r--r--usr/src/common/ucode/ucode_utils.c5
-rw-r--r--usr/src/uts/common/sys/ucode.h6
4 files changed, 9 insertions, 11 deletions
diff --git a/usr/src/cmd/ucodeadm/Makefile b/usr/src/cmd/ucodeadm/Makefile
index 70b6269bc5..352aefadfb 100644
--- a/usr/src/cmd/ucodeadm/Makefile
+++ b/usr/src/cmd/ucodeadm/Makefile
@@ -23,6 +23,7 @@
# Use is subject to license terms.
#
# Copyright 2017 RackTop Systems.
+# Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
#
PROG = ucodeadm
@@ -35,6 +36,7 @@ ERROR_HEADER = $(COMMON_SRCDIR)/ucode_errno.h
SRCS = $(PROG_OBJS:%.o=%.c) $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c)
include ../Makefile.cmd
+include ../Makefile.ctf
POFILE = ucodeadm_all.po
POFILES = $(PROG_OBJS:%.o=%.po)
@@ -43,8 +45,6 @@ CPPFLAGS = -I../../common -I../../uts/common
CFLAGS += $(CCVERBOSE)
CERRWARN += $(CNOWARN_UNINIT)
CERRWARN += -_gcc=-Wno-type-limits
-LINTFLAGS += -errtags -erroff=E_NAME_DEF_NOT_USED2
-LINTFLAGS += -erroff=E_INCONS_ARG_DECL2,E_INCONS_VAL_TYPE_DECL2
LDLIBS += -lgen
DIRMODE = 0755
@@ -74,9 +74,6 @@ $(PROG): $(OBJS) ucode_errno.c
clean:
-$(RM) $(CLEANFILES)
-lint: lint_SRCS
-
-
include ../Makefile.targ
ucode_errno.c: $(COMMON_SRCDIR)/mkerrno.sh $(ERROR_HEADER)
diff --git a/usr/src/cmd/ucodeadm/ucodeadm.c b/usr/src/cmd/ucodeadm/ucodeadm.c
index 67a7bae882..18d0162b82 100644
--- a/usr/src/cmd/ucodeadm/ucodeadm.c
+++ b/usr/src/cmd/ucodeadm/ucodeadm.c
@@ -25,6 +25,7 @@
/*
* Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
#include <sys/types.h>
@@ -239,7 +240,6 @@ ucode_should_update_intel(char *filename, uint32_t new_rev)
static ucode_errno_t
ucode_gen_files_amd(uint8_t *buf, int size, char *path)
{
- /* LINTED: pointer alignment */
uint32_t *ptr = (uint32_t *)buf;
char common_path[PATH_MAX];
int fd, count, counter;
diff --git a/usr/src/common/ucode/ucode_utils.c b/usr/src/common/ucode/ucode_utils.c
index 7721c5c310..ec3efa63ee 100644
--- a/usr/src/common/ucode/ucode_utils.c
+++ b/usr/src/common/ucode/ucode_utils.c
@@ -22,6 +22,8 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
#include <sys/types.h>
@@ -117,7 +119,6 @@ ucode_checksum_intel(uint32_t sum, uint32_t size, uint8_t *code)
ucode_errno_t
ucode_validate_amd(uint8_t *ucodep, int size)
{
- /* LINTED: pointer alignment */
uint32_t *ptr = (uint32_t *)ucodep;
uint32_t count;
@@ -138,7 +139,6 @@ ucode_validate_amd(uint8_t *ucodep, int size)
if (((count = *ptr++) > size) || (count % 16))
return (EM_FILEFORMAT);
- /* LINTED: pointer alignment */
ptr = (uint32_t *)(((uint8_t *)ptr) + count);
size -= count;
@@ -152,7 +152,6 @@ ucode_validate_amd(uint8_t *ucodep, int size)
if (((count = *ptr++) > size))
return (EM_FILEFORMAT);
- /* LINTED: pointer alignment */
ptr = (uint32_t *)(((uint8_t *)ptr) + count);
size -= count;
}
diff --git a/usr/src/uts/common/sys/ucode.h b/usr/src/uts/common/sys/ucode.h
index 8bbace2b99..0e1b60cc53 100644
--- a/usr/src/uts/common/sys/ucode.h
+++ b/usr/src/uts/common/sys/ucode.h
@@ -21,6 +21,8 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
*/
#ifndef _SYS_UCODE_H
@@ -197,7 +199,7 @@ typedef union ucode_file {
#define UCODE_DEFAULT_BODY_SIZE (UCODE_KB(2) - UCODE_HEADER_SIZE_INTEL)
/*
- * For a single microcode file, the minimum size is 1K, maximum size is 128K.
+ * For a single microcode file, the minimum size is 1K, maximum size is 280K.
* Such limitations, while somewhat artificial, are not only to provide better
* sanity checks, but also avoid wasting precious memory at startup time as the
* microcode buffer for the first processor has to be statically allocated.
@@ -206,7 +208,7 @@ typedef union ucode_file {
* is 16M.
*/
#define UCODE_MIN_SIZE UCODE_KB(1)
-#define UCODE_MAX_SIZE UCODE_KB(128)
+#define UCODE_MAX_SIZE UCODE_KB(280)
#define UCODE_MAX_COMBINED_SIZE UCODE_MB(16)
#define UCODE_SIZE_CONVERT(size, default_size) \