From 5e53ed34920bc03b619b50f459f2475e7bf80b6f Mon Sep 17 00:00:00 2001 From: Hans Rosenfeld Date: Tue, 27 Mar 2012 13:56:18 -0500 Subject: 2546 Support new AMD microcode format, update bundled AMD microcode patch file Reviewed by: Gordon Ross Reviewed by: Garrett D'Amore Reviewed by: Albert Lee Approved by: Richard Lowe --- usr/src/common/ucode/ucode_utils.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'usr/src/common/ucode/ucode_utils.c') 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 */ -- cgit v1.2.3