[coreboot] Moved 'pci_set_subsystem' to a weak function: Support for Siemens Mainboard

Joseph Kellermann Joseph.Kellermann at heitec.de
Tue Jan 25 13:03:39 CET 2011


> couldn't you just modify the chipset
> drivers to point to a different set_subsystem implementation where
> necessary?

Yes, I can do, but how can I implement these requirement:
> board comes with two hardware variants so I have to set up subvendor/device ids accordingly.
that's, in 'mainboard.c' I check for 'PLX device present' and set up subdevice ids accordingly.

Regards,
Joseph
________________________________________
Von: Georgi, Patrick [Patrick.Georgi at secunet.com]
Gesendet: Dienstag, 25. Januar 2011 12:16
Bis: Joseph Kellermann
Cc: coreboot at coreboot.org
Betreff: Re: [coreboot] Moved 'pci_set_subsystem' to a weak function: Support for Siemens Mainboard

Am Dienstag, den 25.01.2011, 10:44 +0000 schrieb Joseph Kellermann:
> Also I've found an issue:
> The default 'pci_set_subsystem' sets the subvendor/device id register#
> 0x2c. However, for a few devices in the RS690 the register is 0x4c
> respectively 0x50.
>
> Moved 'pci_set_subsystem' to a weak function in 'pci_device.c'. So
> boards can add an override for the default function in
> mainboard/../override_df.c (or mainboard.c) and set it up too.
Given that these implement chipset specific behaviour (either the device
requires writing to 0x4c instead of 0x2c or it doesn't), and that
pci_dev_set_subsystem is always called indirectly (via function pointers
in the respective chipset drivers), couldn't you just modify the chipset
drivers to point to a different set_subsystem implementation where
necessary?

It seems like the GFX function of RS690 is affected (just skimmed
through the AMD docs, so others might also require such a change). In
this case, it should work to change src/southbridge/amd/rs690/gfx.c to
point lops.set_subsystem to your own implementation which does whatever
their GFX device needs (write to 0x4c in extended config space in that
case, if I understand the docs), no?

> Hoping to receive a 'ack'.
> Signed-off-by: Josef Kellermann joseph.kellermann at heitec.de

If this change is actually required, I'll ack and commit it, but I'd
like to understand your use case better first. We already have a layer
of indirection in place, introducing another one will only create
confusion down the road.


Regards,
Patrick


**********************************************************************************************
IMPORTANT NOTICE / WICHTIGER HINWEIS
This communication contains information which is confidential and may also be privileged. It is for the 
exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any 
distribution, copying or use of this communication or the information in it is strictly prohibited. If you have 
received this communication in error please notify us immediately by email or by telephone and then delete 
this email and any copies of it.
Diese E-Mail koennte vertrauliche und/oder rechtlich geschuetzte Informationen enthalten. Wenn Sie nicht 
der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den 
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser 
Mail sind nicht gestattet.

HEITEC AG, Werner-von-Siemens-Str. 61, 91052 Erlangen, HRB 7754, RG Fuerth, Vorstandsvorsitzender: 
Richard Heindl, Vorstand: Harald Preiml, Finanzvorstand: Rene-Oliver Rosner, Aufsichtsratsvorsitzender: Dr. 
Lorenz M. Raith, WWW: http://www.heitec.de
**********************************************************************************************





More information about the coreboot mailing list