mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-16 23:29:50 +00:00
Currently the Px Cx supported SoCs which listed in cpu_state_tbl.c is limited, and it is not a wise option to build a huge state table data base to support Px/Cx for other SoCs. This patch give a alternative solution that build a board specific cpu state table in board.c which could be auto-generated by offline tool, then the CPU Px/Cx of customer board could be enabled; Hypervisor will search the cpu state table in cpu_state_tbl[] first, if not found then go check board_cpu_state_tbl. If no matched cpu state table is found then Px/Cx will not be supported; Tracked-On: #3477 Signed-off-by: Victor Sun <victor.sun@intel.com>
32 lines
615 B
C
32 lines
615 B
C
/*
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <board.h>
|
|
#include <msr.h>
|
|
|
|
struct platform_clos_info platform_clos_array[4] = {
|
|
{
|
|
.clos_mask = 0xff,
|
|
.msr_index = MSR_IA32_L2_MASK_0,
|
|
},
|
|
{
|
|
.clos_mask = 0xff,
|
|
.msr_index = MSR_IA32_L2_MASK_1,
|
|
},
|
|
{
|
|
.clos_mask = 0xff,
|
|
.msr_index = MSR_IA32_L2_MASK_2,
|
|
},
|
|
{
|
|
.clos_mask = 0xff,
|
|
.msr_index = MSR_IA32_L2_MASK_3,
|
|
},
|
|
};
|
|
|
|
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;
|