From 6378b74db4a1608ca532ee90e8b843bcc34046b4 Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Mon, 29 Apr 2019 01:36:14 +0800 Subject: [PATCH] HV: add generic board config hypervisor/arch/x86/configs/($CONFIG_BOARD) will store Board specific configs, add a generic folder to store configs for generic boards that they can share one build binary with minimal and common features in some scenarios like SDC. Please be aware that BDF of pci devices are different on each board, so one binary for LOGICAL_PARTITION scenario is not supported. Tracked-On: #2291 Signed-off-by: Victor Sun Acked-by: Eddie Dong --- hypervisor/arch/x86/configs/generic.config | 3 +++ hypervisor/arch/x86/configs/generic/board.c | 10 ++++++++++ .../arch/x86/configs/generic/pci_devices.h | 12 ++++++++++++ hypervisor/arch/x86/configs/generic/ve820.c | 16 ++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 hypervisor/arch/x86/configs/generic.config create mode 100644 hypervisor/arch/x86/configs/generic/board.c create mode 100644 hypervisor/arch/x86/configs/generic/pci_devices.h create mode 100644 hypervisor/arch/x86/configs/generic/ve820.c diff --git a/hypervisor/arch/x86/configs/generic.config b/hypervisor/arch/x86/configs/generic.config new file mode 100644 index 000000000..44c8da457 --- /dev/null +++ b/hypervisor/arch/x86/configs/generic.config @@ -0,0 +1,3 @@ +# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) +CONFIG_BOARD="generic" +CONFIG_SERIAL_LEGACY=y diff --git a/hypervisor/arch/x86/configs/generic/board.c b/hypervisor/arch/x86/configs/generic/board.c new file mode 100644 index 000000000..830a75dcc --- /dev/null +++ b/hypervisor/arch/x86/configs/generic/board.c @@ -0,0 +1,10 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +struct platform_clos_info platform_clos_array[0]; +uint16_t platform_clos_num = 0; diff --git a/hypervisor/arch/x86/configs/generic/pci_devices.h b/hypervisor/arch/x86/configs/generic/pci_devices.h new file mode 100644 index 000000000..8e2af5f90 --- /dev/null +++ b/hypervisor/arch/x86/configs/generic/pci_devices.h @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef PCI_DEVICES_H_ +#define PCI_DEVICES_H_ + +#error "This is a dummy pci_devices.h, please generate PCI BDF info for your board." + +#endif /* PCI_DEVICES_H_ */ diff --git a/hypervisor/arch/x86/configs/generic/ve820.c b/hypervisor/arch/x86/configs/generic/ve820.c new file mode 100644 index 000000000..c1e5bedd3 --- /dev/null +++ b/hypervisor/arch/x86/configs/generic/ve820.c @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include + +/** + * @pre vm != NULL + */ +void create_prelaunched_vm_e820(struct acrn_vm *vm) +{ + vm->e820_entry_num = 0U; + vm->e820_entries = NULL; +}