Mercurial > illumos > illumos-gate
diff 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 |
line wrap: on
line diff
--- a/usr/src/common/ucode/ucode_utils.c Tue Jun 21 03:21:18 2011 -0700 +++ b/usr/src/common/ucode/ucode_utils.c Tue Mar 27 13:56:18 2012 -0500 @@ -142,21 +142,14 @@ 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 */