acrn-hypervisor/hypervisor/include/arch/x86/ptcm.h
Li Fei1 5fa816f921 hv: pSRAM: add PTCT parsing code
The added parse_ptct function will parse native ACPI PTCT table to
acquire information like pSRAM location/size/level and PTCM location,
and save them.

Tracked-On: #5330
Signed-off-by: Qian Wang <qian1.wang@intel.com>
2020-11-02 10:29:43 +08:00

33 lines
694 B
C

/*
* 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_abi_func)(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 PTCM_MAGIC 0x5054434dU
struct ptcm_header {
uint32_t magic;
uint32_t version;
uint64_t command_offset;
} __packed;
extern volatile bool is_psram_initialized;
void init_psram(bool is_bsp);
void set_ptct_tbl(void *ptct_tbl_addr);
#endif /* PTCM_H */