Hello,
I found out difficulties with pci access functions in CAR as they tend to eat memory dynamically - with malloc calls. Any suggestions?
Also I have read a bit about PCI architecture and found out that devices must be initialised before they respond to transactions, so is there a chance that chipset/board enable functions will work?
Attaching my ugly tree patch for current coreboot. Problems in internal.c pcidev.c
Thanks, Tadas
Am Freitag, 15. Juli 2011 04:01:55, Tadas Slotkus schrieb:
I found out difficulties with pci access functions in CAR as they tend to eat memory dynamically - with malloc calls. Any suggestions?
Try to determine how much memory it uses and what the patterns are. If the code never frees until the end and the amount of required memory is manageable, consider building yourself a tiny malloc() that simply increments a pointer starting in CAR. That should be good enough to get you started.
Also I have read a bit about PCI architecture and found out that devices must be initialised before they respond to transactions, so is there a chance that chipset/board enable functions will work?
Some devices are built to respond from the start, esp. northbridge (and southbridge to some degree). For working with mainboard flash chips, no other hardware access should be necessary. So there's a fair chance that things will work.
Patrick
Tadas,
On Thu, Jul 14, 2011 at 8:01 PM, Tadas Slotkus devtadas@gmail.com wrote:
Hello,
I found out difficulties with pci access functions in CAR as they tend to eat memory dynamically - with malloc calls. Any suggestions?
Also I have read a bit about PCI architecture and found out that devices must be initialised before they respond to transactions, so is there a chance that chipset/board enable functions will work?
Attaching my ugly tree patch for current coreboot. Problems in internal.c pcidev.c
Thanks, Tadas
Sorry, I'm a little late on this question.
You should look at the coreboot early PCI access routines. I don't think that they malloc. Knowing the location of the device can help, then you don't have to scan for the id each time.
Marc