[coreboot] [PATCH] flashrom: clean up SPI probing, bus handling

Stefan Reinauer stepan at coresystems.de
Sun Jun 29 13:26:48 CEST 2008


Carl-Daniel Hailfinger wrote:
> On 29.06.2008 12:35, Stefan Reinauer wrote:
>   
>> Carl-Daniel Hailfinger wrote:
>>   
>>     
>>>> Yes, something along the line. Alongside with this I want to clean up
>>>> use of struct flashchip
>>>> for flashes[] but I would really like to get the current change in the
>>>> tree yet.
>>>>     
>>>>       
>>>>         
>>> I'm not a fan of committing code which will be changed shortly
>>> afterwards, but...
>>>   
>>>     
>>>       
>> Release early, release often, yes? ;-) I can keep this in our internal
>> repository for a while until it's ripened, but I fear it will decay if
>> it's only floating around as a patch and not in the repo (see Rudolf's
>> SPI patch, though that can still easily be applied for VIA systems)
>>   
>>     
>
> Actually, to give Rudolf the chance to adapt VIA chipset support in
> flashrom to the new code I'd like to keep big commits away from ichspi.c
> until VIA support is merged.
>   
I have his changes in my tree. If this is going in, I can commit his
stuff right afterwards.

> I always thought that virtual_memory is exactly the location of the
> flash chip in the memory map. If not, what's the point of virtual_memory?
>   
* virtual_memory is the flash chip mapped into the flashrom process'
memory map. It's an arbitrary address valid for that one process.

* physical_memory is the address on the "outside" memory bus of the cpu.
that's where all the PCI bars live etc.

Those are completely distinct address spaces, and usually nothing
(except some memory chunks) from the physical address space is visible
in the virtual address space. flashrom can not access the flashchip,
unless it maps a piece of physical memory (0xfff00000-0xffffffff for
example) to its virtual address space. That's why we need to mmap to
actually see it. But the address we get from mmap does not have any
descriptive character, it's a mere handle for us to access that physical
memory.

Stefan




-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the coreboot mailing list