Commit Graph

116 Commits

Author SHA1 Message Date
Wei Liu b332bf84b8 acrn-config: enhance the board config that has no serial port
There may be no physical serial port in the target board, and it will
stop generating board file, the patch add support to handle such case.

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 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 037e7a4a2c acrn-config: modify the key of vuart base
Return correct key of vuart base to webUI for parsing.

Tracked-On: #4128
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
Victor Sun 0d52f933da Makefile: move .mk file to hv scripts folder
The *.mk files under misc/acrn-config/library are all rules for hypervisor
makefiles only, so move these files to hypervisor/scripts/makefile/ folder.

The folder of acrn-config/library/ will be used to store python script lib only.

Tracked-On: #3779

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Terry Zou <terry.zou@intel.com>
2019-11-13 16:05:30 +08:00
Wei Liu cdd086a81d acrn-config: by-pass acpi_idle/acpi_cpufreq for parsing target board
Current board parse logic would be broken if acpi_idle/acpi-cpufreq
driver is not loaded by native kernel.
This patch would just leave a warning to user and continue to parse
other information in this case.

Tracked-On: #4082
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-12 22:03:50 +08:00
Wei Liu 631c461314 acrn-config: Cx desc parsing enhancement
Previous code parse the Cx value by hardcoded position in sysfs desc
node, but this might be changed in different kernel.

This patch will parse the Cx value position by index key word like
MWAIT/IOPORT.

Tracked-On: #4074
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-12 22:03:50 +08:00
Wei Liu d9cb750ed9 acrn-config: alloc vuart1 irq when pttyS1 not exist only
If pttyS1 do not exist, we can alloc irq for vuart1, but if pttyS1
exist, we should reuse the irq of pttyS1 to keep compliance.

Tracked-On: #4073
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-12 22:03:50 +08:00
Victor Sun 0011607a16 Makefile: refine include path for efi_stub
Move hypervisor related include path from CFLAGS to INCLUDE_PATH to make
structure more clean.

Tracked-On: #3779

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-11-12 10:51:04 +08:00
Victor Sun 9a3cc8f748 makefile: cover menuconfig way to configure board/scenario
We now have four methods to configure board and scenario when
build acrn (sorted with priority):
1. Change them with "make menuconfig" in hypervisor directory
2. Give baord_file/scenario_file as make command parameters
3. Give BOARD/SCENARIO as make command parameters
4. Use BOARD/SCENARIO default value defined in Makefile file

With this patch, we make sure we follow priority exactly.

Tracked-On: #4067

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-11-11 15:01:50 +08:00
Victor Sun ed8fb94778 Makefile: support make from XML for new board
Currently make hypervisor will depend on a $(BOARD).config file to load
board defconfig which triggered by oldconfig process, this will block
make from XMLs for a new board because $(BOARD).config never exist.
This requires us to patch configuration for new board earlier than make
oldconfig.

Tracked-On: #4067
Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-11-11 15:01:50 +08:00
Wei Liu 05bb56291b acrn-config: include msr.h in board.c
without the msr.h file the build will be failed when CAT is enabled.

Tracked-On: #4066
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:44:03 +08:00
Wei Liu 5cc2c0dca5 acrn-config: chose ttyS1 for vuart1
For vuart1, if it's mapped to a real native serial port, we must
re-use the native serial port io base and irq number. If no native
serial port is mapped to vuart1, non-exist io base and irq should
be used.

Please note: UOS launch script may need be updated according to
which serial port index is used by vuart1.

Now, we are using ttyS1 of SOS for vuart1 in our release. User may
need to remap vuart to different ttySx by following above rule if
ttyS1 in user platform is used by other devices like Bluetooth/Wifi.

Tracked-On: #4016
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-On: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 485529415e acrn-config: add 'xhci' usb mediator for laag and waag
Enable xhci usb mediator for whl-ipc-i5/whl-ipc-7 and KBL NUC for LaaG
and WaaG.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 572abc70d7 acrn-config: add serial config in new $(board).config
Enhance the $(board).config for new board.
Serial config should be set in $(board).config for new board.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu c3495c6839 acrn-config: refine mem_size_set function
mem_size should be set from xml, it should not be overrided dynamically.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 61926d2b11 acrn-config: refine interrupt_storm function
interrupt_storm should be enabled while passthrough device was set.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 83797610da acrn-config: add support to generate launch script
Add support to generate launch script for whl-ipc-i5/whl-ipc-i7.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 9c8059499a acrn-config: remove runC script from unnecessary launch script
1. run_cotainer is linux type uos, remove related runC script from
unnercessary luanch script.

Tracked-On: #3930
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 2fcbd5c3f5 acrn-config: add config files for whl-ipc-i7 board
Add board/scenario/launch config files for whl-ipc-i7.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu 28c1d001b5 acrn-config: add config files for whl-ipc-i5 board
Add board/scenario/launch config files for whl-ipc-i5.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 13:43:50 +08:00
Wei Liu b9c77e008d acrn-config: 'keep_gsi' flag set for Android vm
keep_gsi is needed as a workaround for the device that support both
MSI and legacy interrupt, so keep the flag for Android only because
it is not sure for some wifi/audio device on other Linux guest.

Tracked-On: #3956
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-11-11 11:08:21 +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 ad9f424ce5 acrn-config: generate proper msr_index value for CLOS
Since msr_index relys on the MSR_IA32_L2_QOS_MASKn(n:max to 3)
macro which defined in hv source code, generate array that CLOS number
more than 4 means need define more than 4 macro.
This patch solve such issue by using MSR_IA32_L2/L3_MASK_BASE with the
msr index offset.

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 6d9ff40183 acrn-config: update DRHD_INFO section for board xml
The DRHD_INFO section should be updated with the refinement patches for
parsing DMAR table.

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 4658259be7 acrn-config: refine DRHD structure initialization
1. Initialize DRHDn_DEVSCOPEn_TYPE/DRHDn_DEVSCOPEn_ID for each devscope;
2. Remove DRHDn_IOAPIC_ID macro;
2. Refine the value format from base 10 to 16.

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 8fcfea1386 acrn-config: refinement for parsing DMAR table
Previous DRHD and device scope number are hard coded to 4, this patch removes
the limitation and parse the real drhd count/devscope count dynamically.

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 f10c937b40 acrn-config: correct value of DRHDx_IGNORE macro
The DRHDx_IGNORE should be defined to true when DRHD device BDF equal to
the given CONFIG_GPU_SBDF.

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
Li Fei1 af886fee8c efi-stub: reserve unconfigure high memory
Now ACRN support more and more platforms. However, the default configuration only
support board which memory is less than 16 GB. If a board memory is large than
16 GB, the developer needs to configure the memory configuration according to his
board. Otherwise, the boot will fail. This's because UEFI BIOS will use the high
memory as possible.
This patch try to allocate the memory as eraly as possible. So that the BIOS will
not access this region.

Tracked-On: #4007
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2019-11-07 08:47:02 +08:00
wenlingz c8fa8e15f8 Modify KBL-NUC/SDC for default build
Tracked-On: #3968
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2019-11-01 09:06:45 +08:00
Wei Liu 85b362fbeb acrn-config: modify vxworks uos id for industry launch config
As vm3 for industry scenario was removed from scenario config, so
modify the uos id to proper id.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu 941d5ad308 acrn-config: parse rootfs_img and refine virtio-blk
1. Parse item of 'rootfs_img' from launch config xml.
2. Refine virtio-blk device for launch config.

Tracked-On: #3931
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu 8cd7c34580 acrn-config: modify board name to uos name
We should use launch_$(uos type) for launch function name instead of using
launch_$(board name).

Tracked-On: #3931
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu 812d8af65a acrn-config: add mem_size for launch vm
add mem_size parameter for acrn-dm while generating launch script.

Traked-On: #3932
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu f46d8a9669 acrn-config: add the '"' character for launch script
1. Add the character of quotation marks for launch vm script.
2. Audio codec should put together with audio devcie and pass to
 vm , otherwise report an error message to webUI.

Tracked-On: #3937
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Victor Sun 6f7081f620 acrn-config: remove vm3 for industry scenario
The VM2 of INDUSTRY scenario need 2 vCPUs for performance, so there would
be no available pCPU for VM3, need to remove VM3 for this scenario.

Tracked-On: #3925

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-10-25 15:17:40 +08:00
Wei Liu feba836944 acrn-config: refine ttyS info of board file
The previous method to handle ttyS info has an assumption that PCI
serial devices are all mmio type, this caused incorrect BDF info in
board XML file.
This patch fix this issue by dropping serial device BDF info and
replace it with IO type.

Tracked-On: #3900
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-25 10:56:23 +08:00
Wei Liu b6a8052045 acrn-config: filter out the proper wifi/ethernet device
Filter out the wifi/ethernet device from webUI with below PCI device class coding rule:
ethernet: 0200/0280;
wifi: 0280/0d20/0d21/0d80;

Tracked-On: #3917
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-25 09:02:23 +08:00
Shuang Zheng defeb851bc acrn-config: fix the issue no error message in launch setting
fix the issue that there is no error message displayed in launch setting of WebUI.

Tracked-On: #3913
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-10-25 09:02:23 +08:00
Wei Liu d9f0d8dcf0 acrn-config: fix the wrong 'key' type returned to webUI
Fix the wrong 'key' type of error list returned to webUI for parsing.

 Tracked-On: #3913
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-25 09:02:23 +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 24d3eaba27 acrn-config: skip git environment check when not do git commit
Check git environment only when '--enable_commit' option was set.

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 fbd8597fbf acrn-config: refine 'lpc' setting with console type
Refine 'lpc' setting for acrn-dm option.

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
Yuan Liu 73b8c91e06 Misc: lifemngr-daemon-on-UOS for windows
For cross-VM S5 notify via vUART, life_mngr service is running on UOS.
It is listening on COM2 to get SOS's commands.
The protocol is: SOS send "shutdown", UOS feedback "acked".

When SOS triggle shutdown, SOS can 1) check VM's status until UOS
stopped, 2) retry shutdown UOS normally with timeout.
So, no matter life_mngr server is running, SOS's shutdown procedure will
properly finish.

Tracked-On: #3564
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2019-10-24 13:20:53 +08:00
Wei Liu 1c7bf9fd56 acrn-config: refine the vbootloader of vm
Refine the vbootloader type of vm,
The vbootloader type should be select from vsbl/ovmf/none in webUI item.

Tracked-On: #3879
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 11:42:27 +08:00
Wei Liu a71623595e acrn-config: add '--windows' option for WaaG vm
Add the '--windows' option to launch WaaG vm.

Tracked-On: #3880
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 11:40:17 +08:00
Wei Liu 009d835bba acrn-config: modify board info of block device info
As the blkid info contains 'UUID' information, which easy to lead to
confuse with the vm 'UUID'. So refine the format for block device.

v1-v2:
    1). align the style in BLOCK_DEVICE_INFO tag
    2). add 'mmcblk1p3' in BLOCK_DEVICE_INFO tag

v2-v3:
    1). correct the commit message.
    2). refine the api of handle_block_dev

Tracked-On: #3754
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 09:30:28 +08:00
Wei Liu 96dede43ad acrn-config: modify ipu/ipu_i2c device launch config of apl-up2
Correct the default settings of ipu/ipu_i2c device for apl-up2.

Tracked-On: #3863
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:58:04 +08:00
Wei Liu 001c929dd4 acrn-config: correct launch config info for audio/wifi defice of apl-mrb
The audio and Wifi device info in apl-mrb config xmls is wrong, fix it.

Tracked-On: #3863
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:58:04 +08:00
Wei Liu 2a647fa164 acrn-config: define vm name for Preempt-RT Linux in launch script
The vm name for Preempt-RT Linux is not defined in launch script,
causing Preempt RT linux launch failed.
This patch refine the vm name and define the vm name for Preempt-RT
Linux to fix such kinds of issues.

Tracked-On: #3852
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:57:47 +08:00
Wei Liu a2430f1313 acrn-config: refine board name with undline_name api
Sometimes character '-' or space need to be converted to '_' to make string format uniformed.
Add this common api to satisfy such requirment and refine the code for board name generating.

Tracked-On: #3852
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:57:47 +08:00