hypervisor.h revision 1.1.2.2 1 1.1.2.2 pgoyette /* $NetBSD: hypervisor.h,v 1.1.2.2 2018/04/07 04:12:11 pgoyette Exp $ */
2 1.1.2.2 pgoyette /*-
3 1.1.2.2 pgoyette * Copyright (c) 2013, 2014 Andrew Turner
4 1.1.2.2 pgoyette * All rights reserved.
5 1.1.2.2 pgoyette *
6 1.1.2.2 pgoyette * Redistribution and use in source and binary forms, with or without
7 1.1.2.2 pgoyette * modification, are permitted provided that the following conditions
8 1.1.2.2 pgoyette * are met:
9 1.1.2.2 pgoyette * 1. Redistributions of source code must retain the above copyright
10 1.1.2.2 pgoyette * notice, this list of conditions and the following disclaimer.
11 1.1.2.2 pgoyette * 2. Redistributions in binary form must reproduce the above copyright
12 1.1.2.2 pgoyette * notice, this list of conditions and the following disclaimer in the
13 1.1.2.2 pgoyette * documentation and/or other materials provided with the distribution.
14 1.1.2.2 pgoyette *
15 1.1.2.2 pgoyette * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 1.1.2.2 pgoyette * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 1.1.2.2 pgoyette * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 1.1.2.2 pgoyette * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 1.1.2.2 pgoyette * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 1.1.2.2 pgoyette * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 1.1.2.2 pgoyette * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 1.1.2.2 pgoyette * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 1.1.2.2 pgoyette * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 1.1.2.2 pgoyette * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 1.1.2.2 pgoyette * SUCH DAMAGE.
26 1.1.2.2 pgoyette *
27 1.1.2.2 pgoyette * $FreeBSD: head/sys/arm64/include/hypervisor.h 281494 2015-04-13 14:43:10Z andrew $
28 1.1.2.2 pgoyette */
29 1.1.2.2 pgoyette
30 1.1.2.2 pgoyette #ifndef _MACHINE_HYPERVISOR_H_
31 1.1.2.2 pgoyette #define _MACHINE_HYPERVISOR_H_
32 1.1.2.2 pgoyette
33 1.1.2.2 pgoyette /*
34 1.1.2.2 pgoyette * These registers are only useful when in hypervisor context,
35 1.1.2.2 pgoyette * e.g. specific to EL2, or controlling the hypervisor.
36 1.1.2.2 pgoyette */
37 1.1.2.2 pgoyette
38 1.1.2.2 pgoyette /*
39 1.1.2.2 pgoyette * Architecture feature trap register
40 1.1.2.2 pgoyette */
41 1.1.2.2 pgoyette #define CPTR_RES0 0x7fefc800
42 1.1.2.2 pgoyette #define CPTR_RES1 0x000033ff
43 1.1.2.2 pgoyette #define CPTR_TFP 0x00000400
44 1.1.2.2 pgoyette #define CPTR_TTA 0x00100000
45 1.1.2.2 pgoyette #define CPTR_TCPAC 0x80000000
46 1.1.2.2 pgoyette
47 1.1.2.2 pgoyette /*
48 1.1.2.2 pgoyette * Hypervisor Config Register
49 1.1.2.2 pgoyette */
50 1.1.2.2 pgoyette
51 1.1.2.2 pgoyette #define HCR_VM 0x0000000000000001
52 1.1.2.2 pgoyette #define HCR_SWIO 0x0000000000000002
53 1.1.2.2 pgoyette #define HCR_PTW 0x0000000000000004
54 1.1.2.2 pgoyette #define HCR_FMO 0x0000000000000008
55 1.1.2.2 pgoyette #define HCR_IMO 0x0000000000000010
56 1.1.2.2 pgoyette #define HCR_AMO 0x0000000000000020
57 1.1.2.2 pgoyette #define HCR_VF 0x0000000000000040
58 1.1.2.2 pgoyette #define HCR_VI 0x0000000000000080
59 1.1.2.2 pgoyette #define HCR_VSE 0x0000000000000100
60 1.1.2.2 pgoyette #define HCR_FB 0x0000000000000200
61 1.1.2.2 pgoyette #define HCR_BSU_MASK 0x0000000000000c00
62 1.1.2.2 pgoyette #define HCR_DC 0x0000000000001000
63 1.1.2.2 pgoyette #define HCR_TWI 0x0000000000002000
64 1.1.2.2 pgoyette #define HCR_TWE 0x0000000000004000
65 1.1.2.2 pgoyette #define HCR_TID0 0x0000000000008000
66 1.1.2.2 pgoyette #define HCR_TID1 0x0000000000010000
67 1.1.2.2 pgoyette #define HCR_TID2 0x0000000000020000
68 1.1.2.2 pgoyette #define HCR_TID3 0x0000000000040000
69 1.1.2.2 pgoyette #define HCR_TSC 0x0000000000080000
70 1.1.2.2 pgoyette #define HCR_TIDCP 0x0000000000100000
71 1.1.2.2 pgoyette #define HCR_TACR 0x0000000000200000
72 1.1.2.2 pgoyette #define HCR_TSW 0x0000000000400000
73 1.1.2.2 pgoyette #define HCR_TPC 0x0000000000800000
74 1.1.2.2 pgoyette #define HCR_TPU 0x0000000001000000
75 1.1.2.2 pgoyette #define HCR_TTLB 0x0000000002000000
76 1.1.2.2 pgoyette #define HCR_TVM 0x0000000004000000
77 1.1.2.2 pgoyette #define HCR_TGE 0x0000000008000000
78 1.1.2.2 pgoyette #define HCR_TDZ 0x0000000010000000
79 1.1.2.2 pgoyette #define HCR_HCD 0x0000000020000000
80 1.1.2.2 pgoyette #define HCR_TRVM 0x0000000040000000
81 1.1.2.2 pgoyette #define HCR_RW 0x0000000080000000
82 1.1.2.2 pgoyette #define HCR_CD 0x0000000100000000
83 1.1.2.2 pgoyette #define HCR_ID 0x0000000200000000
84 1.1.2.2 pgoyette
85 1.1.2.2 pgoyette #endif
86 1.1.2.2 pgoyette
87