mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-31 07:20:55 +00:00
MISRA C requires specified bounds for arrays declaration, previous declaration of platform_clos_array in board.h does not meet the requirement. Tracked-On: #3987 Signed-off-by: Victor Sun <victor.sun@intel.com>
60 lines
1.3 KiB
C
60 lines
1.3 KiB
C
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <board.h>
|
|
#include <vtd.h>
|
|
|
|
static struct dmar_dev_scope drhd0_dev_scope[DRHD0_DEV_CNT] = {
|
|
{
|
|
.type = DRHD0_DEVSCOPE0_TYPE,
|
|
.id = DRHD0_DEVSCOPE0_ID,
|
|
.bus = DRHD0_DEVSCOPE0_BUS,
|
|
.devfun = DRHD0_DEVSCOPE0_PATH
|
|
},
|
|
};
|
|
|
|
static struct dmar_dev_scope drhd1_dev_scope[DRHD1_DEV_CNT] = {
|
|
{
|
|
.type = DRHD1_DEVSCOPE0_TYPE,
|
|
.id = DRHD1_DEVSCOPE0_ID,
|
|
.bus = DRHD1_DEVSCOPE0_BUS,
|
|
.devfun = DRHD1_DEVSCOPE0_PATH
|
|
},
|
|
{
|
|
.type = DRHD1_DEVSCOPE1_TYPE,
|
|
.id = DRHD1_DEVSCOPE1_ID,
|
|
.bus = DRHD1_DEVSCOPE1_BUS,
|
|
.devfun = DRHD1_DEVSCOPE1_PATH
|
|
},
|
|
};
|
|
|
|
static struct dmar_drhd drhd_info_array[DRHD_COUNT] = {
|
|
{
|
|
.dev_cnt = DRHD0_DEV_CNT,
|
|
.segment = DRHD0_SEGMENT,
|
|
.flags = DRHD0_FLAGS,
|
|
.reg_base_addr = DRHD0_REG_BASE,
|
|
.ignore = DRHD0_IGNORE,
|
|
.devices = drhd0_dev_scope
|
|
},
|
|
{
|
|
.dev_cnt = DRHD1_DEV_CNT,
|
|
.segment = DRHD1_SEGMENT,
|
|
.flags = DRHD1_FLAGS,
|
|
.reg_base_addr = DRHD1_REG_BASE,
|
|
.ignore = DRHD1_IGNORE,
|
|
.devices = drhd1_dev_scope
|
|
},
|
|
};
|
|
|
|
struct dmar_info plat_dmar_info = {
|
|
.drhd_count = DRHD_COUNT,
|
|
.drhd_units = drhd_info_array,
|
|
};
|
|
|
|
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
|
const struct cpu_state_table board_cpu_state_tbl;
|