Skip to content

x86: AMD microcode patch loading support

Peter Oruba lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9x86: Moved Intel microcode patch loader declarations to seperate header file.arch/x86/kernel/microcode.c include/asm-x86/microcode.h include/asm-x86/processor.h+35 -350 replies
2/9x86: Typedef removal.arch/x86/kernel/microcode.c include/asm-x86/microcode.h+12 -150 replies
3/9x86: Moved per CPU microcode structure declaration to header file.arch/x86/kernel/microcode.c include/asm-x86/microcode.h+9 -70 replies
4/9x86: Code split to two parts.arch/x86/kernel/Makefile arch/x86/kernel/microcode.c arch/x86/kernel/microcode_intel.c+530 -4070 replies
5/9x86: Structure declaration renaming.arch/x86/kernel/microcode_intel.c include/asm-x86/microcode.h+30 -260 replies
6/9x86: Add AMD specific declarations.include/asm-x86/microcode.h+30 -00 replies
7/9x86: First step of refactoring, introducing microcode_ops.include/asm-x86/microcode.h+13 -00 replies
8/9x86: Major refactoring.arch/x86/Kconfig arch/x86/kernel/Makefile arch/x86/kernel/microcode.c +1 more+112 -501 reply
9/9x86: AMD microcode patch loading support.arch/x86/Kconfig arch/x86/kernel/Makefile arch/x86/kernel/microcode_amd.c+534 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/9] x86: AMD microcode patch loading support

This patch set introduces microcode patch loading support for AMD processors. It includes refactoring of existing code to allow code sharing. Vendor specific code has been split off, leading to a multi-module solution as compared to the current single-module approach.

Thanks,

Peter Oruba

--
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]

Quoted 1 line

From [email protected] Fri Jul 25 18:20:02 2008

Message-Id: <[email protected]>
User-Agent: quilt/0.46_cvs20080326-19.1
Date: Fri, 25 Jul 2008 18:17:24 +0200
From: Peter Oruba <[email protected]>
To: Ingo Molnar <[email protected]>,
Thomas Gleixner <[email protected]>,
Tigran Aivazian <[email protected]>
Cc: LKML <[email protected]>,
Peter Oruba <[email protected]>
Bcc: [email protected]
Subject: [patch 1/9] [PATCH 1/9] x86: Moved Intel microcode patch loader declarations to seperate header file.
References: <[email protected]>
Content-Disposition: inline; filename=0001-x86-Moved-Intel-microcode-patch-loader-declarations.patch

Intel specific microcode declarations have been moved to a seperate header file. There are no code changes to the code itself and no side effects to other parts.

---
 arch/x86/kernel/microcode.c |    1 +
 include/asm-x86/microcode.h |   34 ++++++++++++++++++++++++++++++++++
 include/asm-x86/processor.h |   35 -----------------------------------
 3 files changed, 35 insertions(+), 35 deletions(-)
 create mode 100644 include/asm-x86/microcode.h
arch/x86/kernel/microcode.c +1 -0
index 56b9331..230ca7e 100644
@@ -93,6 +93,7 @@
 #include <asm/msr.h>
 #include <asm/uaccess.h>
 #include <asm/processor.h>
+#include <asm/microcode.h>
 
 MODULE_DESCRIPTION("Intel CPU (IA-32) Microcode Update Driver");
 MODULE_AUTHOR("Tigran Aivazian <[email protected]>");
include/asm-x86/microcode.h new file +34 -0
new file mode 100644
index 0000000..5a05568
@@ -0,0 +1,34 @@
+struct microcode_header {
+	unsigned int            hdrver;
+	unsigned int            rev;
+	unsigned int            date;
+	unsigned int            sig;
+	unsigned int            cksum;
+	unsigned int            ldrver;
+	unsigned int            pf;
+	unsigned int            datasize;
+	unsigned int            totalsize;
+	unsigned int            reserved[3];
+};
+
+struct microcode {
+	struct microcode_header hdr;
+	unsigned int            bits[0];
+};
+
+typedef struct microcode          microcode_t;
+typedef struct microcode_header   microcode_header_t;
+
+/* microcode format is extended from prescott processors */
+struct extended_signature {
+	unsigned int            sig;
+	unsigned int            pf;
+	unsigned int            cksum;
+};
+
+struct extended_sigtable {
+	unsigned int            count;
+	unsigned int            cksum;
+	unsigned int            reserved[3];
+	struct extended_signature sigs[0];
+};
include/asm-x86/processor.h +0 -35
index 15cb82a..f3c5c93 100644
@@ -561,41 +561,6 @@ static inline void clear_in_cr4(unsigned long mask)
 	write_cr4(cr4);
 }
 
-struct microcode_header {
-	unsigned int		hdrver;
-	unsigned int		rev;
-	unsigned int		date;
-	unsigned int		sig;
-	unsigned int		cksum;
-	unsigned int		ldrver;
-	unsigned int		pf;
-	unsigned int		datasize;
-	unsigned int		totalsize;
-	unsigned int		reserved[3];
-};
-
-struct microcode {
-	struct microcode_header	hdr;
-	unsigned int		bits[0];
-};
-
-typedef struct microcode	microcode_t;
-typedef struct microcode_header	microcode_header_t;
-
-/* microcode format is extended from prescott processors */
-struct extended_signature {
-	unsigned int		sig;
-	unsigned int		pf;
-	unsigned int		cksum;
-};
-
-struct extended_sigtable {
-	unsigned int		count;
-	unsigned int		cksum;
-	unsigned int		reserved[3];
-	struct extended_signature sigs[0];
-};
-
 typedef struct {
 	unsigned long		seg;
 } mm_segment_t;
Signature · 1 line
1.5.4.5