head 1.4; access; symbols netbsd-10-2-RELEASE:1.3 netbsd-9-5-RELEASE:1.1 netbsd-11-0-RELEASE:1.3 netbsd-11-0-RC7:1.3 netbsd-11-0-RC6:1.3 netbsd-11-0-RC5:1.3 netbsd-11-0-RC4:1.3 netbsd-11-0-RC3:1.3 netbsd-11-0-RC2:1.3 netbsd-11-0-RC1:1.3 perseant-exfatfs-base-20250801:1.3 netbsd-11:1.3.0.12 netbsd-11-base:1.3 netbsd-10-1-RELEASE:1.3 perseant-exfatfs-base-20240630:1.3 perseant-exfatfs:1.3.0.10 perseant-exfatfs-base:1.3 netbsd-9-4-RELEASE:1.1 netbsd-10-0-RELEASE:1.3 netbsd-10-0-RC6:1.3 netbsd-10-0-RC5:1.3 netbsd-10-0-RC4:1.3 netbsd-10-0-RC3:1.3 netbsd-10-0-RC2:1.3 thorpej-ifq:1.3.0.8 thorpej-ifq-base:1.3 thorpej-altq-separation:1.3.0.6 thorpej-altq-separation-base:1.3 netbsd-10-0-RC1:1.3 netbsd-10:1.3.0.4 netbsd-10-base:1.3 bouyer-sunxi-drm:1.3.0.2 bouyer-sunxi-drm-base:1.3 netbsd-9-3-RELEASE:1.1 thorpej-i2c-spi-conf2:1.2.0.16 thorpej-i2c-spi-conf2-base:1.2 thorpej-futex2:1.2.0.14 thorpej-futex2-base:1.2 thorpej-cfargs2:1.2.0.12 thorpej-cfargs2-base:1.2 cjep_sun2x-base1:1.2 cjep_sun2x:1.2.0.10 cjep_sun2x-base:1.2 cjep_staticlib_x-base1:1.2 netbsd-9-2-RELEASE:1.1 cjep_staticlib_x:1.2.0.8 cjep_staticlib_x-base:1.2 thorpej-i2c-spi-conf:1.2.0.6 thorpej-i2c-spi-conf-base:1.2 thorpej-cfargs:1.2.0.4 thorpej-cfargs-base:1.2 thorpej-futex:1.2.0.2 thorpej-futex-base:1.2 netbsd-9-1-RELEASE:1.1 bouyer-xenpvh-base2:1.1 phil-wifi-20200421:1.1 bouyer-xenpvh-base1:1.1 phil-wifi-20200411:1.1 bouyer-xenpvh:1.1.0.14 bouyer-xenpvh-base:1.1 is-mlppp:1.1.0.12 is-mlppp-base:1.1 phil-wifi-20200406:1.1 ad-namecache-base3:1.1 netbsd-9-0-RELEASE:1.1 netbsd-9-0-RC2:1.1 ad-namecache-base2:1.1 ad-namecache-base1:1.1 ad-namecache:1.1.0.10 ad-namecache-base:1.1 netbsd-9-0-RC1:1.1 phil-wifi-20191119:1.1 netbsd-9:1.1.0.8 netbsd-9-base:1.1 phil-wifi-20190609:1.1 isaki-audio2:1.1.0.6 isaki-audio2-base:1.1 pgoyette-compat-merge-20190127:1.1.2.2 pgoyette-compat-20190127:1.1 pgoyette-compat-20190118:1.1 pgoyette-compat-1226:1.1 pgoyette-compat-1126:1.1 pgoyette-compat-1020:1.1 pgoyette-compat-0930:1.1 pgoyette-compat-0906:1.1 pgoyette-compat-0728:1.1 phil-wifi:1.1.0.4 phil-wifi-base:1.1 pgoyette-compat-0625:1.1 pgoyette-compat-0521:1.1 pgoyette-compat-0502:1.1 pgoyette-compat-0422:1.1 pgoyette-compat-0415:1.1 pgoyette-compat:1.1.0.2 pgoyette-compat-0407:1.1; locks; strict; comment @ * @; 1.4 date 2026.09.09.06.04.56; author skrll; state dead; branches; next 1.3; commitid wsvG28Ytw9f6uUUG; 1.3 date 2021.08.30.22.32.06; author jmcneill; state Exp; branches; next 1.2; commitid EbE4KiYfKGsPX27D; 1.2 date 2020.08.29.07.17.23; author maxv; state Exp; branches; next 1.1; commitid tdK0KJ6U9CWpFVlC; 1.1 date 2018.04.01.04.35.03; author ryo; state Exp; branches 1.1.2.1; next ; commitid Rbo0y8tEIcKr5HwA; 1.1.2.1 date 2018.04.01.04.35.03; author pgoyette; state dead; branches; next 1.1.2.2; commitid ZMkKSYuBapz7LsxA; 1.1.2.2 date 2018.04.07.04.12.11; author pgoyette; state Exp; branches; next ; commitid ZMkKSYuBapz7LsxA; desc @@ 1.4 log @aarch64: Remove hypervisor.h and replace with armreg.h defines The previous value of the RES1 bits in CPTR_EL2 in non-VHE mode was even wrong. @ text @/* $NetBSD: hypervisor.h,v 1.3 2021/08/30 22:32:06 jmcneill Exp $ */ /*- * Copyright (c) 2013, 2014 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD: head/sys/arm64/include/hypervisor.h 281494 2015-04-13 14:43:10Z andrew $ */ #ifndef _MACHINE_HYPERVISOR_H_ #define _MACHINE_HYPERVISOR_H_ /* * These registers are only useful when in hypervisor context, * e.g. specific to EL2, or controlling the hypervisor. */ /* * Architectural Feature Trap Register (CPTR_EL2) */ #define CPTR_RES0 0x7fefc800 #define CPTR_RES1 0x000033ff #define CPTR_TFP 0x00000400 #define CPTR_TTA 0x00100000 #define CPTR_TAM 0x40000000 #define CPTR_TCPAC 0x80000000 /* * Hypervisor Configuration Register (HCR_EL2) */ #define HCR_VM 0x0000000000000001 #define HCR_SWIO 0x0000000000000002 #define HCR_PTW 0x0000000000000004 #define HCR_FMO 0x0000000000000008 #define HCR_IMO 0x0000000000000010 #define HCR_AMO 0x0000000000000020 #define HCR_VF 0x0000000000000040 #define HCR_VI 0x0000000000000080 #define HCR_VSE 0x0000000000000100 #define HCR_FB 0x0000000000000200 #define HCR_BSU_MASK 0x0000000000000c00 #define HCR_DC 0x0000000000001000 #define HCR_TWI 0x0000000000002000 #define HCR_TWE 0x0000000000004000 #define HCR_TID0 0x0000000000008000 #define HCR_TID1 0x0000000000010000 #define HCR_TID2 0x0000000000020000 #define HCR_TID3 0x0000000000040000 #define HCR_TSC 0x0000000000080000 #define HCR_TIDCP 0x0000000000100000 #define HCR_TACR 0x0000000000200000 #define HCR_TSW 0x0000000000400000 #define HCR_TPC 0x0000000000800000 #define HCR_TPU 0x0000000001000000 #define HCR_TTLB 0x0000000002000000 #define HCR_TVM 0x0000000004000000 #define HCR_TGE 0x0000000008000000 #define HCR_TDZ 0x0000000010000000 #define HCR_HCD 0x0000000020000000 #define HCR_TRVM 0x0000000040000000 #define HCR_RW 0x0000000080000000 #define HCR_CD 0x0000000100000000 #define HCR_ID 0x0000000200000000 #define HCR_E2H 0x0000000400000000 #define HCR_ATA 0x0100000000000000 /* * Hypervisor System Trap Register (HSTR_EL2) */ #define HSTR_T(n) (1 << (n)) #endif @ 1.3 log @Add definition for HCR_E2H bit @ text @d1 1 a1 1 /* $NetBSD: hypervisor.h,v 1.2 2020/08/29 07:17:23 maxv Exp $ */ @ 1.2 log @Slightly clarify, and style. @ text @d1 1 a1 1 /* $NetBSD: hypervisor.h,v 1.1 2018/04/01 04:35:03 ryo Exp $ */ d84 1 @ 1.1 log @Add initial support for ARMv8 (AARCH64) (by nisimura@@ and ryo@@) - sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@@) - add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@@, jmcneill@@) @ text @d1 1 a1 1 /* $NetBSD$ */ d39 1 a39 1 * Architecture feature trap register d45 1 d49 1 a49 1 * Hypervisor Config Register a50 1 d84 6 @ 1.1.2.1 log @file hypervisor.h was added on branch pgoyette-compat on 2018-04-07 04:12:11 +0000 @ text @d1 86 @ 1.1.2.2 log @Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$ @ text @a0 86 /* $NetBSD: hypervisor.h,v 1.1 2018/04/01 04:35:03 ryo Exp $ */ /*- * Copyright (c) 2013, 2014 Andrew Turner * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD: head/sys/arm64/include/hypervisor.h 281494 2015-04-13 14:43:10Z andrew $ */ #ifndef _MACHINE_HYPERVISOR_H_ #define _MACHINE_HYPERVISOR_H_ /* * These registers are only useful when in hypervisor context, * e.g. specific to EL2, or controlling the hypervisor. */ /* * Architecture feature trap register */ #define CPTR_RES0 0x7fefc800 #define CPTR_RES1 0x000033ff #define CPTR_TFP 0x00000400 #define CPTR_TTA 0x00100000 #define CPTR_TCPAC 0x80000000 /* * Hypervisor Config Register */ #define HCR_VM 0x0000000000000001 #define HCR_SWIO 0x0000000000000002 #define HCR_PTW 0x0000000000000004 #define HCR_FMO 0x0000000000000008 #define HCR_IMO 0x0000000000000010 #define HCR_AMO 0x0000000000000020 #define HCR_VF 0x0000000000000040 #define HCR_VI 0x0000000000000080 #define HCR_VSE 0x0000000000000100 #define HCR_FB 0x0000000000000200 #define HCR_BSU_MASK 0x0000000000000c00 #define HCR_DC 0x0000000000001000 #define HCR_TWI 0x0000000000002000 #define HCR_TWE 0x0000000000004000 #define HCR_TID0 0x0000000000008000 #define HCR_TID1 0x0000000000010000 #define HCR_TID2 0x0000000000020000 #define HCR_TID3 0x0000000000040000 #define HCR_TSC 0x0000000000080000 #define HCR_TIDCP 0x0000000000100000 #define HCR_TACR 0x0000000000200000 #define HCR_TSW 0x0000000000400000 #define HCR_TPC 0x0000000000800000 #define HCR_TPU 0x0000000001000000 #define HCR_TTLB 0x0000000002000000 #define HCR_TVM 0x0000000004000000 #define HCR_TGE 0x0000000008000000 #define HCR_TDZ 0x0000000010000000 #define HCR_HCD 0x0000000020000000 #define HCR_TRVM 0x0000000040000000 #define HCR_RW 0x0000000080000000 #define HCR_CD 0x0000000100000000 #define HCR_ID 0x0000000200000000 #endif @