[coreboot] [PATCH] drivers vs. obj

Myles Watson mylesgw at gmail.com
Thu Sep 24 22:59:03 CEST 2009

On Thu, Sep 24, 2009 at 12:52 AM, Stefan Reinauer <stepan at coresystems.de>wrote:
Myles Watson wrote:
> Are there other differences?  Should I2C devices use objects, since
> you can't scan for them?

Some structures defined in the code are put in an extra section in the
binary for enumeration. Those are:

#define __console    __attribute__((used,
#define __cpu_driver __attribute__((used,__section__(".rodata.cpu_driver")))
#define __pci_driver __attribute__((used,__section__(".rodata.pci_driver")))

All others don't need to be "drivers"


Based on that, here's a patch that changes drivers that aren't console, pci,
or cpu, to obj.

The most common one was mainboard.c as a driver.

Boot tested with Tyan s2895.

Signed-off-by: Myles Watson <mylesgw at gmail.com>


PS.  It looks like the rtl8168 driver ought to go somewhere more general in
the tree.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090924/93987350/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drivers_obj.diff
Type: text/x-patch
Size: 4198 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090924/93987350/attachment.diff>

More information about the coreboot mailing list