mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-06 15:36:59 +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>
34 lines
892 B
C
34 lines
892 B
C
/*
|
|
* Copyright (C) <2018> Intel Corporation
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef HOST_PM_H
|
|
#define HOST_PM_H
|
|
|
|
#include <acrn_common.h>
|
|
|
|
#define BIT_SLP_TYPx 10U
|
|
#define BIT_SLP_EN 13U
|
|
#define BIT_WAK_STS 15U
|
|
|
|
struct cpu_state_info {
|
|
uint8_t px_cnt; /* count of all Px states */
|
|
const struct cpu_px_data *px_data;
|
|
uint8_t cx_cnt; /* count of all Cx entries */
|
|
const struct cpu_cx_data *cx_data;
|
|
};
|
|
|
|
struct cpu_state_table {
|
|
char model_name[64];
|
|
struct cpu_state_info state_info;
|
|
};
|
|
|
|
struct pm_s_state_data *get_host_sstate_data(void);
|
|
void host_enter_s3(struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
|
|
extern void asm_enter_s3(struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
|
|
extern void restore_s3_context(void);
|
|
struct cpu_state_info *get_cpu_pm_state_info(void);
|
|
|
|
#endif /* HOST_PM_H */
|