diff -uNr freebios2.08152005/src/cpu/amd/microcode/Config.lb freebios2/src/cpu/amd/microcode/Config.lb
--- freebios2.08152005/src/cpu/amd/microcode/Config.lb	1969-12-31 16:00:00.000000000 -0800
+++ freebios2/src/cpu/amd/microcode/Config.lb	2004-10-14 12:29:23.000000000 -0700
@@ -0,0 +1 @@
+object microcode.o
\ No newline at end of file
diff -uNr freebios2.08152005/src/cpu/amd/microcode/microcode.c freebios2/src/cpu/amd/microcode/microcode.c
--- freebios2.08152005/src/cpu/amd/microcode/microcode.c	1969-12-31 16:00:00.000000000 -0800
+++ freebios2/src/cpu/amd/microcode/microcode.c	2005-10-07 09:33:46.000000000 -0700
@@ -0,0 +1,136 @@
+/*============================================================================
+Copyright 2005 ADVANCED MICRO DEVICES, INC. All Rights Reserved.
+This software and any related documentation (the "Materials") are the
+confidential proprietary information of AMD. Unless otherwise provided in a
+software agreement specifically licensing the Materials, the Materials are
+provided in confidence and may not be distributed, modified, or reproduced in
+whole or in part by any means.
+LIMITATION OF LIABILITY: THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY
+EXPRESS OR IMPLIED WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO
+WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, TITLE, FITNESS FOR ANY
+PARTICULAR PURPOSE, OR WARRANTIES ARISING FROM CONDUCT, COURSE OF DEALING, OR
+USAGE OF TRADE. IN NO EVENT SHALL AMD OR ITS LICENSORS BE LIABLE FOR ANY
+DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS,
+BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OF OR
+INABILITY TO USE THE MATERIALS, EVEN IF AMD HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS PROHIBIT THE EXCLUSION
+OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE
+LIMITATION MAY NOT APPLY TO YOU.
+AMD does not assume any responsibility for any errors which may appear in the
+Materials nor any responsibility to support or update the Materials. AMD
+retains the right to modify the Materials at any time, without notice, and is
+not obligated to provide such modified Materials to you.
+NO SUPPORT OBLIGATION: AMD is not obligated to furnish, support, or make any
+further information, software, technical information, know-how, or show-how
+available to you.
+U.S. GOVERNMENT RESTRICTED RIGHTS: The Materials are provided with "RESTRICTED
+RIGHTS." Use, duplication, or disclosure by the Government is subject to the
+restrictions as set forth in FAR 52.227-14 and DFAR 252.227-7013, et seq., or
+its successor. Use of the Materials by the Government constitutes
+acknowledgement of AMD's proprietary rights in them.
+============================================================================*/
+//@DOC
+// microcode.c
+/*
+$1.0$
+*/
+// Description: microcode patch support for k8
+// by yhlu
+//
+//============================================================================
+#include <stdint.h>
+#include <console/console.h>
+#include <cpu/cpu.h>
+#include <cpu/x86/msr.h>
+#include <cpu/amd/microcode.h>
+#include <cpu/x86/cache.h>
+
+struct microcode {
+	uint32_t date_code;
+	uint32_t patch_id;
+
+	uint16_t m_patch_data_id;
+	uint8_t m_patch_data_len;
+	uint8_t init_flag;
+	
+	uint32_t m_patch_data_cksum;
+	
+	uint32_t nb_dev_id;
+	uint32_t ht_io_hub_dev_id;
+
+	uint16_t processor_rev_id;
+	uint8_t ht_io_hub_rev_id;
+	uint8_t nb_rev_id;
+
+	uint8_t bios_api_rev;
+	uint8_t resv1[3];
+
+	uint32_t match_reg[8];
+
+	uint8_t m_patch_data[896];
+	uint8_t resv2[896];
+	
+	uint8_t x86_code_present;
+	uint8_t x86_code_entry[191];
+};
+
+static int need_apply_patch(struct microcode *m, unsigned equivalent_processor_rev_id)
+{
+
+        if (m->processor_rev_id != equivalent_processor_rev_id) 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, unsigned equivalent_processor_rev_id)
+{
+	unsigned int patch_id, new_patch_id;
+	struct microcode *m;
+	char *c;
+	msr_t msr;
+	
+	msr = rdmsr(0x8b);
+	patch_id = msr.lo;
+
+	printk_debug("microcode: equivalent processor rev id  = 0x%04x, patch id = 0x%08x\n", equivalent_processor_rev_id, patch_id);
+
+	m = microcode_updates;
+
+	for(c = microcode_updates; m->date_code;  m = (struct microcode *)c) {
+
+		if( need_apply_patch(m, equivalent_processor_rev_id) ) {
+			//apply patch
+
+			msr.hi = 0;
+			msr.lo = (uint32_t)m;
+
+			wrmsr(0xc0010020, msr);
+
+			printk_debug("microcode: patch id that want to apply= 0x%08x\n", m->patch_id);
+
+                        //read the patch_id again
+                        msr = rdmsr(0x8b);
+                        new_patch_id = msr.lo;
+
+			printk_debug("microcode: updated to patch id = 0x%08x %s\r\n", new_patch_id , (new_patch_id == m->patch_id)?" success":" fail" );
+			break;
+		}
+		c += 2048;
+	}
+
+}
diff -uNr freebios2.08152005/src/cpu/amd/model_fxx/Config.lb freebios2/src/cpu/amd/model_fxx/Config.lb
--- freebios2.08152005/src/cpu/amd/model_fxx/Config.lb	2004-12-07 15:47:42.000000000 -0800
+++ freebios2/src/cpu/amd/model_fxx/Config.lb	2005-08-26 23:18:56.000000000 -0700
@@ -11,5 +11,6 @@
 dir /cpu/x86/pae
 dir /cpu/amd/mtrr
 dir /cpu/amd/dualcore
+dir /cpu/amd/microcode
 driver model_fxx_init.o
 object apic_timer.o
diff -uNr freebios2.08152005/src/cpu/amd/model_fxx/microcode_rev_c.h freebios2/src/cpu/amd/model_fxx/microcode_rev_c.h
--- freebios2.08152005/src/cpu/amd/model_fxx/microcode_rev_c.h	1969-12-31 16:00:00.000000000 -0800
+++ freebios2/src/cpu/amd/model_fxx/microcode_rev_c.h	2005-10-07 09:28:34.000000000 -0700
@@ -0,0 +1,149 @@
+/*
+ ============================================================
+ (c) Advanced Micro Devices, Inc., 2004-2005
+
+ The  enclosed microcode  is intended  to be  used  with AMD
+ Microprocessors.  You  may   copy,  view  and  install  the
+ enclosed microcode  only for development  and deployment of
+ firmware,  BIOS,  or  operating  system code  for  computer
+ systems   that  contain  AMD   processors.   You   are  not
+ authorized  to use  the  enclosed microcode  for any  other
+ purpose.
+
+ THE  MICROCODE IS PROVIDED  "AS IS"  WITHOUT ANY  EXPRESS OR
+ IMPLIED WARRANTY  OF ANY KIND, INCLUDING BUT  NOT LIMITED TO
+ WARRANTIES    OF    MERCHANTABILITY,   NON-    INFRINGEMENT,
+ TITLE,FITNESS  FOR  ANY  PARTICULAR PURPOSE,  OR  WARRANTIES
+ ARISING FROM CONDUCT, COURSE  OF DEALING, OR USAGE OF TRADE.
+ AMD does not assume  any responsibility for any errors which
+ may  appear   in  this   microcode  or  any   other  related
+ information provided  to you by  AMD, or result from  use of
+ this microcode.   AMD is not obligated  to furnish, support,
+ or  make   any  further  information,   software,  technical
+ information, know-how, or show-how available related to this
+ microcode.
+
+ The  microcode is provided  with "RESTRICTED  RIGHTS."  Use,
+ duplication, or disclosure by the U.S. Government is subject
+ to  the  restrictions as  set  forth  in  FAR 52.227-14  and
+ DFAR252.227-7013,  et seq.,  or its  successor.  Use  of the
+ microcode    by    the    U.S.     Government    constitutes
+ acknowledgement  of   AMD's  proprietary  rights   in  them.
+ ============================================================
+*/
+
+/*   Microcode patch for Cx provessors that fixes Errata 109 */
+ 0x04, 0x20, 0x19, 0x07, 0x47, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x53, 0xdd, 0xbe, 0x2e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa,
+ 0x44, 0x06, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xb4, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+
diff -uNr freebios2.08152005/src/cpu/amd/model_fxx/microcode_rev_d.h freebios2/src/cpu/amd/model_fxx/microcode_rev_d.h
--- freebios2.08152005/src/cpu/amd/model_fxx/microcode_rev_d.h	1969-12-31 16:00:00.000000000 -0800
+++ freebios2/src/cpu/amd/model_fxx/microcode_rev_d.h	2005-10-07 09:28:47.000000000 -0700
@@ -0,0 +1,148 @@
+/*
+ ============================================================
+ (c) Advanced Micro Devices, Inc., 2004-2005
+
+ The  enclosed microcode  is intended  to be  used  with AMD
+ Microprocessors.  You  may   copy,  view  and  install  the
+ enclosed microcode  only for development  and deployment of
+ firmware,  BIOS,  or  operating  system code  for  computer
+ systems   that  contain  AMD   processors.   You   are  not
+ authorized  to use  the  enclosed microcode  for any  other
+ purpose.
+
+ THE  MICROCODE IS PROVIDED  "AS IS"  WITHOUT ANY  EXPRESS OR
+ IMPLIED WARRANTY  OF ANY KIND, INCLUDING BUT  NOT LIMITED TO
+ WARRANTIES    OF    MERCHANTABILITY,   NON-    INFRINGEMENT,
+ TITLE,FITNESS  FOR  ANY  PARTICULAR PURPOSE,  OR  WARRANTIES
+ ARISING FROM CONDUCT, COURSE  OF DEALING, OR USAGE OF TRADE.
+ AMD does not assume  any responsibility for any errors which
+ may  appear   in  this   microcode  or  any   other  related
+ information provided  to you by  AMD, or result from  use of
+ this microcode.   AMD is not obligated  to furnish, support,
+ or  make   any  further  information,   software,  technical
+ information, know-how, or show-how available related to this
+ microcode.
+
+ The  microcode is provided  with "RESTRICTED  RIGHTS."  Use,
+ duplication, or disclosure by the U.S. Government is subject
+ to  the  restrictions as  set  forth  in  FAR 52.227-14  and
+ DFAR252.227-7013,  et seq.,  or its  successor.  Use  of the
+ microcode    by    the    U.S.     Government    constitutes
+ acknowledgement  of   AMD's  proprietary  rights   in  them.
+ ============================================================
+*/
+
+/* Rev Dx Microcode Patch for Errata 109 */
+ 0x04, 0x20, 0x25, 0x02, 0x41, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0xfd, 0x6a, 0x5a, 0x3e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa,
+ 0x44, 0x06, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xfb, 0xff, 0x00, 0xc3, 0x35, 0x90, 0xfd, 0xf8, 0x7b, 0xfe, 0xa9, 0x0f, 0xff, 0x00, 0x3f,
+ 0xfe, 0xdf, 0xff, 0xc7, 0x1e, 0xbc, 0x03, 0x3c, 0x80, 0xc8, 0xd5, 0x00, 0x14, 0xfe, 0xff, 0xff,
+ 0xfe, 0xe1, 0x1f, 0xeb, 0x4c, 0xf6, 0x3c, 0xff, 0x9f, 0x87, 0x7f, 0x80, 0x27, 0x60, 0x26, 0xf0,
+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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+
diff -uNr freebios2.08152005/src/cpu/amd/model_fxx/microcode_rev_e.h freebios2/src/cpu/amd/model_fxx/microcode_rev_e.h
--- freebios2.08152005/src/cpu/amd/model_fxx/microcode_rev_e.h	1969-12-31 16:00:00.000000000 -0800
+++ freebios2/src/cpu/amd/model_fxx/microcode_rev_e.h	2005-10-07 09:28:58.000000000 -0700
@@ -0,0 +1,149 @@
+/*
+ ============================================================
+ (c) Advanced Micro Devices, Inc., 2004-2005
+
+ The  enclosed microcode  is intended  to be  used  with AMD
+ Microprocessors.  You  may   copy,  view  and  install  the
+ enclosed microcode  only for development  and deployment of
+ firmware,  BIOS,  or  operating  system code  for  computer
+ systems   that  contain  AMD   processors.   You   are  not
+ authorized  to use  the  enclosed microcode  for any  other
+ purpose.
+
+ THE  MICROCODE IS PROVIDED  "AS IS"  WITHOUT ANY  EXPRESS OR
+ IMPLIED WARRANTY  OF ANY KIND, INCLUDING BUT  NOT LIMITED TO
+ WARRANTIES    OF    MERCHANTABILITY,   NON-    INFRINGEMENT,
+ TITLE,FITNESS  FOR  ANY  PARTICULAR PURPOSE,  OR  WARRANTIES
+ ARISING FROM CONDUCT, COURSE  OF DEALING, OR USAGE OF TRADE.
+ AMD does not assume  any responsibility for any errors which
+ may  appear   in  this   microcode  or  any   other  related
+ information provided  to you by  AMD, or result from  use of
+ this microcode.   AMD is not obligated  to furnish, support,
+ or  make   any  further  information,   software,  technical
+ information, know-how, or show-how available related to this
+ microcode.
+
+ The  microcode is provided  with "RESTRICTED  RIGHTS."  Use,
+ duplication, or disclosure by the U.S. Government is subject
+ to  the  restrictions as  set  forth  in  FAR 52.227-14  and
+ DFAR252.227-7013,  et seq.,  or its  successor.  Use  of the
+ microcode    by    the    U.S.     Government    constitutes
+ acknowledgement  of   AMD's  proprietary  rights   in  them.
+ ============================================================
+*/
+
+/*  Microcode Patch for Dual-Core Ex processors that fixes Errata 123*/
+ 0x05, 0x20, 0x28, 0x04, 0x4d, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x01, 0x6b, 0x59, 0x94, 0xc2,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x01, 0xaa, 0xaa, 0xaa,
+ 0xa8, 0x02, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x80, 0xff, 0xff, 0xc0, 0xc3, 0x3d, 0x80, 0xef, 0xfc, 0xbf, 0xff, 0x7b, 0x0f, 0xff, 0x00, 0x3f,
+ 0xf0, 0x1f, 0xf8, 0x07, 0x37, 0xfc, 0x03, 0xf8, 0xc0, 0x3b, 0xc8, 0x00, 0x80, 0xff, 0xc0, 0x3f,
+ 0xbf, 0xe1, 0x1f, 0xc0, 0x00, 0xfe, 0x03, 0xff, 0xff, 0x86, 0x7f, 0x00, 0x03, 0xf8, 0x0f, 0xfc,
+ 0xfc, 0x1b, 0xfe, 0x01, 0x00, 0xe0, 0xff, 0x7b, 0x1f, 0xc0, 0x7f, 0xe0, 0xe0, 0xdf, 0xf0, 0x0f,
+ 0x7f, 0x00, 0xff, 0x81, 0x80, 0x7f, 0xc3, 0x3f, 0xfe, 0x01, 0xfc, 0x07, 0x00, 0xfe, 0x0d, 0xff,
+ 0x3d, 0x00, 0xf0, 0xff, 0xf0, 0x0f, 0xe0, 0x3f, 0x07, 0xf0, 0x6f, 0xf8, 0xc0, 0x3f, 0x80, 0xff,
+ 0x1f, 0xc0, 0xbf, 0xe1, 0x03, 0xff, 0x00, 0xfe, 0x7f, 0x00, 0xff, 0x86, 0xff, 0x1e, 0x00, 0xf8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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+
diff -uNr freebios2.08152005/src/cpu/amd/model_fxx/model_fxx_init.c freebios2/src/cpu/amd/model_fxx/model_fxx_init.c
--- freebios2.08152005/src/cpu/amd/model_fxx/model_fxx_init.c	2005-10-07 10:11:55.000000000 -0700
+++ freebios2/src/cpu/amd/model_fxx/model_fxx_init.c	2005-10-07 09:32:45.000000000 -0700
@@ -3,7 +3,49 @@
  * 2004.11 yhlu add d0 e0 support
  * 2004.12 yhlu add dual core support
  * 2005.02 yhlu add e0 memory hole support
+
+*/
+/*============================================================================
+Copyright 2005 ADVANCED MICRO DEVICES, INC. All Rights Reserved.
+This software and any related documentation (the "Materials") are the
+confidential proprietary information of AMD. Unless otherwise provided in a
+software agreement specifically licensing the Materials, the Materials are
+provided in confidence and may not be distributed, modified, or reproduced in
+whole or in part by any means.
+LIMITATION OF LIABILITY: THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY
+EXPRESS OR IMPLIED WARRANTY OF ANY KIND, INCLUDING BUT NOT LIMITED TO
+WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, TITLE, FITNESS FOR ANY
+PARTICULAR PURPOSE, OR WARRANTIES ARISING FROM CONDUCT, COURSE OF DEALING, OR
+USAGE OF TRADE. IN NO EVENT SHALL AMD OR ITS LICENSORS BE LIABLE FOR ANY
+DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS,
+BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OF OR
+INABILITY TO USE THE MATERIALS, EVEN IF AMD HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS PROHIBIT THE EXCLUSION
+OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE
+LIMITATION MAY NOT APPLY TO YOU.
+AMD does not assume any responsibility for any errors which may appear in the
+Materials nor any responsibility to support or update the Materials. AMD
+retains the right to modify the Materials at any time, without notice, and is
+not obligated to provide such modified Materials to you.
+NO SUPPORT OBLIGATION: AMD is not obligated to furnish, support, or make any
+further information, software, technical information, know-how, or show-how
+available to you.
+U.S. GOVERNMENT RESTRICTED RIGHTS: The Materials are provided with "RESTRICTED
+RIGHTS." Use, duplication, or disclosure by the Government is subject to the
+restrictions as set forth in FAR 52.227-14 and DFAR 252.227-7013, et seq., or
+its successor. Use of the Materials by the Government constitutes
+acknowledgement of AMD's proprietary rights in them.
+============================================================================*/
+//@DOC
+// in model_fxx_init.c
+/*
+$1.0$
 */
+// Description: microcode patch support for k8
+// by yhlu
+//
+//============================================================================
+
 #include <console/console.h>
 #include <cpu/x86/msr.h>
 #include <cpu/amd/mtrr.h>
@@ -18,6 +60,7 @@
 #include "../../../northbridge/amd/amdk8/amdk8.h"
 #include "../../../northbridge/amd/amdk8/cpu_rev.c"
 #include <cpu/cpu.h>
+#include <cpu/amd/microcode.h>
 #include <cpu/x86/cache.h>
 #include <cpu/x86/mtrr.h>
 #include <cpu/x86/mem.h>
@@ -26,6 +69,18 @@
 #include <cpu/amd/dualcore.h>
 #endif
 
+static uint8_t microcode_updates[] __attribute__ ((aligned(16))) = {
+
+#include "microcode_rev_c.h"
+#include "microcode_rev_d.h"
+#include "microcode_rev_e.h"
+        /*  Dummy terminator  */
+        0x0, 0x0, 0x0, 0x0,
+        0x0, 0x0, 0x0, 0x0,
+        0x0, 0x0, 0x0, 0x0,
+        0x0, 0x0, 0x0, 0x0,
+};
+
 #include "model_fxx_msr.h"
 
 #define MCI_STATUS 0x401
@@ -323,7 +378,7 @@
 		}
 		if(!is_cpu_pre_f0()) {
 			/* Erratum 131 ....*/
-			msr.lo | = 1 << 20;
+			msr.lo |= 1 << 20;
 		}	
 		wrmsr(NB_CFG_MSR, msr);
 	}
@@ -377,6 +432,47 @@
 
 }
 
+static unsigned id_mapping_table[] = {
+	0x0f48, 0x0048,
+	0x0f58, 0x0048,
+
+	0x0f4a, 0x004a,
+	0x0f5a, 0x004a,
+	0x0f7a, 0x004a,
+	0x0f82, 0x004a,
+	0x0fc0, 0x004a,
+	0x0ff0, 0x004a,
+
+	0x10f50, 0x0150,
+	0x10f70, 0x0150,
+	0x10f80, 0x0150,
+	0x10fc0, 0x0150,
+	0x10ff0, 0x0150,
+
+	0x20f10, 0x0210,
+	0x20f12, 0x0210,
+	0x20f32, 0x0210,
+	0x20fb1, 0x0210,	
+
+}; 
+
+static unsigned get_equivalent_processor_rev_id(unsigned orig_id) {
+	unsigned new_id;
+	int i;
+	
+	new_id = 0;
+
+	for(i=0; i<sizeof(id_mapping_table); i+=2 ) {
+		if(id_mapping_table[i]==orig_id) {
+			new_id = id_mapping_table[i+1];
+			break;
+		}
+	}
+
+	return new_id;	
+
+}
+
 void model_fxx_init(device_t dev)
 {
 	unsigned long i;
@@ -388,12 +484,18 @@
 #else
 	unsigned nodeid;
 #endif
+	unsigned equivalent_processor_rev_id;
 
 	/* Turn on caching if we haven't already */
 	x86_enable_cache();
 	amd_setup_mtrrs();
 	x86_mtrr_check();
 
+        /* Update the microcode */
+	equivalent_processor_rev_id = get_equivalent_processor_rev_id(dev->device );
+	if(equivalent_processor_rev_id != 0)
+	        amd_update_microcode(microcode_updates, equivalent_processor_rev_id);
+
 	disable_cache();
 	
 	/* zero the machine check error status registers */
diff -uNr freebios2.08152005/src/include/cpu/amd/microcode.h freebios2/src/include/cpu/amd/microcode.h
--- freebios2.08152005/src/include/cpu/amd/microcode.h	1969-12-31 16:00:00.000000000 -0800
+++ freebios2/src/include/cpu/amd/microcode.h	2005-08-26 23:44:57.000000000 -0700
@@ -0,0 +1 @@
+void amd_update_microcode(void *microcode_updates, unsigned processor_rev_id);
