config-tools: refine the MAX_MSIX_TABLE_NUM in config.h
Find the maximum of counts MSI and table_size of MSI-X based on board.xml. Tracked-On: #6235 Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
parent
987216fef0
commit
73547471c7
|
@ -15,6 +15,7 @@
|
|||
<xsl:with-param name="key" select="'BOARD'" />
|
||||
<xsl:with-param name="value" select="@board" />
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="msi-msix-max" />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="//config-data/acrn-config">
|
||||
|
@ -173,11 +174,6 @@
|
|||
<xsl:with-param name="key" select="'MAX_PT_IRQ_ENTRIES'" />
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="integer-by-key">
|
||||
<xsl:with-param name="key" select="'MAX_MSIX_TABLE_NUM'" />
|
||||
<xsl:with-param name="default" select="normalize-space(/acrn-offline-data/board-data/acrn-config/MAX_MSIX_TABLE_NUM)" />
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="integer-by-key-value">
|
||||
<xsl:with-param name="key" select="'MAX_EMULATED_MMIO_REGIONS'" />
|
||||
<xsl:with-param name="value" select="MAX_EMULATED_MMIO" />
|
||||
|
@ -255,6 +251,20 @@
|
|||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="msi-msix-max">
|
||||
<xsl:variable name="max">
|
||||
<xsl:for-each select="//capability[@id='MSI' or @id='MSI-X']/*[starts-with(local-name(), 'count') or starts-with(local-name(), 'table_size')]">
|
||||
<xsl:sort select="." data-type="number" order="descending"/>
|
||||
<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:template>
|
||||
|
||||
<xsl:template name="hex-to-bin">
|
||||
<xsl:param name="s" />
|
||||
<xsl:param name="width" />
|
||||
|
|
Loading…
Reference in New Issue