lkml.org 
[lkml]   [2013]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 3/3] x86/microcode: early microcode patch loading support on AMD
On Thu, May 23, 2013 at 10:40:18AM -0500, Jacob Shin wrote:
> Add support for early microcode patch loading on AMD.
>
> Signed-off-by: Jacob Shin <jacob.shin@amd.com>
> ---
> arch/x86/Kconfig | 16 +-
> arch/x86/include/asm/microcode.h | 1 -
> arch/x86/include/asm/microcode_amd.h | 17 ++
> arch/x86/include/asm/microcode_intel.h | 1 +
> arch/x86/kernel/microcode_amd.c | 338 ++++++++++++++++++++++++++++----
> arch/x86/kernel/microcode_core_early.c | 7 +
> 6 files changed, 333 insertions(+), 47 deletions(-)
> create mode 100644 arch/x86/include/asm/microcode_amd.h
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 3a5bced..fab72e7 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1090,8 +1090,18 @@ config MICROCODE_INTEL_LIB
> depends on MICROCODE_INTEL
>
> config MICROCODE_INTEL_EARLY
> - bool "Early load microcode"
> + def_bool n
> depends on MICROCODE_INTEL && BLK_DEV_INITRD
> +
> +config MICROCODE_AMD_EARLY
> + def_bool n
> + depends on MICROCODE_AMD && BLK_DEV_INITRD
> +
> +config MICROCODE_EARLY
> + bool "Early load microcode"
> + depends on (MICROCODE_INTEL || MICROCODE_AMD) && BLK_DEV_INITRD
> + select MICROCODE_INTEL_EARLY if MICROCODE_INTEL
> + select MICROCODE_AMD_EARLY if MICROCODE_AMD
> default y
> help
> This option provides functionality to read additional microcode data

This whole microcode Kconfig game seems kinda too granulary to me.
I mean, distros will enable all of them anyway (both AMD and Intel
microcode loading) and since we can safely enable early loading even if
there's no microcode in the initrd, we can add in the early code too.

So how about simplifying this a lot by having only:

config MICROCODE
tristate "CPU microcode loading support"
select FW_LOADER

config MICROCODE_EARLY
depends on BLK_DEV_INITRD && MICROCODE

and drop all this vendor differentiation. Microcode core code checks
vendors so it won't be loaded on anything unsupported, etc.

hpa, Ingo, what do you guys think?

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--


\
 
 \ /
  Last update: 2013-05-28 11:01    [W:0.135 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site