mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: ptct: init psram on all cores
Call PTCM command interface to initialize pSRAM on all CPU cores. Becuase HV need to call PTCM command interface which is not a HV code text, now we WA to remove the NX for HV. Tracked-On: #5330 Signed-off-by: Qian Wang <qian1.wang@intel.com> Signed-off-by: Li Fei1 <fei1.li@intel.com> Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
40
hypervisor/include/arch/x86/ptcm.h
Normal file
40
hypervisor/include/arch/x86/ptcm.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef PTCM_H
|
||||
#define PTCM_H
|
||||
|
||||
#include <ptct.h>
|
||||
|
||||
#define MSABI __attribute__((ms_abi))
|
||||
|
||||
typedef int32_t MSABI (*ptcm_command_abi)(uint32_t command, void *command_struct);
|
||||
|
||||
#define PTCM_CMD_INIT_PSRAM (int32_t)1U
|
||||
#define PTCM_CMD_CPUID (int32_t)2U
|
||||
#define PTCM_CMD_RDMSR (int32_t)3U
|
||||
#define PTCM_CMD_WRMSR (int32_t)4U
|
||||
|
||||
#define PCTM_L2_CLOS_MASK_MAX_NUM 8U
|
||||
#define PCTM_L3_CLOS_MASK_MAX_NUM 4U
|
||||
|
||||
#define PTCM_STATUS_SUCCESS 0
|
||||
#define PTCM_STATUS_FAILURE -1
|
||||
|
||||
struct ptcm_info
|
||||
{
|
||||
uint32_t version; // [OUT]
|
||||
uint32_t max_command_index; // [OUT]
|
||||
};
|
||||
|
||||
struct ptcm_header
|
||||
{
|
||||
uint32_t magic;
|
||||
uint32_t version;
|
||||
uint64_t command_interface_offset;
|
||||
};
|
||||
|
||||
#endif /* PTCM_H */
|
@@ -101,4 +101,5 @@ struct ptcm_mem_region
|
||||
|
||||
extern uint64_t psram_area_bottom;
|
||||
extern uint64_t psram_area_top;
|
||||
void init_psram(bool is_bsp);
|
||||
#endif /* PTCT_H */
|
||||
|
Reference in New Issue
Block a user