]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
x86: Test mtrr support flag before accessing mtrr msr
authorBin Meng <bmeng.cn@gmail.com>
Thu, 22 Jan 2015 03:29:41 +0000 (11:29 +0800)
committerSimon Glass <sjg@chromium.org>
Sat, 24 Jan 2015 00:24:55 +0000 (17:24 -0700)
commit3b621ccabdccb34891bb58865a9654a09c2b7279
tree8c9321d4657a4154867bd77d92d4d5dad851dbc3
parent49491669065c1c718d8dc0b0ebc151b3d010c17b
x86: Test mtrr support flag before accessing mtrr msr

On some x86 processors (like Intel Quark) the MTRR registers are not
supported. This is reflected by the CPUID (EAX 01H) result EDX[12].
Accessing the MTRR registers on such processors will cause #GP so we
must test the support flag before accessing MTRR MSRs.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/mtrr.c
arch/x86/include/asm/mtrr.h
arch/x86/lib/init_helpers.c