Mercurial > illumos > illumos-gate
comparison usr/src/common/ucode/ucode_utils.c @ 13650:8f838b3f28d2
2546 Support new AMD microcode format, update bundled AMD microcode patch file
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
author | Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> |
---|---|
date | Tue, 27 Mar 2012 13:56:18 -0500 |
parents | b4a19682e632 |
children |
comparison
equal
deleted
inserted
replaced
13649:049724836164 | 13650:8f838b3f28d2 |
---|---|
140 | 140 |
141 /* LINTED: pointer alignment */ | 141 /* LINTED: pointer alignment */ |
142 ptr = (uint32_t *)(((uint8_t *)ptr) + count); | 142 ptr = (uint32_t *)(((uint8_t *)ptr) + count); |
143 size -= count; | 143 size -= count; |
144 | 144 |
145 /* | 145 while (size > 8) { |
146 * minimum valid size: | |
147 * - type and size fields (8 bytes) | |
148 * - patch header (64 bytes) | |
149 * - one patch triad (28 bytes) | |
150 */ | |
151 while (size >= 100) { | |
152 /* microcode patch */ | 146 /* microcode patch */ |
153 size -= 4; | 147 size -= 4; |
154 if (*ptr++ != 1) | 148 if (*ptr++ != 1) |
155 return (EM_FILEFORMAT); | 149 return (EM_FILEFORMAT); |
156 | 150 |
157 size -= 4; | 151 size -= 4; |
158 if (((count = *ptr++) > size) || | 152 if (((count = *ptr++) > size)) |
159 ((count - sizeof (ucode_header_amd_t)) % 28)) | |
160 return (EM_FILEFORMAT); | 153 return (EM_FILEFORMAT); |
161 | 154 |
162 /* LINTED: pointer alignment */ | 155 /* LINTED: pointer alignment */ |
163 ptr = (uint32_t *)(((uint8_t *)ptr) + count); | 156 ptr = (uint32_t *)(((uint8_t *)ptr) + count); |
164 size -= count; | 157 size -= count; |