[coreboot] Time for a new project
patrick at georgi-clan.de
Sat Apr 12 15:55:56 CEST 2008
Am Samstag, den 12.04.2008, 13:16 +0200 schrieb Carl-Daniel Hailfinger:
> SELF is missing a checksum for each uncompressed segment.
It has a checksum for the whole file (in LAR), isn't that enough?
> SELF is missing a per-section compression algorithm specifier and if you
> introduce one, you have a compression algorithm specifier both in LAR
> and in SELF. If you remove it from LAR, you have no way to store
BSS is defined to be the implicit-RLE-0 compressor. Everything else
probably defaults to a single one (LZMA).
> Sorry, you misunderstood. The obvious speed penalty comes from unaligned
> accesses. Some architectures can't even handle unaligned accesses at all.
Uhm, once the LAR header is aligned (it is), and of a size multiple the
alignment size, the data is aligned, too - right?
> So you propose to handle some executable code (bootblock, raminit) just
> with LAR and not with SELF? How are you going to explain that concept a
> few years down the road?
That code doesn't need a BSS section, in case of the bootblock it
doesn't even need an entry point (as far as I can see). So we actually
have two classes of code here:
- upper level
So yes, just adding the pre-stage6 stuff as simple binary seems totally
obvious to me, if stage6 is the first one to carry a SELF parser.
> Wrong. Checksums say nothing about corrupt internal SELF structure. The
> LAR parser has the ability (well, at least in theory) to check for
> overlapping archive members right now. With SELF, a corrupt SELF header
> can reference arbitrary places in the archive and a pure LAR parser
> can't find that out because it does not parse SELF by design.
What kind of corruption do you refer to?
The one that happens before the file it put in the LAR? (so the LAR
checksum matches) There shouldn't be any, if the SELF creator works
The one that happens later should be caught by LAR's checksum.
And just like the SELF creator, the LAR creator could have a bug and
create broken structures.
> And since a pure LAR parser does not understand SELF, you need a
> combined SELF+LAR parser to know whether the ROM has a chance to boot.
Does your parser also check if the bootblock starts with RET? Or solve
the halting problem?
> The bootblock and initram are executable files. They should be contained
> in SELF as well (and that means you should be able to state that the
> code is XIP). Tables which should be loaded to a given address in memory
the bootblock isn't loaded by a SELF parser - even if it gets a suitable
header, it would implicitely be XIP.
More information about the coreboot