| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: procfs_machdep.c,v 1.15.2.4 2018/03/16 13:08:14 martin Exp $ */ | | 1 | /* $NetBSD: procfs_machdep.c,v 1.15.2.5 2018/06/09 15:14:49 martin Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2001 Wasabi Systems, Inc. | | 4 | * Copyright (c) 2001 Wasabi Systems, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Written by Frank van der Linden and Jason R. Thorpe for | | 7 | * Written by Frank van der Linden and Jason R. Thorpe for |
8 | * Wasabi Systems, Inc. | | 8 | * Wasabi Systems, Inc. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -32,27 +32,27 @@ | | | @@ -32,27 +32,27 @@ |
32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
36 | * POSSIBILITY OF SUCH DAMAGE. | | 36 | * POSSIBILITY OF SUCH DAMAGE. |
37 | */ | | 37 | */ |
38 | | | 38 | |
39 | /* | | 39 | /* |
40 | * NOTE: We simply use the primary CPU's cpuid_level and tsc_freq | | 40 | * NOTE: We simply use the primary CPU's cpuid_level and tsc_freq |
41 | * here. Might want to change this later. | | 41 | * here. Might want to change this later. |
42 | */ | | 42 | */ |
43 | | | 43 | |
44 | #include <sys/cdefs.h> | | 44 | #include <sys/cdefs.h> |
45 | __KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.4 2018/03/16 13:08:14 martin Exp $"); | | 45 | __KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.5 2018/06/09 15:14:49 martin Exp $"); |
46 | | | 46 | |
47 | #include <sys/param.h> | | 47 | #include <sys/param.h> |
48 | #include <sys/systm.h> | | 48 | #include <sys/systm.h> |
49 | #include <sys/mount.h> | | 49 | #include <sys/mount.h> |
50 | #include <sys/stat.h> | | 50 | #include <sys/stat.h> |
51 | #include <sys/vnode.h> | | 51 | #include <sys/vnode.h> |
52 | | | 52 | |
53 | #include <miscfs/procfs/procfs.h> | | 53 | #include <miscfs/procfs/procfs.h> |
54 | | | 54 | |
55 | #include <machine/cpu.h> | | 55 | #include <machine/cpu.h> |
56 | #include <machine/reg.h> | | 56 | #include <machine/reg.h> |
57 | #include <machine/specialreg.h> | | 57 | #include <machine/specialreg.h> |
58 | #include <x86/cputypes.h> | | 58 | #include <x86/cputypes.h> |
| @@ -180,27 +180,27 @@ static const char * const x86_features[] | | | @@ -180,27 +180,27 @@ static const char * const x86_features[] |
180 | "la57", NULL, NULL, NULL, NULL, NULL, "rdpid", NULL, | | 180 | "la57", NULL, NULL, NULL, NULL, NULL, "rdpid", NULL, |
181 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, | | 181 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
182 | | | 182 | |
183 | { /* (17) 0x80000007 ebx */ | | 183 | { /* (17) 0x80000007 ebx */ |
184 | "overflow_recov", "succor", NULL, "smca", NULL, NULL, NULL, NULL, | | 184 | "overflow_recov", "succor", NULL, "smca", NULL, NULL, NULL, NULL, |
185 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | | 185 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
186 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | | 186 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
187 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, | | 187 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, |
188 | | | 188 | |
189 | { /* (18) Intel 0x00000007 edx */ | | 189 | { /* (18) Intel 0x00000007 edx */ |
190 | NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", NULL, NULL, NULL, NULL, | | 190 | NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", NULL, NULL, NULL, NULL, |
191 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | | 191 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
192 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, | | 192 | NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, |
193 | NULL, NULL, NULL, NULL, NULL, "arch_capabilities", NULL, NULL}, | | 193 | NULL, NULL, NULL, NULL, NULL, "arch_capabilities", NULL, "ssbd"}, |
194 | }; | | 194 | }; |
195 | | | 195 | |
196 | static int procfs_getonecpu(int, struct cpu_info *, char *, size_t *); | | 196 | static int procfs_getonecpu(int, struct cpu_info *, char *, size_t *); |
197 | | | 197 | |
198 | /* | | 198 | /* |
199 | * Linux-style /proc/cpuinfo. | | 199 | * Linux-style /proc/cpuinfo. |
200 | * Only used when procfs is mounted with -o linux. | | 200 | * Only used when procfs is mounted with -o linux. |
201 | * | | 201 | * |
202 | * In the multiprocessor case, this should be a loop over all CPUs. | | 202 | * In the multiprocessor case, this should be a loop over all CPUs. |
203 | */ | | 203 | */ |
204 | int | | 204 | int |
205 | procfs_getcpuinfstr(char *bf, size_t *len) | | 205 | procfs_getcpuinfstr(char *bf, size_t *len) |
206 | { | | 206 | { |