Commit Graph

767 Commits

Author SHA1 Message Date
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