mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 12:49:24 +00:00
HV: fix misra violation on platform clos array
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>
This commit is contained in:
@@ -13,6 +13,5 @@
|
||||
#endif
|
||||
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[0];
|
||||
uint16_t platform_clos_num = 0;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#define MISC_CFG_H
|
||||
|
||||
#define CONFIG_MAX_PCPU_NUM 4U
|
||||
#define MAX_PLATFORM_CLOS_NUM 0U
|
||||
|
||||
#define ROOTFS_0 "root=/dev/sda3 "
|
||||
#define ROOTFS_1 "root=/dev/mmcblk1p1 "
|
||||
|
||||
|
@@ -15,25 +15,23 @@
|
||||
|
||||
struct dmar_info plat_dmar_info;
|
||||
|
||||
struct platform_clos_info platform_clos_array[4] = {
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM] = {
|
||||
{
|
||||
.clos_mask = 0xff,
|
||||
.msr_index = MSR_IA32_L2_MASK_0,
|
||||
.msr_index = MSR_IA32_L2_MASK_BASE,
|
||||
},
|
||||
{
|
||||
.clos_mask = 0xff,
|
||||
.msr_index = MSR_IA32_L2_MASK_1,
|
||||
.msr_index = MSR_IA32_L2_MASK_BASE + 1U,
|
||||
},
|
||||
{
|
||||
.clos_mask = 0xff,
|
||||
.msr_index = MSR_IA32_L2_MASK_2,
|
||||
.msr_index = MSR_IA32_L2_MASK_BASE + 2U,
|
||||
},
|
||||
{
|
||||
.clos_mask = 0xff,
|
||||
.msr_index = MSR_IA32_L2_MASK_3,
|
||||
.msr_index = MSR_IA32_L2_MASK_BASE + 3U,
|
||||
},
|
||||
};
|
||||
|
||||
uint16_t platform_clos_num = (uint16_t)(sizeof(platform_clos_array)/sizeof(struct platform_clos_info));
|
||||
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#define MISC_CFG_H
|
||||
|
||||
#define CONFIG_MAX_PCPU_NUM 4U
|
||||
#define MAX_PLATFORM_CLOS_NUM 4U
|
||||
|
||||
#define ROOTFS_0 "root=/dev/sda3 "
|
||||
#define ROOTFS_1 "root=/dev/mmcblk0p3 "
|
||||
|
||||
|
@@ -13,6 +13,5 @@
|
||||
#endif
|
||||
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[0];
|
||||
uint16_t platform_clos_num = 0;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#define MISC_CFG_H
|
||||
|
||||
#define CONFIG_MAX_PCPU_NUM 8U
|
||||
#define MAX_PLATFORM_CLOS_NUM 0U
|
||||
|
||||
#define ROOTFS_0 "root=/dev/sda3 "
|
||||
|
||||
#define SOS_ROOTFS ROOTFS_0
|
||||
|
@@ -13,6 +13,5 @@
|
||||
#endif
|
||||
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[0];
|
||||
uint16_t platform_clos_num = 0;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#define MISC_CFG_H
|
||||
|
||||
#define CONFIG_MAX_PCPU_NUM 4U
|
||||
#define MAX_PLATFORM_CLOS_NUM 0U
|
||||
|
||||
#define ROOTFS_0 "root=/dev/sda3 "
|
||||
#define ROOTFS_1 "root=/dev/mmcblk0p1 "
|
||||
|
||||
|
@@ -13,5 +13,5 @@
|
||||
#endif
|
||||
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[0];
|
||||
uint16_t platform_clos_num = 0;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -13,6 +13,5 @@
|
||||
#endif
|
||||
|
||||
struct dmar_info plat_dmar_info;
|
||||
struct platform_clos_info platform_clos_array[0];
|
||||
uint16_t platform_clos_num = 0;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#define MISC_CFG_H
|
||||
|
||||
#define CONFIG_MAX_PCPU_NUM 4U
|
||||
#define MAX_PLATFORM_CLOS_NUM 0U
|
||||
|
||||
#define ROOTFS_0 "root=/dev/sda3 "
|
||||
|
||||
#define SOS_ROOTFS ROOTFS_0
|
||||
|
@@ -55,6 +55,5 @@ struct dmar_info plat_dmar_info = {
|
||||
.drhd_units = drhd_info_array,
|
||||
};
|
||||
|
||||
struct platform_clos_info platform_clos_array[0];
|
||||
uint16_t platform_clos_num = 0;
|
||||
struct platform_clos_info platform_clos_array[MAX_PLATFORM_CLOS_NUM];
|
||||
const struct cpu_state_table board_cpu_state_tbl;
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#define MISC_CFG_H
|
||||
|
||||
#define CONFIG_MAX_PCPU_NUM 4U
|
||||
#define MAX_PLATFORM_CLOS_NUM 0U
|
||||
|
||||
#define ROOTFS_0 "root=/dev/sda3 "
|
||||
#define ROOTFS_1 "root=/dev/nvme0n1p3 "
|
||||
|
||||
|
Reference in New Issue
Block a user