[U-Boot] [PATCH 07/15] x86: Add functions to access MSRs
Graeme Russ
graeme.russ at gmail.com
Thu Oct 25 00:22:36 CEST 2012
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)
Regards,
Graeme
More information about the U-Boot
mailing list