[U-Boot] [PATCH v2 3/3] x86: Test mtrr support flag before accessing mtrr msr

Simon Glass sjg at chromium.org
Sat Jan 24 00:55:29 CET 2015


On 22 January 2015 at 08:06, Simon Glass <sjg at chromium.org> wrote:
> On 21 January 2015 at 20:29, Bin Meng <bmeng.cn at gmail.com> wrote:
>> 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 at gmail.com>
>>
>> ---
>>
>> Changes in v2:
>> - Return -ENOSYS in mtrr_commit() and mtrr_add_request() when MTRR MSR
>>   is not implemented in the processor
>> - Add return value description of mtrr_commit() and mtrr_add_request()
>> - Ignore -ENOSYS in init_cache_f_r() in arch/x86/lib/init_helpers.c
>>
>>  arch/x86/cpu/mtrr.c         | 12 ++++++++++++
>>  arch/x86/include/asm/mtrr.h |  5 ++++-
>>  arch/x86/lib/init_helpers.c |  4 +++-
>>  3 files changed, 19 insertions(+), 2 deletions(-)
>
> Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot-x86, thanks!


More information about the U-Boot mailing list