[coreboot] question on disable_cache_as_ram() function.

Stefan Reinauer stepan at coresystems.de
Wed Dec 22 09:00:16 CET 2010


On 12/21/10 8:04 PM, Russell Whitaker wrote:
>
>
> On Wed, 22 Dec 2010, Stefan Reinauer wrote:
>
>> * Fengwei Zhang <namedylan at gmail.com> [101222 00:31]:
>> backup_resume copies some memory into a safe place because it will be
>> overwritten by copying coreboot to memory. After coreboot's device
>> allocation is done, that memory will be copied back. We do this to
>> prevent memory corruption through overwriting OS memory with coreboot.
>>
>> We could get rid of those two copies by setting up a non 1:1
>> virtual/physical mapping and copy coreboot to the end of physical
>> memory, running with virtual adressing. However, that would require us
>> to modify each and every driver that accesses memory mapped devices to
>> use phys_to_virt()
>>
> What if you copied coreboot to the end of physical memory and then told
> the OS that physical memory ends just below coreboot?
That would be the plan. However, GCC will not produce code that is 
position independent enough to do this without special mappings.

Stefan




More information about the coreboot mailing list