summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-09-07 12:03:19 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-09-07 12:03:19 +0000
commitfce7145e2a75d0f563af602902e193473a789f7b (patch)
tree3253a94166c469439a422a5fbb2d5c45a4932c55
parent68e1a00f82c806423017b77422788d03d643269b (diff)
parentb075503f221374dd0495c40e8811d229cb9fdc74 (diff)
downloadillumos-joyent-fce7145e2a75d0f563af602902e193473a789f7b.tar.gz
[illumos-gate merge]
commit b075503f221374dd0495c40e8811d229cb9fdc74 9783 loader: linux.c: format '%x' expects argument of type 'unsigned int' commit 6d65bee7bcc62b2d9bdfde6610561ce76c92a908 9459 Implement topo module to enumerate dimms from smbios Conflicts: usr/src/lib/fm/topo/modules/common/smbios/smbios_enum.c usr/src/lib/fm/topo/libtopo/common/topo_hc.h
-rw-r--r--usr/src/boot/sys/boot/i386/libi386/linux.c2
-rw-r--r--usr/src/lib/fm/topo/maps/common/topology.dtd.140
-rw-r--r--usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml40
-rw-r--r--usr/src/lib/fm/topo/modules/common/smbios/smbios_enum.c18
4 files changed, 46 insertions, 54 deletions
diff --git a/usr/src/boot/sys/boot/i386/libi386/linux.c b/usr/src/boot/sys/boot/i386/libi386/linux.c
index 1f2788cb4e..4c9910cc16 100644
--- a/usr/src/boot/sys/boot/i386/libi386/linux.c
+++ b/usr/src/boot/sys/boot/i386/libi386/linux.c
@@ -195,7 +195,7 @@ linux_loadkernel(char *filename, uint64_t dest, struct preloaded_file **result)
error = EFBIG;
goto end;
}
- printf(" [Linux-%s, setup=0x%x, size=0x%x]\n",
+ printf(" [Linux-%s, setup=0x%lx, size=0x%lx]\n",
(linux_big ? "bzImage" : "zImage"), data, text);
/* copy real mode part to place */
diff --git a/usr/src/lib/fm/topo/maps/common/topology.dtd.1 b/usr/src/lib/fm/topo/maps/common/topology.dtd.1
index ba474a66b6..e9ddab3663 100644
--- a/usr/src/lib/fm/topo/maps/common/topology.dtd.1
+++ b/usr/src/lib/fm/topo/maps/common/topology.dtd.1
@@ -4,7 +4,7 @@
Use is subject to license terms.
Copyright (c) 2018, Joyent, Inc.
-
+
CDDL HEADER START
The contents of this file are subject to the terms of the
@@ -64,19 +64,19 @@
<!--
propval
- This element is for a singly valued property within a property group.
+ This element is for a singly valued property within a property group.
Its attributes are
name The name of this property.
type The data type for this property.
-
+
value The value for this property. Must match type
restriction of type attribute.
-
+
This is optional for array types
-
+
-->
<!ELEMENT propval (propitem*) >
@@ -91,14 +91,14 @@
<!--
propitem
- This element is an optional child element of propval and is used to
+ This element is an optional child element of propval and is used to
specify the values for array elements
Its attributes are
value The value for this property. Must match type
restriction of type attribute.
-
+
-->
<!ELEMENT propitem EMPTY >
@@ -174,14 +174,14 @@
<!--
argval
-
+
A propmethod argument. It has two attributes:
-
+
name The name of the argument.
type The data type of the argument.
value The value for this argument. Must match type
restriction of type attribute.
-
+
This attribute is optional for array types
-->
@@ -198,14 +198,14 @@
<!--
argitem
- This element is an optional child element of argval and is used to
+ This element is an optional child element of argval and is used to
specify the values for array elements
Its attributes are
value The value for this property. Must match type
restriction of type attribute.
-
+
-->
<!ELEMENT argitem EMPTY >
@@ -222,9 +222,9 @@
Its attributes are
- name Name of the method
- version Version of the method API
- propname Name of the property to create
+ name Name of the method
+ version Version of the method API
+ propname Name of the property to create
proptype Type of the property to create
mutable optional: default is false (0)
nonvolatile optional: default is false (0)
@@ -246,7 +246,7 @@
This element describes the enumeration method used to
populate a composition of topo nodes for a given range of topology
- nodes.
+ nodes.
Its attributes are
@@ -284,16 +284,16 @@
dependents
Ranges may have a number of "dependent" ranges, linked to
- the original range hierarchically as children or as a list, siblings.
+ the original range hierarchically as children or as a list, siblings.
Its attribute is:
grouping children | siblings
-->
-<!ELEMENT dependents
+<!ELEMENT dependents
(( range | xi:include )*, set*) >
-<!ATTLIST dependents
+<!ATTLIST dependents
grouping ( children | siblings ) #REQUIRED >
<!--
@@ -369,7 +369,7 @@
Its attributes are:
name topology name
- scheme ( hc | dev )
+ scheme (hc|dev)
-->
<!ELEMENT topology
diff --git a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
index 607f7e1eb1..38191168ac 100644
--- a/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
+++ b/usr/src/lib/fm/topo/maps/i86pc/i86pc-legacy-hc-topology.xml
@@ -2,7 +2,7 @@
<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
<!--
Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
-Copyright (c) 2018, Joyent, Inc.
+Copyright (c) 2018, Joyent, Inc. All rights reserved.
CDDL HEADER START
@@ -71,7 +71,7 @@ Copyright (c) 2018, Joyent, Inc.
</propgroup>
</set>
</node>
-
+
<dependents grouping='children'>
<range name='chip' min='0' max='100'>
<enum-method name='chip' version='1' />
@@ -87,27 +87,27 @@ Copyright (c) 2018, Joyent, Inc.
<enum-method name='ipmi' version='1' />
</range>
</dependents>
-
+
</range>
<range name='chassis' min='0' max='0'>
<propmap name='chassis' />
-
+
<dependents grouping='children'>
-
+
<set type='product'
setlist='Sun-Fire-X4100-Server|Sun-Fire-X4200-Server|Sun-Fire-X4100-M2|Sun-Fire-X4200-M2|Netra-X4200-M2|Sun-Fire-X4140|Sun-Fire-X4240|Sun-Fire-X4440'>
<range name='psu' min='0' max='100'>
- <enum-method name='ipmi' version='1' />
- <propmap name='psu' />
+ <enum-method name='ipmi' version='1' />
+ <propmap name='psu' />
</range>
<range name='fanmodule' min='0' max='100'>
- <propmap name='fan' />
+ <propmap name='fan' />
</range>
<set type='product' setlist='Sun-Fire-X4200-M2'>
- <range name='bay' min='0' max='3'>
+ <range name='bay' min='0' max='3'>
<propmap name='Sun-Fire-X4200-M2-disk' />
- </range>
+ </range>
</set>
<set type='product' setlist='Sun-Fire-X4200-Server'>
<range name='bay' min='0' max='3'>
@@ -128,23 +128,23 @@ Copyright (c) 2018, Joyent, Inc.
<set type='product' setlist='Sun-Fire-X4500|Sun-Fire-X4540|SUN-FIRE-X4150|SUN-FIRE-X4250|SUN-FIRE-X4450'>
<range name='psu' min='0' max='100'>
- <propmap name='psu' />
+ <propmap name='psu' />
</range>
<range name='fanmodule' min='0' max='100'>
- <propmap name='fan' />
+ <propmap name='fan' />
</range>
<set type='product' setlist='Sun-Fire-X4500'>
- <range name='bay' min='0' max='47'>
+ <range name='bay' min='0' max='47'>
<propmap name='Sun-Fire-X4500-disk' />
- </range>
+ </range>
</set>
<set type='product' setlist='Sun-Fire-X4540'>
- <range name='bay' min='0' max='47'>
+ <range name='bay' min='0' max='47'>
<propmap name='Sun-Fire-X4540-disk' />
- </range>
+ </range>
</set>
</set>
-
+
<set type='product' setlist='Sun-Fire-X4600|Sun-Fire-X4600-M2'>
<range name='psu' min='0' max='100'>
<enum-method name='ipmi' version='1' />
@@ -172,13 +172,13 @@ Copyright (c) 2018, Joyent, Inc.
<set type='product' setlist='default'>
<range name='psu' min='0' max='100'>
- <enum-method name='ipmi' version='1' />
+ <enum-method name='ipmi' version='1' />
</range>
<range name='fan' min='0' max='100'>
- <enum-method name='ipmi' version='1' />
+ <enum-method name='ipmi' version='1' />
</range>
<range name='bay' min='0' max='1024'>
- <enum-method name='ses' version='1' />
+ <enum-method name='ses' version='1' />
</range>
</set>
diff --git a/usr/src/lib/fm/topo/modules/common/smbios/smbios_enum.c b/usr/src/lib/fm/topo/modules/common/smbios/smbios_enum.c
index ac209e90c7..badd7b30a7 100644
--- a/usr/src/lib/fm/topo/modules/common/smbios/smbios_enum.c
+++ b/usr/src/lib/fm/topo/modules/common/smbios/smbios_enum.c
@@ -37,7 +37,7 @@ typedef struct smb_enum_data {
/*
* This function serves two purposes. It filters out memory devices that
* don't have a formfactor that represents a reasonably modern DIMM-like
- * device (and hence not a device we're insterested in enumerating). It also
+ * device (and hence not a device we're interested in enumerating). It also
* converts the numeric SMBIOS type representation to a more generic TOPO dimm
* type.
*
@@ -90,7 +90,7 @@ static boolean_t
is_valid_string(const char *str)
{
if (strcmp(str, SMB_DEFAULT1) != 0 && strcmp(str, SMB_DEFAULT2) != 0 &&
- strcmp(str, SMB_DEFAULT3) != 0 && strlen(str) > 0)
+ strlen(str) > 0)
return (B_TRUE);
return (B_FALSE);
@@ -121,9 +121,9 @@ smbios_make_slot(smb_enum_data_t *smed, smbios_memdevice_t *smb_md)
/* errno set */
return (NULL);
}
+ nvlist_free(auth);
if ((slotnode = topo_node_bind(mod, smed->sme_pnode, SLOT,
smed->sme_slot_inst, fmri)) == NULL) {
- nvlist_free(auth);
nvlist_free(fmri);
topo_mod_dprintf(mod, "topo_node_bind() failed: %s",
topo_mod_errmsg(mod));
@@ -133,10 +133,6 @@ smbios_make_slot(smb_enum_data_t *smed, smbios_memdevice_t *smb_md)
nvlist_free(fmri);
fmri = NULL;
- /* Create authority and system pgroups */
- topo_pgroup_hcset(slotnode, auth);
- nvlist_free(auth);
-
if (topo_node_label_set(slotnode, (char *)smb_md->smbmd_dloc, &err) !=
0) {
topo_mod_dprintf(mod, "failed to set label on %s=%d: %s",
@@ -230,11 +226,11 @@ smbios_make_dimm(smb_enum_data_t *smed, smbios_memdevice_t *smb_md)
/* errno set */
goto err;
}
+ nvlist_free(auth);
if (topo_node_range_create(mod, slotnode, DIMM, 0, 0) < 0 ||
(dimmnode = topo_node_bind(mod, slotnode, DIMM, 0, fmri)) ==
NULL) {
- nvlist_free(auth);
nvlist_free(fmri);
topo_mod_dprintf(mod, "failed to bind dimm node: %s",
topo_mod_errmsg(mod));
@@ -242,10 +238,6 @@ smbios_make_dimm(smb_enum_data_t *smed, smbios_memdevice_t *smb_md)
goto err;
}
- /* Create authority and system pgroups */
- topo_pgroup_hcset(dimmnode, auth);
- nvlist_free(auth);
-
if (topo_node_fru_set(dimmnode, fmri, NULL, &err) != 0) {
topo_mod_dprintf(mod, "failed to set FRU on %s: %s",
DIMM, topo_strerror(err));
@@ -535,7 +527,7 @@ err:
}
/*
- * A system with a functional memory controller driver will have one mc device
+ * A system with a functional memory controller driver will have one mc device
* node per chip instance, starting at instance 0. The driver provides an
* ioctl interface for retrieving a snapshot of the system's memory topology.
* If we're able to issue this ioctl on one of the mc device nodes then we'll