xref: /openbmc/linux/arch/powerpc/include/asm/ultravisor-api.h (revision c95baf12f5077419db01313ab61c2aac007d40cd)
1a49dddbdSClaudio Carvalho /* SPDX-License-Identifier: GPL-2.0 */
2a49dddbdSClaudio Carvalho /*
3a49dddbdSClaudio Carvalho  * Ultravisor API.
4a49dddbdSClaudio Carvalho  *
5a49dddbdSClaudio Carvalho  * Copyright 2019, IBM Corporation.
6a49dddbdSClaudio Carvalho  *
7a49dddbdSClaudio Carvalho  */
8a49dddbdSClaudio Carvalho #ifndef _ASM_POWERPC_ULTRAVISOR_API_H
9a49dddbdSClaudio Carvalho #define _ASM_POWERPC_ULTRAVISOR_API_H
10a49dddbdSClaudio Carvalho 
11a49dddbdSClaudio Carvalho #include <asm/hvcall.h>
12a49dddbdSClaudio Carvalho 
13a49dddbdSClaudio Carvalho /* Return codes */
14139a1d28SMichael Anderson #define U_BUSY			H_BUSY
15a49dddbdSClaudio Carvalho #define U_FUNCTION		H_FUNCTION
16a49dddbdSClaudio Carvalho #define U_NOT_AVAILABLE		H_NOT_AVAILABLE
17a49dddbdSClaudio Carvalho #define U_P2			H_P2
18a49dddbdSClaudio Carvalho #define U_P3			H_P3
19a49dddbdSClaudio Carvalho #define U_P4			H_P4
20a49dddbdSClaudio Carvalho #define U_P5			H_P5
21a49dddbdSClaudio Carvalho #define U_PARAMETER		H_PARAMETER
22139a1d28SMichael Anderson #define U_PERMISSION		H_PERMISSION
23a49dddbdSClaudio Carvalho #define U_SUCCESS		H_SUCCESS
24a49dddbdSClaudio Carvalho 
25139a1d28SMichael Anderson /* opcodes */
26139a1d28SMichael Anderson #define UV_WRITE_PATE			0xF104
276c85b7bcSSukadev Bhattiprolu #define UV_RETURN			0xF11C
286a9c930bSRam Pai #define UV_ESM				0xF110
29ca9f4942SBharata B Rao #define UV_REGISTER_MEM_SLOT		0xF120
30c3262257SBharata B Rao #define UV_UNREGISTER_MEM_SLOT		0xF124
31ca9f4942SBharata B Rao #define UV_PAGE_IN			0xF128
32ca9f4942SBharata B Rao #define UV_PAGE_OUT			0xF12C
33f7777e00SRam Pai #define UV_SHARE_PAGE			0xF130
34f7777e00SRam Pai #define UV_UNSHARE_PAGE			0xF134
35256ba2c1SRam Pai #define UV_UNSHARE_ALL_PAGES		0xF140
36008e359cSBharata B Rao #define UV_PAGE_INVAL			0xF138
37*22945688SBharata B Rao #define UV_SVM_TERMINATE		0xF13C
38139a1d28SMichael Anderson 
39a49dddbdSClaudio Carvalho #endif /* _ASM_POWERPC_ULTRAVISOR_API_H */
40