Commit Graph

437 Commits

Author SHA1 Message Date
Yang,Yu-chu fb4f8e4e56 config-tools: fix "is_tpm_passthru" always return "False"
"is_tpm_passthru" would always return "False" with the existing logic.

1. Replace "get_leaf_tag_map_bool" with "get_leaf_tag_map". Instead returning a dictrionary with boolean diction values, just get the string value.
2. Return "True" if any vm has enabled the passtrhough tpm with option "y".

Tracked-On: #5710
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-03-12 16:14:46 +08:00
Yang,Yu-chu 6880ca51e4 config-tools: replace "PTDEV_HI_MMIO_START" with "HI_MMIO_START"
"PTDEV_HI_MMIO_START" is removed by the commit
8d9f12f3b7.

Replace "PTDEV_HI_MMIO_START" with "HI_MMIO_START".

Tracked-On: #5693
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-03-12 09:49:07 +08:00
Shuang Zheng 23a8c3b802 config_tools: disable AC
disable AC from scenario config to avoid WaaG boot hang stability
issue.

Tracked-On: #5818

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-03-11 09:45:36 +08:00
Shuang Zheng 84c3e76b83 config_tools: update sbl version of ehl-crb-b.xml
update sbl version of ehl-crb-b.xml.

Tracked-On: #5778

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-03-10 09:37:12 +08:00
Yang,Yu-chu c843d2bbc5 config-tools: Add "ENFORCE_TURNOFF_AC" capability to xml
Add the capability to disable or enable #AC for Split-locked Access
through <scenario>.xmls. This was implemented through Kconfig. Move this
configuration from Kconfig to xmls.

Tracked-On: #5798
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-03-05 11:54:37 +08:00
Shuang Zheng e3a8b09e62 config_tools: add psram config in launch config
add "--psram" in acrn dm arguments in launch scripts
when PSRAM_ENABLED=y and the VM is post-launched RTVM.

Tracked-On: #5649

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2021-03-03 16:15:52 +08:00
Yang,Yu-chu d4bf922bda config-tools: remove "vuart" poweroff channel from default xml
Remove the the vuart1(tty) and vuart1(pty) poweroff channel from default
non-windows uos launch script xmls.

Tracked-On: #5736
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-02-26 16:54:23 +08:00
Shuang Zheng 87013b70df config_tools: add sanity check for PSRAM and RDT
RDT_ENABLED and PSRAM_ENABLED should not by y simultaneously.

Tracked-On: #5649

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-26 16:48:18 +08:00
Yang,Yu-chu 50f135343a config-tools: ivshmem support to be shared by multiple vms
Loosen the restriction of IVSHMEM_REGION of xsd validation. An ivshmem
region can be shared by more than two vms.

Tracked-On: #5672
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-02-25 13:22:46 +08:00
Geoffroy Van Cutsem 03466c22f3 acrn-config: remove obsolete kernel parameters from APL configurations
Remove obsolete kernel (i915) parameters from the Apollo Lake (APL)
board configurations.

Tracked-On: #5236
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-02-25 13:22:25 +08:00
Yonghua Huang a747e04dab config-tool: refine software SRAM config of pre-RTVM
- Define 'PRE_RTVM_SW_SRAM_ENABLED' only if both
     prelaunch RTVM and Software SRAM are configured in
     current scenario.

   - Define 'PRE_RTVM_SW_SRAM_BASE_GPA' and
     'PRE_RTVM_SW_SRAM_END_GPA' only if
     'PRE_RTVM_SW_SRAM_ENABLED' is defined.

Tracked-On: #5649
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2021-02-25 09:35:31 +08:00
Shuang Zheng e14387bebf config_tools: update fusa_partition scenario
update fusa_partition scenario following requirements.

Tracked-On: #5665

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-24 14:28:23 +08:00
li shuang 7dd3c4eb3e config_tools: add PTCT configs
add PTCT table template on ehl-crb-b, update PTCT table template
on tgl-rvp, add SofwareSRAM in ehl-crb-b.xml

Tracked-On: #5649

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-24 09:27:42 +08:00
David B. Kinder ea9c713f28 doc: fix misspellings in config option doc
Some terms in the config option docs (Integer, Boolean) are being
flagged by one of our spell checking tools.  Let's make it happy.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-15 12:14:32 -08:00
David B. Kinder 85f4d79883 doc: test for simple xsd edit
CI test for simple xsd edit

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-09 08:07:10 -08:00
Shuang Zheng 50463d1b3f config_tools: change generic folder to generic_board folder in config
app

change generic folder to generic_board folder in config app according
to the reorg data folders and update the method to save xmls.

Tracked-On: #5723

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-09 13:26:51 +08:00
Shuang Zheng 300be9df8c config_tools: update zephyr entry point address on ehl-crb-b
update entry point address for pre-launched zephyr on ehl-crb-b;
update serial console to /dev/ttyS3 on ehl-crb-b.

Tracked-On: #5689

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-09 09:00:46 +08:00
Shuang Zheng e1f7824004 config_tools: update condition for bootargs error check
add bootargs error check only when kernel type is KERNEL_BZIMAGE.

Tracked-On: #5689

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-09 09:00:46 +08:00
Shuang Zheng ebab980d3e config_tools: is_tpm_passthru is checked by scenario config
add check for is_tpm_passthru by tpm config from scenario
config.

Tracked-On: #5710

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-07 15:01:11 +08:00
Yang,Yu-chu 9ca32590dd config-tools: add validate_scenario_schema
add validate_scenario_schema to validate_scenario_setting and update the
excption handling.

Tracked-On: #5672
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-02-07 10:24:29 +08:00
David B. Kinder 07f4b9f5eb doc: cleanup xsd-derived config doc text
Start cleaning up formatting and content layout issues in the
xsd-derived configuration option documentation.  Includes adding
documentation for unnamed embedded simple types within an element (and
updates to the XSLT transformation to display these), cleanup of element
and type documentation, typos and description clarity.

Improved xsdl translation to automatically include default values and if
an option is optional (instead of manually documenting this in the
description text).

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-04 10:04:56 -08:00
Shuang Zheng 0ea991fbed config_tools: add SW SRAM config
add SW SRAM config for hybrid_rt and industry scenarios on tgl-rvp
and ehl-crb-b boards.

Tracked-On: #5649

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-02-03 15:41:17 +08:00
Yang,Yu-chu 0c7d8dd8cc config-tools: check vmsix enablement for ehl-crb-b
Assign extra vbar for vmsix devive for ehl-crb-b only.

Tracked-On: #5693
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-02-03 13:53:18 +08:00
Shuang Zheng 1a0ab78a84 config_tools: update config app when creating new scenarios according to folder reorg
update scenaro xml templates when creating or loading new scenarios
according to config app folder reorg.
set default values for new create VMs from scenario schema when creating
a new scenario setting, adding a new VM, loading new default scenarios
for a new board;
add MBA_DELAY in generic scenario xml.

Tracked-On: #5672

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Mao, Junjie <junjie.mao@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2021-02-03 09:18:23 +08:00
Shuang Zheng bf88e24218 config_tools: scenario setting UI with xsd schema config
render scenario setting UI with xsd schema config, validate scenario
setting with xsd validation.

Tracked-On: #5672

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Mao, Junjie <junjie.mao@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2021-02-03 09:18:23 +08:00
Xie, nanlin 0b6840d1be acrn-config: Update generated configuration source code
1.Reorg generated configuration source code structure
2.Upstream generated configuration source code based on generic board infomation
3.Update license date from 2020 to 2021

Tracked-On: #5644
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2021-02-02 16:53:56 +08:00
Yang,Yu-chu 1f8d245ed8 config-tools: validate the scenario against schema
Try validate the scenario xml against schema if the config.xsd exsists.

Fix the regular expression pattern of IVSHMEM_REGION string validation.

Tracked-On: #5672
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-02-02 15:34:26 +08:00
Junjie Mao c5ac66e2f5 config_tools/data: fix typos in scenario XML files
Validation of the scenario XML files against the defined schema reveals
three typos. This patch fixes these errors.

Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-02-01 16:51:09 +08:00
Junjie Mao 99f8ea64c1 config_tools/data: remove descriptions from scenario XML files
With a schema for scenario XML files, we no longer need to duplicate the
description, configurability and writeablity attributes in each XML
file.

This patch applies the following transformation to all scenario XML files
in order to remove these attributes.

<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="@desc" />
  <xsl:template match="@configurable | @multiselect | @readonly" />

  <!-- The identity template -->
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>

Tracked-On: #5644
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-02-01 16:51:09 +08:00
Yang,Yu-chu 5437c2e47a config-tool: add elements descriptions to schema
update the missing descriptions to following files:
 - misc/config_tools/schema/VMtypes.xsd
 - misc/config_tools/schema/config.xsd
 - misc/config_tools/schema/types.xsd

Tracked-On: #5672
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-02-01 09:27:02 +08:00
Yang, Yu-chu fa01261552 config_tools: add XML schema for the scenario XML
This patch introduces a schema (in XSD 1.1) for the scenario XML of ACRN
hypervisor for validation and documentation.

An XML schema defines the expected layout and value ranges of an XML
document. It allows a concise way to define our expectation on the
information in a scenario XML, including:

 * structure of elements
 * number of occurrences of elements with the same tags
 * element data types and default values
 * element descriptions
 * any further properties such as readonly and configurable

Multiple XSD-based validators are available in the open source
community. A Python-based apporach will be introduced in a later patch and
integrated into the build system to ensure the integrity of the scenario
XML before we process it further.

A reference of the configuration data will be generated from the
<xs:documentation> blocks. Format for <xs:documentation> blocks will
properly output multiple text lines so features such as lists can be
used. All multi-line content must be left-aligned unless indentation is
specifically required by rst syntax. The trailing </xs:documentation> tag
should be on the same line as the last text line. For example:

<xs:simpleType name="SchedulerType">
  <xs:annotation>
      <xs:documentation>Three scheduler options are supported:

- ``SCHED_NOOP``: The NOOP (No-Operation) scheduler means there is a
  strict 1 to 1 mapping between vCPUs and pCPUs.
- ``SCHED_IORR``: The IORR (IO sensitive Round Robin) scheduler supports
  multipule vCPUs running on on one pCPU, scheduled by
  a IO sensitive round robin policy.
 ``SCHED_BVT``: The BVT (Borrowed Virtual time) scheduler is a virtual
  time based
  scheduling algorithm, it dispatchs the runnable thread with the
  earliest effective virtual time. *TODO: BVT scheduler will be built on
  top of a prioritized scheduling mechanism, i.e. higher priority threads
  get scheduled first, and same priority tasks are scheduled per BVT.*

Read more about the available scheduling options in
:ref:`cpu_sharing`.</xs:documentation>

  </xs:annotation>
    <xs:restriction base="xs:string">
        <xs:enumeration value="SCHED_NOOP" />
        <xs:enumeration value="SCHED_IORR" />
        <xs:enumeration value="SCHED_BVT" />
    </xs:restriction>
  </xs:simpleType>

Tracked-On: #5672
Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-02-01 09:27:02 +08:00
Xie, nanlin f7772a98ee acrn-config: Rename acpi generated asl folder name from VMx to ACPI_VMx
Tracked-On: #5644
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2021-01-29 15:04:09 +08:00
Shuang Zheng d891e2929b acrn-config: add fusa_partition scenario on ehl-crb-b board
add fusa_partition scenario with 1 pre-launched Zephyr and 1 pre-launched
RTVM for ehl-crb-b board.

v2: fix the issue for build failure for partition mode by error check of
bootargs.

Tracked-On: #5665

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2021-01-29 11:06:41 +08:00
Shuang Zheng 2a3ef45b91 acrn-config: update config folders used in config app
update config folders used in config app based on config tool folders
reorg; remove "Generate configuration files" button from config app
since the function is deprecated.

Tracked-On: #5644
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-01-29 10:02:56 +08:00
Junjie Mao daf495bfc8 config_tools/target: generate Software SRAM related info
This patch parsees physical RTCT entries and dump information about pseudo
RAM into the board XML files. A macro named PRE_RTVM_SW_SRAM_BASE_GPA is
added to the generated misc_cfg.h according to recent design changes.

This patch still writes the board XML file manually, following the
convention of the current framework. Using XML-based approach requires a
complete refinement of the current generation process as the root
`acrn-config` node has its own text among adjacent children.

Tracked-On: #5649
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-01-27 16:39:24 +08:00
Junjie Mao ba02583f2d config_tools/acpiparser: port the ACPI module from BITS
This patch ports the ACPI parsing module from BITS (BIOS Implementation
Test Suite) in order to ease the access to ACPI tables during board XML
generation. This library allows accessing ACPI table fields as Python class
members, getting rid of hard coding or calculating offsets within tables.

Compared to the original library, this port makes the following changes.

 * Extract only the scripts and functions that contribute to ACPI parsing.
 * Separate the parser of each ACPI table into different files.
 * Read raw ACPI tables from Linux sysfs.
 * Adapt to Python 3.

Tracked-On: #5649
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-01-27 16:39:24 +08:00
Xie, nanlin 97c9b24030 acrn-config: Reorg config tool folder
Remove vm_configs folder and move all the XML files and generic code example into config_tools/data

Tracked-On: #5644
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2021-01-27 11:08:28 +08:00