[coreboot] [PATCH] Add VIA VT8237S support

Stefan Reinauer stepan at coresystems.de
Wed Sep 10 22:46:43 CEST 2008

ron minnich wrote:
> On Wed, Sep 10, 2008 at 1:37 PM, Stefan Reinauer <stepan at coresystems.de> wrote:
>> Just curious:
>> Why would you say packed is asking for trouble?
> it's actually burned me in the past, but I am fine with it when
> needed. It's not needed for sysinfo for example. Some of our uses seem
> gratuitous.
> There are cases where people  naively used packed and ended up slowing
> down the programs by several orders of magnitude (on alpha for
> example).
> The Xen guys used it at first and then removed it. It's worth avoiding
> if you can.
Absolutely. The only reason to use it is when

a) reading from binary files directly into a struct
b) using a struct to access hardware

When GCC adds padding to the struct, it does that to increase speed when
accessing the members by removing the need to do slow, unaligned accesses.

That said, using it for sysinfo sounds like a bad idea, unless writing
sysinfo and reading it again is done by 2 different compilers.

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