summaryrefslogtreecommitdiff
path: root/usr/src/common/ucode/ucode_utils.c
diff options
context:
space:
mode:
authorHans Rosenfeld <rosenfeld@grumpf.hope-2000.org>2012-03-27 13:56:18 -0500
committerHans Rosenfeld <rosenfeld@grumpf.hope-2000.org>2012-03-27 13:56:18 -0500
commit5e53ed34920bc03b619b50f459f2475e7bf80b6f (patch)
tree03fd67e9b56d0af175bde63a36295a06e34ac805 /usr/src/common/ucode/ucode_utils.c
parent349f51204acd4b8908972b9188c5d6501bf11926 (diff)
downloadillumos-joyent-5e53ed34920bc03b619b50f459f2475e7bf80b6f.tar.gz
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>
Diffstat (limited to 'usr/src/common/ucode/ucode_utils.c')
-rw-r--r--usr/src/common/ucode/ucode_utils.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/usr/src/common/ucode/ucode_utils.c b/usr/src/common/ucode/ucode_utils.c
index 5878f4a4af..7721c5c310 100644
--- a/usr/src/common/ucode/ucode_utils.c
+++ b/usr/src/common/ucode/ucode_utils.c
@@ -142,21 +142,14 @@ ucode_validate_amd(uint8_t *ucodep, int size)
ptr = (uint32_t *)(((uint8_t *)ptr) + count);
size -= count;
- /*
- * minimum valid size:
- * - type and size fields (8 bytes)
- * - patch header (64 bytes)
- * - one patch triad (28 bytes)
- */
- while (size >= 100) {
+ while (size > 8) {
/* microcode patch */
size -= 4;
if (*ptr++ != 1)
return (EM_FILEFORMAT);
size -= 4;
- if (((count = *ptr++) > size) ||
- ((count - sizeof (ucode_header_amd_t)) % 28))
+ if (((count = *ptr++) > size))
return (EM_FILEFORMAT);
/* LINTED: pointer alignment */