[U-Boot] [PATCH 07/15] x86: Add functions to access MSRs

Simon Glass sjg at chromium.org
Sat Nov 3 21:51:30 CET 2012


Hi Graeme,

On Wed, Oct 24, 2012 at 3:22 PM, Graeme Russ <graeme.russ at gmail.com> wrote:
> Hi Stefan,
>
> On Thu, Oct 25, 2012 at 8:15 AM, Stefan Reinauer <reinauer at google.com> wrote:
>> Graeme,
>>
>> Reusing code from the Linux kernel is generally a great idea. However for
>> simplicity I'd rather have 25 lines than 870 lines for reading MSRs. It
>> seems a lot of code in those files doesn't really apply for u-boot
>
> Understood, however the code I extracted from the Linux kernel:
>  - Makes it more likely that all the corner cases have been dealt with
>  - Brings in all the 'magic numbers' for a wide range of CPUs, thus
> avoiding a continuing stream of patches (pulling them in from the
> Linux kernel code)
>  - Includes MTTR functions and defines. I know coreboot is doing the
> memory init, but coreboot will not always be the only way to launch
> U-Boot and MTTRs will be needed
>  - It's simply easier to keep synchronising with the Linux kernel when
> new defines and/or functions get added/removed/modified
>  - I doubt it increases the compiled code size, and if it does,
> there's probably a good reason for it (corner cases)

Thanks for your comments.

I will bring in the full MTTR implementation from your patch. However,
first I need to test it and integrate with everything else here. So it
might take me a few weeks to get everything straight again.

I have one more lot of x86 patches queued up (about 20 patches), so I
will send these out based on what is there now. One of them does use
MTRR but it may be independent of this change anyway. More testing
will tell.

My initial goal is to get mainline booting properly on several x86
Chromebooks, using coreboot.

We also need to address moving coreboot code into a library directory
or whatever.

Regards,
Simon

>
> Regards,
>
> Graeme


More information about the U-Boot mailing list