[coreboot-gerrit] New patch to review for coreboot: ef5f21a cpu/amd: Remove error messages on non-matching microcode patches

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Thu Dec 12 09:33:53 CET 2013


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4520

-gerrit

commit ef5f21a3f63e7a1bf0bdc0b017baa3bb30ed64d4
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Thu Dec 12 06:53:05 2013 +0200

    cpu/amd: Remove error messages on non-matching microcode patches
    
    Microcode update file contains patches for various processor
    revisions, it is not an error to have those.
    
    Change-Id: Ifbca26276b66f17092afe249a2cfc229713a9fec
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/cpu/amd/microcode/microcode.c | 28 +---------------------------
 1 file changed, 1 insertion(+), 27 deletions(-)

diff --git a/src/cpu/amd/microcode/microcode.c b/src/cpu/amd/microcode/microcode.c
index 46d814e..cdc6e4a 100644
--- a/src/cpu/amd/microcode/microcode.c
+++ b/src/cpu/amd/microcode/microcode.c
@@ -51,32 +51,6 @@ struct microcode {
 	u8 x86_code_entry[191];
 };
 
-static int need_apply_patch(struct microcode *m, u32 equivalent_processor_rev_id)
-{
-
-	if (m->processor_rev_id != equivalent_processor_rev_id) {
-		printk(BIOS_ERR, "microcode: rev id (%x) does not match this patch.\n", m->processor_rev_id);
-		printk(BIOS_ERR, "microcode: Not updated! Fix microcode_updates[] \n");
-		return 0;
-	}
-	if (m->nb_dev_id) {
-		  //look at the device id, if not found return;
-		  //if(m->nb_rev_id != installed_nb_rev_id) return 0;
-	}
-
-	if (m->ht_io_hub_dev_id) {
-		  //look at the device id, if not found return;
-		  //if(m->ht_io_hub_rev_id != installed_ht_io_bub_rev_id) return 0;
-	}
-
-	if (m->x86_code_present) {
-		  //if(!x86_code_execute()) return 0;
-	}
-
-	return 1;
-}
-
-
 void amd_update_microcode(void *microcode_updates, u32 equivalent_processor_rev_id)
 {
 	u32 patch_id, new_patch_id;
@@ -93,7 +67,7 @@ void amd_update_microcode(void *microcode_updates, u32 equivalent_processor_rev_
 
 	for(c = microcode_updates; m->date_code;  m = (struct microcode *)c) {
 
-		if( need_apply_patch(m, equivalent_processor_rev_id) ) {
+		if (m->processor_rev_id == equivalent_processor_rev_id) {
 			//apply patch
 
 			msr.hi = 0;



More information about the coreboot-gerrit mailing list