acrn-config: add support for P2SB bridge passthrough

This patch is to support direct assignment of P2SB bridge to one pre-launched
VM for EHL. User can configure this per-VM attribute in scenario xml:
    <mmio_resources desc="MMIO resources.">
         <p2sb>y</p2sb>
    </mmio_resources>

Set p2sb to y to passthru P2SB bridge to VM, and n otherwise.

Tracked-On: #5221
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
This commit is contained in:
dongshen
2020-08-23 17:45:16 -07:00
committed by wenlingz
parent 10d4773f1d
commit 01c66eb4b3
9 changed files with 137 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
import common
import board_cfg_lib
import scenario_cfg_lib
BOARD_INFO_DEFINE="""#ifndef BOARD_INFO_H
#define BOARD_INFO_H
@@ -90,4 +91,10 @@ def generate_file(config):
# generate HI_MMIO_START/HI_MMIO_END
find_hi_mmio_window(config)
if (common.VM_TYPES.get(0) is not None and
scenario_cfg_lib.VM_DB[common.VM_TYPES[0]]['load_type'] == "PRE_LAUNCHED_VM"
and board_cfg_lib.is_p2sb_passthru_possible()):
print("", file=config)
print("#define P2SB_BAR_ADDR\t\t\t0x{:X}UL".format(board_cfg_lib.find_p2sb_bar_addr()), file=config)
print(BOARD_INFO_ENDIF, file=config)