acrn-hypervisor/hypervisor/include/arch/x86/asm/guest/optee.h
Yifan Liu fd7ab300a8 hv: tee: Rename TEE_NOTIFICATION_VECTOR to TEE_FIXED_NONSECURE_VECTOR
The TEE_NOTIFICATION_VECTOR can sometimes be confused with TEE's PI
notification vector. So rename it to TEE_FIXED_NONSECURE_VECTOR for
better readability.

No logic change.

v3:
Add more comments in commit message.

Tracked-On: #6571
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2021-12-09 10:47:16 +08:00

28 lines
756 B
C

/*
* Copyright (C) 2021 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef TEE_H_
#define TEE_H_
#include <asm/guest/vm.h>
#include <asm/vm_config.h>
#include <ptdev.h>
#define TEE_FIXED_NONSECURE_VECTOR 0x29U
/* If the RDI equals to this value, then this is a RETURN after FIQ DONE */
#define OPTEE_RETURN_FIQ_DONE 0xBE000006UL
/* This value tells OPTEE that this switch to TEE is due to secure interrupt */
#define OPTEE_FIQ_ENTRY 0xB20000FFUL
int is_tee_vm(struct acrn_vm *vm);
int is_ree_vm(struct acrn_vm *vm);
void prepare_tee_vm_memmap(struct acrn_vm *vm, const struct acrn_vm_config *vm_config);
void handle_x86_tee_int(struct ptirq_remapping_info *entry, uint16_t pcpu_id);
#endif /* TEE_H_ */