summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-02-09 14:37:18 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-02-10 10:55:03 -0500
commit298daeba406ef3c72b340f59552c618db7c3ff93 (patch)
tree64185a888be41a3662c0594b90061ae412a8f70b /src
parent574d48425f25f2d5c85fbe4c188bc9a195db3a41 (diff)
downloadtalos-hostboot-298daeba406ef3c72b340f59552c618db7c3ff93.tar.gz
talos-hostboot-298daeba406ef3c72b340f59552c618db7c3ff93.zip
Remove enumeration types from FAPI attributes
Enumerated attributes inside of TARGETING are always 4 bytes long. FAPI attributes can be of arbitrary length, even if enumerations are specified. This means that we have a size mismatch if we use an enumerated attribute as the direct map to a fapi attribute. Instead, we should always use the same basic type that matches the FAPI attribute, but still declare the enumeration so it can be used for MRW settings. Added an explicit failure in xmltohb.pl that will prevent us from making this mistake again. Change-Id: Iab855e0e93d2d56922175a1d6cb165eed4d665fa Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36240 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/usr/targeting/common/genHwsvMrwXml.pl23
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml164
-rw-r--r--src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml4
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/target_types.xml2
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/xmltohb.pl11
5 files changed, 91 insertions, 113 deletions
diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl
index e782b3fe2..e4b029a86 100755
--- a/src/usr/targeting/common/genHwsvMrwXml.pl
+++ b/src/usr/targeting/common/genHwsvMrwXml.pl
@@ -258,7 +258,10 @@ push @systemAttr,
"FREQ_X_MHZ", $reqPol->{'proc_x_frequency'}->{content},
"PROC_EPS_TABLE_TYPE", $reqPol->{'proc_eps_table_type'},
"PROC_FABRIC_PUMP_MODE", $reqPol->{'proc_fabric_pump_mode'},
- "PROC_X_BUS_WIDTH", $reqPol->{'proc_x_bus_width'},
+ "PROC_FABRIC_X_BUS_WIDTH", $reqPol->{'proc_fabric_x_bus_width'},
+ "PROC_FABRIC_A_BUS_WIDTH", $reqPol->{'proc_fabric_a_bus_width'},
+ "PROC_FABRIC_SMP_OPTICS_MODE", $reqPol->{'proc_fabric_smp_optics_mode'},
+ "PROC_FABRIC_CAPI_MODE", $reqPol->{'proc_fabric_capi_mode'},
"X_EREPAIR_THRESHOLD_FIELD", $reqPol->{'x-erepair-threshold-field'},
"A_EREPAIR_THRESHOLD_FIELD", $reqPol->{'a-erepair-threshold-field'},
"DMI_EREPAIR_THRESHOLD_FIELD", $reqPol->{'dmi-erepair-threshold-field'},
@@ -3076,24 +3079,6 @@ sub generate_sys
";
}
- # Tuletas can now support multiple nest frequencies
- if ($sysname =~ /tuleta/)
- {
- print "
- <attribute><id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id>
- <default>2000_MHZ_OR_2400_MHZ</default>
- </attribute>
-";
- }
- else
- {
- print "
- <attribute><id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id>
- <default>UNSUPPORTED_FREQ</default>
- </attribute>
-";
- }
-
#adding XSCOM_BASE_ADDRESS to the system target for HDAT
print "
<attribute><id>XSCOM_BASE_ADDRESS</id>
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 203066fc3..34a48ebd1 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -2388,38 +2388,6 @@
</hwpfToHbAttrMap>
</attribute>
-<enumerationType>
- <id>PROC_X_BUS_WIDTH</id>
- <description>Enumeration indicating the PROC_X_BUS_WIDTH</description>
- <enumerator>
- <name>W4BYTE</name>
- <value>1</value>
- </enumerator>
- <enumerator>
- <name>W8BYTE</name>
- <value>2</value>
- </enumerator>
-</enumerationType>
-
-<attribute>
- <id>PROC_X_BUS_WIDTH</id>
- <description>
- System attribute.
- Processor SMP X bus width.
- Provided by the Machine Readable Workbook.
- </description>
- <simpleType>
- <uint8_t></uint8_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <hasStringConversion/>
- <readable/>
- <hwpfToHbAttrMap>
- <id>ATTR_PROC_X_BUS_WIDTH</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
<attribute>
<id>ALL_MCS_IN_INTERLEAVING_GROUP</id>
<description>
@@ -16393,10 +16361,9 @@ Measured in GB</description>
0x03 = PD_AND_STR
</description>
<simpleType>
- <enumeration>
- <id>MSS_MRW_POWER_CONTROL_REQUESTED</id>
+ <uint8_t>
<default>OFF</default>
- </enumeration>
+ </uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
@@ -16444,10 +16411,9 @@ Measured in GB</description>
0x03 = PD_AND_STR
</description>
<simpleType>
- <enumeration>
- <id>MSS_MRW_IDLE_POWER_CONTROL_REQUESTED</id>
+ <uint8_t>
<default>OFF</default>
- </enumeration>
+ </uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
@@ -17494,41 +17460,6 @@ Measured in GB</description>
</hwpfToHbAttrMap>
</attribute>
-<enumerationType>
- <id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id>
- <description>Enumeration of MRW_NEST_CAPABLE_FREQUENCIES_SYS</description>
- <enumerator>
- <name>UNSUPPORTED_FREQ</name>
- <value>0</value>
- </enumerator>
- <enumerator>
- <name>2000_MHZ</name>
- <value>1</value>
- </enumerator>
- <enumerator>
- <name>2400_MHZ</name>
- <value>2</value>
- </enumerator>
- <enumerator>
- <name>2000_MHZ_OR_2400_MHZ</name>
- <value>3</value>
- </enumerator>
-</enumerationType>
-
-<attribute>
- <id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id>
- <description>The NEST frequencies that the system can support. This is a bit-wise value that represents which of the possible nest frequencies are supported. : 2.0GHz, 2.4GHz, or both. New frequencies should be added in ascending order.
- </description>
- <simpleType>
- <enumeration>
- <id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id>
- <default>UNSUPPORTED_FREQ</default>
- </enumeration>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
-</attribute>
-
<attribute>
<id>WOF_ENABLED</id>
<description>
@@ -19755,9 +19686,9 @@ Measured in GB</description>
Platform default: FALSE
</description>
<simpleType>
- <enumeration>
- <id>SYSTEM_WOF_ENABLED</id>
- </enumeration>
+ <uint8_t>
+ <default>OFF</default>
+ </uint8_t>
</simpleType>
<hwpfToHbAttrMap>
<id>ATTR_SYSTEM_WOF_ENABLED</id>
@@ -21226,6 +21157,22 @@ Measured in GB</description>
</hwpfToHbAttrMap>
</attribute>
+<enumerationType>
+ <id>PROC_FABRIC_A_BUS_WIDTH</id>
+ <description>
+ Enumeration indicating the PROC_FABRIC_A_BUS_WIDTH
+ </description>
+ <!-- Note: Values must match numbers from nest_attributes.xml -->
+ <enumerator>
+ <name>2_BYTE</name>
+ <value>1</value>
+ </enumerator>
+ <enumerator>
+ <name>4_BYTE</name>
+ <value>2</value>
+ </enumerator>
+</enumerationType>
+
<attribute>
<id>PROC_FABRIC_A_BUS_WIDTH</id>
<!-- <targetType>TARGET_TYPE_SYSTEM</targetType> -->
@@ -21234,7 +21181,7 @@ Measured in GB</description>
Provided by the MRW.
2_BYTE = 0x01, 4_BYTE = 0x02
</description>
- <simpleType><uint8_t></uint8_t></simpleType>
+ <simpleType><uint8_t><default>4_BYTE</default></uint8_t></simpleType>
<persistency>non-volatile</persistency>
<readable/>
<hwpfToHbAttrMap>
@@ -21248,6 +21195,7 @@ Measured in GB</description>
<description>
Enumeration indicating the PROC_FABRIC_X_BUS_WIDTH
</description>
+ <!-- Note: Values must match numbers from nest_attributes.xml -->
<enumerator>
<name>2_BYTE</name>
<value>1</value>
@@ -21267,10 +21215,7 @@ Measured in GB</description>
2_BYTE = 0x01, 4_BYTE = 0x02
</description>
<simpleType>
- <enumeration>
- <id>PROC_FABRIC_X_BUS_WIDTH</id>
- <default>4_BYTE</default>
- </enumeration>
+ <uint8_t><default>4_BYTE</default></uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
<readable/>
@@ -21324,6 +21269,22 @@ Measured in GB</description>
</hwpfToHbAttrMap>
</attribute>
+<enumerationType>
+ <id>PROC_FABRIC_SMP_OPTICS_MODE</id>
+ <description>
+ Enumeration indicating the PROC_FABRIC_SMP_OPTICS_MODE
+ </description>
+ <!-- Note: Values must match numbers from nest_attributes.xml -->
+ <enumerator>
+ <name>OPTICS_IS_X_BUS</name>
+ <value>0x0</value>
+ </enumerator>
+ <enumerator>
+ <name>OPTICS_IS_A_BUS</name>
+ <value>0x1</value>
+ </enumerator>
+</enumerationType>
+
<attribute>
<id>PROC_FABRIC_SMP_OPTICS_MODE</id>
<!-- <targetType>TARGET_TYPE_SYSTEM</targetType> -->
@@ -21336,7 +21297,7 @@ Measured in GB</description>
</description>
<simpleType>
<uint8_t>
- <default>0</default>
+ <default>OPTICS_IS_X_BUS</default>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
@@ -21347,6 +21308,22 @@ Measured in GB</description>
</hwpfToHbAttrMap>
</attribute>
+<enumerationType>
+ <id>PROC_FABRIC_CAPI_MODE</id>
+ <description>
+ Enumeration indicating the PROC_FABRIC_CAPI_MODE
+ </description>
+ <!-- Note: Values must match numbers from nest_attributes.xml -->
+ <enumerator>
+ <name>OFF</name>
+ <value>0x0</value>
+ </enumerator>
+ <enumerator>
+ <name>ON</name>
+ <value>0x1</value>
+ </enumerator>
+</enumerationType>
+
<attribute>
<id>PROC_FABRIC_CAPI_MODE</id>
<!-- <targetType>TARGET_TYPE_SYSTEM</targetType> -->
@@ -21358,7 +21335,7 @@ Measured in GB</description>
</description>
<simpleType>
<uint8_t>
- <default>0</default>
+ <default>OFF</default>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
@@ -21369,6 +21346,19 @@ Measured in GB</description>
</hwpfToHbAttrMap>
</attribute>
+
+<enumerationType>
+ <id>PROC_FABRIC_ADDR_BAR_MODE</id>
+ <description>
+ Enumeration indicating the PROC_FABRIC_ADDR_BAR_MODE
+ </description>
+ <!-- Note: Values must match numbers from nest_attributes.xml -->
+ <enumerator>
+ <name>LARGE_SYSTEM</name>
+ <value>0x0</value>
+ </enumerator>
+</enumerationType>
+
<attribute>
<id>PROC_FABRIC_ADDR_BAR_MODE</id>
<!-- <targetType>TARGET_TYPE_SYSTEM</targetType> -->
@@ -21379,7 +21369,7 @@ Measured in GB</description>
</description>
<simpleType>
<uint8_t>
- <default>0</default>
+ <default>LARGE_SYSTEM</default>
</uint8_t>
</simpleType>
<persistency>non-volatile</persistency>
@@ -29830,11 +29820,7 @@ Measured in GB</description>
reaction
p9_hcd_cache procedures to power on VDMs before CME booting
</description>
- <simpleType>
- <enumeration>
- <id>VDM_ENABLE</id>
- </enumeration>
- </simpleType>
+ <simpleType><uint8_t></uint8_t></simpleType>
<readable/>
<persistency>non-volatile</persistency>
<hwpfToHbAttrMap>
diff --git a/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml b/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml
index d352908e2..e2dac7acd 100644
--- a/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml
+++ b/src/usr/targeting/common/xmltohb/simics_NIMBUS.system.xml
@@ -155,6 +155,10 @@
<id>SYSTEM_RESCLK_STEP_DELAY</id>
<default>0x32</default>
</attribute>
+ <attribute>
+ <id>PROC_FABRIC_X_BUS_WIDTH</id>
+ <default>4_BYTE</default>
+ </attribute>
</targetInstance>
<!-- System node 0 -->
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index fc035d8ae..4596a7465 100755
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -602,7 +602,6 @@
<attribute><id>ISTEP_PAUSE_CONFIG</id></attribute>
<attribute><id>FRU_ID</id></attribute>
<attribute><id>BMC_FRU_ID</id></attribute>
- <attribute><id>MRW_NEST_CAPABLE_FREQUENCIES_SYS</id></attribute>
<attribute><id>PROC_REFCLOCK_RCVR_TERM</id></attribute>
<attribute><id>PCI_REFCLOCK_RCVR_TERM</id></attribute>
<attribute><id>MIN_FREQ_MHZ</id></attribute>
@@ -621,7 +620,6 @@
<attribute><id>MSS_MBA_CACHELINE_INTERLEAVE_MODE</id></attribute>
<attribute><id>PROC_EPS_TABLE_TYPE</id></attribute>
<attribute><id>PROC_FABRIC_PUMP_MODE</id></attribute>
- <attribute><id>PROC_X_BUS_WIDTH</id></attribute>
<attribute><id>X_EREPAIR_THRESHOLD_FIELD</id></attribute>
<attribute><id>A_EREPAIR_THRESHOLD_FIELD</id></attribute>
<attribute><id>DMI_EREPAIR_THRESHOLD_FIELD</id></attribute>
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl
index 34f03b36a..18de6c34e 100755
--- a/src/usr/targeting/common/xmltohb/xmltohb.pl
+++ b/src/usr/targeting/common/xmltohb/xmltohb.pl
@@ -877,7 +877,12 @@ sub writeFapi2PlatAttrMacrosHeaderFileContent {
$fapiWriteable = 1;
}
- if(!exists $attribute->{simpleType}->{enumeration})
+ if(exists $attribute->{simpleType}->{enumeration})
+ {
+ die "Do not use enumerations for FAPI types! ".
+ $attribute->{id}."\n";
+ }
+ else
{
$typeSection .= " static_assert(sizeof(TARGETING::ATTR_". $attribute->{id}."_type) ==
sizeof(fapi2::". $fapiAttr->{id}."_Type), \"Size of attribute ATTR_". $attribute->{id}."_type is not equal to the size of ".
@@ -4349,8 +4354,8 @@ sub enumNameToValue {
print STDOUT $enumeration;
- fatal("dc99> Could not convert enumerator name \"$enumeratorName\"into "
- . "enumerator value in \"$enumerationName\". enum="); #dc99
+ fatal("Could not convert enumerator name \"$enumeratorName\"into "
+ . "enumerator value in \"$enumerationName\". enum=");
}
if($enumeratorValue < 0)
OpenPOWER on IntegriCloud