config-tools: refine MAX_MSIX_TABLE_NUM
If the MAX_MSIX_TABLE_NUM is specified in scenario.xml. Return the largest number from count of MSI, table_size of MSIX or MAX_MSIX_TABLE_NUM of scenario.xml. Tracked-On: #6235 Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
parent
8333ba2c7b
commit
1ca9061b6d
|
@ -6,7 +6,9 @@
|
|||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:acrn="http://projectacrn.org">
|
||||
<xsl:include href="lib.xsl" />
|
||||
<xsl:output method="text" />
|
||||
|
||||
<xsl:variable name="integer-suffix" select="'U'" />
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<xsl:stylesheet
|
||||
version="1.0"
|
||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:acrn="http://projectacrn.org">
|
||||
<xsl:include href="lib.xsl" />
|
||||
<xsl:output method="text" />
|
||||
|
||||
<xsl:variable name="integer-suffix" select="''" />
|
||||
|
|
|
@ -258,11 +258,20 @@
|
|||
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:call-template name="integer-by-key-value">
|
||||
<xsl:with-param name="key" select="'MAX_MSIX_TABLE_NUM'" />
|
||||
<xsl:with-param name="value" select="$max" />
|
||||
<xsl:with-param name="default" select="'64'" />
|
||||
</xsl:call-template>
|
||||
<xsl:choose>
|
||||
<xsl:when test="//CAPACITIES/MAX_MSIX_TABLE_NUM/text()">
|
||||
<xsl:call-template name="integer-by-key-value">
|
||||
<xsl:with-param name="key" select="'MAX_MSIX_TABLE_NUM'" />
|
||||
<xsl:with-param name="value" select="acrn:max($max, //CAPACITIES/MAX_MSIX_TABLE_NUM)" />
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="integer-by-key-value">
|
||||
<xsl:with-param name="key" select="'MAX_MSIX_TABLE_NUM'" />
|
||||
<xsl:with-param name="value" select="$max" />
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="hex-to-bin">
|
||||
|
|
|
@ -128,6 +128,19 @@
|
|||
</xsl:choose>
|
||||
</func:function>
|
||||
|
||||
<func:function name="acrn:max">
|
||||
<xsl:param name="a" />
|
||||
<xsl:param name="b" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$a > $b">
|
||||
<func:result select="$a" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<func:result select="$b" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</func:function>
|
||||
|
||||
<func:function name="acrn:find-list-min">
|
||||
<xsl:param name="list" />
|
||||
<xsl:param name="delimar" />
|
||||
|
|
Loading…
Reference in New Issue