[flashrom] Patch to fix wrmsr for some toolchains

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue May 18 04:37:50 CEST 2010


On 18.05.2010 01:20, ron minnich wrote:
> Hi, I'd like to know a bit more.
>
> This basic use of the msr device has worked for a very long time. I'm
> not saying there is not a problem, but if there is, it might be best
> to change the struct than to add this code.
>
> Do you have some assembly code showing how it failed?
>
> For example ... certainly, in user mode, why isn't the msr_t just a
> 64-bit number?
>   

Legacy? MSR access in flashrom is one of the areas (besides cbtable
support and layout support) which still shows a coreboot heritage.
coreboot has a struct msr_struct (typedef'ed to msr_t) and flashrom
somehow inherited this. We could make it a 64bit number, yes. The
question is why it isn't a 64bit number in coreboot, and unless the
reason there is that nobody bothered to change it, I think we should
avoid any traps in flashrom. OTOH, I don't want to employ cargo cult
programming just because the MSR situation feels a bit odd.

I'd happily use a solution which reduces potential breakage, so fire away.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list