Commit Graph

9 Commits

Author SHA1 Message Date
Vijay Dhanraj 2175c17c97 acrn-config: Set defaults on empty leaf for generated <board>.xml file
This patch sets defaults similar to generic platform configuration
when leaf features like PM_INFO, S3_INFO, S5_INFO, DRHD_INFO, CPU_BRAND,
CX_INFO, PX_INFO, MMCFG_BASE_INFO are not generated via either target
offline tool or user supplies empty field in case of emulation.

Tracked-On: #3198
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-21 15:34:38 +08:00
Wei Liu ed8ac484ad acrn-config: remove the same parameters and functions from board_cfg_lib
Board config should relay on library/common.py and board_cfg_lib, then
remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Wei Liu 0e273e996c acrn-config: get default pci mmcfg base address
parse default pci mmcfg base address from target board.

Tracked-On: #4173
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-02 16:19:55 +08:00
Wei Liu 658dccfbe3 acrn-config: set S3/S5 to default value while BIOS not support them
If S3/S5 are not support by BIOS in some platform, will set them to 0
as default.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-20 10:01:24 +08:00
Wei Liu 7b0cafa84f acrn-config: generate dmar info for board.c
1. Parse DRHD_INFO section from board config xml, and generate dmar
structure information to board.c
2. Copy macro of DRHD_INFO from board config xml to $(board)_acpi_platform.h

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-08 16:43:08 +08:00
Wei Liu 9ea7a85ca5 acrn-config: set default package value for _S3 and _S5
Some BIOS does not support s3/s5, so there might be no _S3 or _S5
package in host ACPI table, previous code did not handle this, so
the build would be failed with the generated board file.
Set default s3/s5 package value to 0 for such case.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 15:13:51 +08:00
Wei Liu 28d1b909e6 acrn-config: generate a scenario patch and apply to acrn-hypervisor
1.the script will parse the the board information which already
generated, $(scenario).xml modified by user, generate scenario
vm configuration and apply to the acrn-hypervisor source code base.

2.parse cpu/memory/ttys/rootfs information from native os and store it to
the source code

3.implemnt scenario_config and it's usage

usage: scenario_cfg_gen.py --board <board_info_file> -scenario <scenario_info_file>
board_info_file :  file name of the board info
scenario_info_file :  file name of the scenario info

sample:
	$ python3 scenario_cfg_gen.py --board ../board-xmls/apl-mrb.xml
--scenario ../config-xmls/scenarios/sdc.xml

Also improvement board config generate usage:
sample:
	$ python3 board_cfg_gen.py --board ../board-xmls/apl-mrb.xml
--scenario ../config-xmls/scenarios/sdc.xml

V1-V2:
    1). parse board_setting.xml was removed as these configuration will be
stitch into scenario configuration
    2). parse console for different formats
    3). parse epc sections
    4). add logical partition rootfs
    5). support to parse clos, while webui set to None type
    6). support to parse bootargs, while webui set to nul
    7). convert '-' to '_' for pci sub class name while generating source file

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-16 09:34:37 +08:00
Wei Liu b73f97aaba acrn-config: enhance the target config
1. add misc.py to get systemd ram and root device
2. add more specify comments for arguments of functions

v1-v2:
    typo: Parser -> Parse
    some grammar check

v2-v3:
    add the message for Cx state

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-16 09:34:37 +08:00
Wei Liu a03b134190 acrn-config: generate a patch and apply to acrn-hypervisor
the script will parser the the board information which already generated on
target board, and apply to the acrn-hypervisor as a patch.

usage: board_cfg_gen.py --board <board_info_file>

sample:
	$ python3 board_cfg_gen.py --board ../target_board/board_info.xml

v1-v2:
1. allow to generate new board patch

v2-v3:
1. modify the description of generator tools
2. parser board_name.xml file
3. coding as PEP8 guildline

Tracked-On: #3480
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Shuang Zheng shuang.zheng@intel.com
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-07-30 16:38:23 +08:00