[coreboot] patch: init gx cache earlier.
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Wed Feb 6 02:52:34 CET 2008
On 06.02.2008 02:38, Marc Jones wrote:
> Carl-Daniel Hailfinger wrote:
>> On 05.02.2008 00:27, Marc Jones wrote:
>>>
>>> /**
>>> * TODO.
>>> Index: coreboot-v3/mainboard/adl/msm800sev/stage1.c
>>> ===================================================================
>>> --- coreboot-v3.orig/mainboard/adl/msm800sev/stage1.c 2008-02-04
>>> 15:41:14.000000000 -0700
>>> +++ coreboot-v3/mainboard/adl/msm800sev/stage1.c 2008-02-04
>>> 15:50:04.000000000 -0700
>>> @@ -53,3 +53,15 @@
>>> cs5536_disable_internal_uart();
>>> w83627hf_enable_serial(0x2e, SERIAL_DEV, SERIAL_IOBASE);
>>> }
>>> +
>>> +void pre_payload(void)
>>> +{
>>> + struct msr msr;
>>> +
>>> + /* Set ROM cache properties for runtime. */
>>> + msr = rdmsr(CPU_RCONF_DEFAULT);
>>> + msr.hi &= ~(0xFF << 24); // clear ROMRC
>>> + msr.hi |= 0x25 << 24; // set WS, CD, WP
>>>
>>
>> Use ROMRC_RCONF_SAFE instead of 0x25?
> sure
Thanks.
>>> + wrmsr(CPU_RCONF_DEFAULT, msr);
>>> + banner(BIOS_DEBUG, "pre_payload: done");
>>> +}
>>>
>>
>>
>> pre_payload() is not board specific, but Geode LX-specific.
>> geodelxinit.c may be a more appropriate location.
>>
>>
> Correct, but I foresee other non-Geode platforms needing a call just
> prior to the payload running but I am flexible on this.
Sorry, I didn't express clearly enough what I wanted. I just tried to
avoid duplication if this specific version of pre_payload() in mainboard
code and hoped to have the code of this pre_payload() in geodelxinit.c.
Maybe rename it to platform_pre_payload() and have it called by
pre_payload() inside mainboard specific code. That would give us all the
flexibility with minimum code duplication.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the coreboot
mailing list