Debian Codegraph @

debian/README.source

raw
1 intel-microcode for Debian
2 --------------------------
3
4 Adding new microcodes to the package:
5
6 * Regular microcode bundles (upstream releases):
7
8 Add them to the top-level dir, names must match the patterns:
9
10 * microcode-<id>.dat for Intel text format bundles;
11 * microcode-<id>.bin for Intel binary bundles.
12 * microcode-<id>.d/ for directories with split binary microcode.
13
14 <id> should be the upstream release date in YYYYMMDD format.
15 If it is not, you must make sure microcode files that have
16 been released later also come later in C collating order.
17
18 Some upstream releases contain the microcode update data twice:
19 in .dat, and as a directory with several binary files. In that
20 case, you must compare the contents (e.g. using iucode_tool -L)
21 to ensure that they match. Don't add both copies of the update
22 data to the package: it is a waste of mirror space, and only one
23 copy (the one that sorts last) would be used to generate the
24 final microcode pack (so you would still have to ensure both
25 formats had the same contents anyway).
26
27 Hint: iucode_tool will compare two "supposedly identical"
28 microcodes to ensure they are just that: identical. So, it is
29 enough to do something like this:
30
31 iucode_tool --write-all-named-to=/tmp/dir1 file1.dat ;
32 iucode_tool --write-all-named-to=/tmp/dir2 intel-ucode/ ;
33 diff -R /tmp/dir1 /tmp/dir2 && echo ok ;
34 iucode_tool -v /tmp/dir1 /tmp/dir2
35
36 Later regular microcode bundles have precedence over older regular
37 microcode bundles, and may downgrade microcode revisions. This
38 implements the automatic "revision rollback" mechanism.
39
40 The "oldies" and the IUC_INCLUDE mechanisms of the main Makefile may
41 select microcodes from any of the regular microcode bundles.
42 Otherwise, only microcodes in the latest regular microcode bundle will
43 be selected. This logic implements the "automatic removal" mechanism
44 to handle microcode recalls.
45
46 Directories of microcodes must not have nested subdirectories. The
47 contents of the directory will be processed into a temporary ".dbin"
48 binary microcode file, to allow the automatic "revision rollback"
49 mechanism to work in a predictable way. Due to sorting order,
50 ".dbin" files are preferred over ".dat" files when deciding which
51 would be used to generate the final microcode pack.
52
53 Supplementary microcode bundles and microcode overrides can select
54 additional microcode (see below).
55
56 * Latest available version of a microcode that is not being shipped
57 anymore, but which is present in an older microcode bundle:
58
59 Add "-s <signature>" to IUC_INCLUDE in the Makefile.
60
61 * Supplementary microcode bundles:
62
63 The intended usage for this feature is to ship microcode updates that
64 fix important errata before they are available through a regular Intel
65 microcode bundle release.
66
67 Add them to the top-level dir, names must match the pattern:
68
69 * supplementary-ucode-<id>.bin
70 * supplementary-ucode-<id>.d/
71
72 <id> should be a descriptive name, sorting order does not
73 matter. It must not have spaces or tabs.
74
75 These bundles have the same precedence as the newest regular microcode
76 bundle: microcodes with the highest revision among the newest regular
77 microcode bundle and every supplementary microcode bundles will be
78 selected.
79
80 Supplementary microcode bundles must be in binary format.
81
82 Use "iucode_tool -w" to create supplementary microcode bundles.
83 The bundles may have any number of microcodes inside, and should be
84 described in the "upstream" changelog.
85
86 Directories of supplementary microcode updates must not have nested
87 subdirectories. The data files inside the directory should be in
88 binary format, and may contain more than one microcode update. They
89 should be descriptively named, and should be described in the
90 "upstream" changelog.
91
92 WARNING: microcodes added through supplementary bundles cannot be
93 "recalled" (excluded or downgraded) automatically by the latest
94 regular microcode bundle, only by overrides and IUC_EXCLUDE.
95
96 * Individual microcode overrides (at a specific revision):
97
98 The intended usage for this feature is to ship microcode at a specific
99 revision. For microcode that should be superseded by a newer version
100 when available, use a supplementary bundle (see above), instead.
101
102 These overrides have the highest precedence, and will override
103 (possibly downgrading) microcodes in the other bundles, regular or
104 supplementary.
105
106 Add them to the top-level dir, names should be in the format:
107
108 * s<sig>_m<pfmask>_r<revision>.fw
109
110 <sig> is the CPU signature, <pfmask> is the processor flags
111 mask, and revision is the microcode revision level. All
112 values in hexadecimal using uppercase letters, no leading
113 prefixes, with left padding with zeroes, field length 8, as
114 in the printf mask: s%08X_m%08X_r%08X.fw
115
116 The files must be in binary format, and should contain only a single
117 microcode (to ensure maintainer sanity).
118
119 "iucode_tool -s <signature> -W" can be used to easily extract
120 microcodes and create (and name) .fw override files.
121
122 * Excluding microcodes, no matter where they were sourced from:
123
124 Add "-s !<signature>" to IUC_EXCLUDE in the Makefile.
125
126 This will remove from the final microcode distribution even microcodes
127 that were sourced from override files.
128
129
130
131 When you add a new microcode (bundle or otherwise):
132
133 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
134 !!! Always verify if you do not have to remove microcodes from the !!!
135 !!! exclusion list in the top Makefile. !!!
136 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
137
138 Please avoid shipping microcodes "recalled" by Intel, unless you DO know
139 better (i.e. you know the reason why it was "recalled", and you consider
140 that Debian users would be best served by its inclusion). Always
141 document why you're doing this as much as you are allowed to in the
142 package changelog. Microcode override files (.fw files) can be used to
143 make sure a specific microcode is shipped, however, should you want to
144 ship the latest available version of a microcode from older bundles, you
145 must use IUC_INCLUDE.
146
147 If you are adding a microcode bundle made available directly by Intel in
148 their public site, please update the "upstream changelog". There is no
149 fully automated way to do it yet, but you can use "iucode_tool -l" to
150 list the contents of the bundles, and apply some sed magic, sort, and
151 "diff -u" to find out which microcodes were added, deleted, updated, or
152 downgraded. The debian/diff-latest-pack.sh script should be of help.
153
154 Please check all additions against the changelog, and annotate them as
155 appropriate when the microcode was present in a previous release. Intel
156 has done a "delete in one release, add back with a downgraded revision
157 in the next release" once in the past. Annotations should say when the
158 microcode was updated or downgraded, or just re-added with the same
159 revision.
160
161 Please check all deletions. When very recent microcode is deleted, it
162 could well mean an unfriendly "microcode revision recall" is happening
163 (someone at Intel decided to remove it instead of directly marking it a
164 downgrade by publishing the previously known-good revision). When
165 microcodes for older processors are deleted, it is probably safe to
166 assume it is just the regular housekeeping cleanups, and the microcode
167 should still be shipped by distros that have users running 10-15
168 year-old boxes, like Debian.
169
170 If you know that a microcode signature belongs to alpha or beta hardware
171 (engineering samples), you may remove the microcodes for that signature
172 by adding them to IUC_EXCLUDE in the Makefile, on the grounds that such
173 microcodes just waste space on everyone's system. Unfortunately, a list
174 of the CPU signatures of such unsupported processors is hard to come by.
175
176
177 Keeping useless microcode out of amd64 and x32 binary packages:
178
179 It is useless to ship microcode that targets processors not capable of
180 Intel64 (X86-64) on the amd64 and x32 arch-specific binary packages.
181
182 The top-level Makefile tries to avoid this by parsing cpu-signatures.txt
183 and ignoring anything listed as i?86 when building intel-microcode-64.bin,
184 which debian/rules will use instead of intel-microcode.bin for non-i386.
185
186 Failure to update cpu-signatures.txt should be mostly harmless (it is
187 engineered to fail safe, and distribute unlisted microcode so that at
188 most it will waste some space). It is unlikely that new i686 microcode
189 signatures will show up, but it may be useful to know to which
190 processors a microcode update apply even for newer processors, just in
191 case we have to issue a critical update and warn users.
192
193
194 Where to find processor signature information:
195
196 They appear to be listed only in the Specification Updates for each
197 processor, you'll have to locate and download them all from Intel's site
198 (this is _not_ easy to do, some of these documents are hard to track
199 down). Better information is likely to available (possibly under NDA)
200 on the Intel developer channels.
201
202 As for non-canonical sources, there is a CPUID database in the Internet
203 and a memory/latency timings database used by HPC people which are of
204 some help. Search engines will often find a BIOS/UEFI firmware upgrade
205 changelog that names the particular core of a microcode update
206 signature.
207
208 Cross-check by searching the S-SPEC numbers in the Intel ARK directory
209 (e.g. to verify whether it supports X86-64 or not).
210
211
212 Backport notes:
213
214 1. Only kernels 3.10 and above are supported in the 3.x branch of
215 intel-microcode. To support older kernels, you will have to backport
216 the 2.x or 1.x branches of intel-microcode, instead.
217
218 -- Henrique de Moraes Holschuh <[email protected]>