Debug: Add one hypercall to quary hardware info

acrntrace/log kernel modules will use this hypercall to fetch
pcpu num of hardware platform. Then, initialize driver accordingly.

Tracked-On: #1775;#1776
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
This commit is contained in:
Kaige Fu
2018-12-06 16:13:35 +00:00
committed by wenlingz
parent 81a9de6067
commit 1e3358fd92
2 changed files with 41 additions and 0 deletions

View File

@@ -69,6 +69,7 @@
#define HC_SETUP_SBUF BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x00UL)
#define HC_SETUP_HV_NPK_LOG BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x01UL)
#define HC_PROFILING_OPS BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x02UL)
#define HC_GET_HW_INFO BASE_HC_ID(HC_ID, HC_ID_DBG_BASE + 0x03UL)
/* Trusty */
#define HC_ID_TRUSTY_BASE 0x70UL
@@ -209,6 +210,14 @@ struct hv_npk_log_param {
uint64_t mmio_addr;
} __aligned(8);
/**
* the parameter for HC_GET_HW_INFO hypercall
*/
struct acrn_hw_info {
uint16_t cpu_num; /* Physical CPU number */
uint16_t reserved[3];
} __aligned(8);
/**
* Gpa to hpa translation parameter, used for HC_VM_GPA2HPA hypercall
*/