| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: errata.c,v 1.27 2021/10/07 12:52:27 msaitoh Exp $ */ | | 1 | /* $NetBSD: errata.c,v 1.28 2023/07/24 22:20:53 riastradh Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Andrew Doran. | | 8 | * by Andrew Doran. |
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. |
| @@ -31,31 +31,33 @@ | | | @@ -31,31 +31,33 @@ |
31 | | | 31 | |
32 | /* | | 32 | /* |
33 | * Detect, report on, and work around known errata with x86 CPUs. | | 33 | * Detect, report on, and work around known errata with x86 CPUs. |
34 | * | | 34 | * |
35 | * This currently only handles AMD CPUs, and is generalised because | | 35 | * This currently only handles AMD CPUs, and is generalised because |
36 | * there are quite a few problems that the BIOS can patch via MSR, | | 36 | * there are quite a few problems that the BIOS can patch via MSR, |
37 | * but it is not known if the OS can patch these yet. The list is | | 37 | * but it is not known if the OS can patch these yet. The list is |
38 | * expected to grow over time. | | 38 | * expected to grow over time. |
39 | * | | 39 | * |
40 | * The data here are from: Revision Guide for AMD Athlon 64 and | | 40 | * The data here are from: Revision Guide for AMD Athlon 64 and |
41 | * AMD Opteron Processors, Publication #25759, Revision: 3.69, | | 41 | * AMD Opteron Processors, Publication #25759, Revision: 3.69, |
42 | * Issue Date: September 2006 | | 42 | * Issue Date: September 2006 |
43 | * | | 43 | * |
| | | 44 | * https://www.amd.com/system/files/TechDocs/25759.pdf |
| | | 45 | * |
44 | * XXX This should perhaps be integrated with the identcpu code. | | 46 | * XXX This should perhaps be integrated with the identcpu code. |
45 | */ | | 47 | */ |
46 | | | 48 | |
47 | #include <sys/cdefs.h> | | 49 | #include <sys/cdefs.h> |
48 | __KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.27 2021/10/07 12:52:27 msaitoh Exp $"); | | 50 | __KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.28 2023/07/24 22:20:53 riastradh Exp $"); |
49 | | | 51 | |
50 | #include <sys/types.h> | | 52 | #include <sys/types.h> |
51 | #include <sys/systm.h> | | 53 | #include <sys/systm.h> |
52 | | | 54 | |
53 | #include <machine/cpu.h> | | 55 | #include <machine/cpu.h> |
54 | #include <machine/cpufunc.h> | | 56 | #include <machine/cpufunc.h> |
55 | #include <machine/specialreg.h> | | 57 | #include <machine/specialreg.h> |
56 | | | 58 | |
57 | #include <x86/cpuvar.h> | | 59 | #include <x86/cpuvar.h> |
58 | #include <x86/cputypes.h> | | 60 | #include <x86/cputypes.h> |
59 | | | 61 | |
60 | typedef struct errata { | | 62 | typedef struct errata { |
61 | u_short e_num; | | 63 | u_short e_num; |