[LinuxBIOS] patch: extending LAR, and removing elf from linuxbios (it is not needed)

ron minnich rminnich at gmail.com
Tue Aug 28 17:41:53 CEST 2007

On 8/28/07, ron minnich <rminnich at gmail.com> wrote:
> On 8/28/07, Uwe Hermann <uwe at hermann-uwe.de> wrote:
> > Yes, good idea IMO.
> >
> > Maybe 'LAR Magic 0.01' or something similar?
> Again, given current brute force search, this won't help, since that
> string will appear in the data segment. The most reliable fix is the
> one I posted; the most proper fix is stefan's "let's stop being
> stupid" which I will try to implement now.

OOOPS. We are being smart, it turns out:

                header = (struct lar_header *)walk;
                fullname = walk + sizeof(struct lar_header);

                printk(BIOS_SPEW, "LAR: current filename is %s\n", fullname);
                // FIXME: check checksum

                if (strcmp(fullname, filename) == 0) {
                        printk(BIOS_SPEW, "LAR: it matches %s @ %p\n",
fullname, header);
                        result->start = walk + ntohl(header->offset);
                        result->len = ntohl(header->len);
                        result->reallen = ntohl(header->reallen);
                        result->compression = ntohl(header->compression);
                        result->entry = (void *)ntohl(header->entry);
                        result->loadaddress = (void
                        printk(BIOS_SPEW, "start %p len %d reallen %d
compression %x entry %p loadaddress %p\n",
                                result->start, result->len,
result->reallen, result->compression, result->entry,
                        return 0;
                // skip file
                walk += (ntohl(header->len) + ntohl(header->offset) -
                        1) & 0xfffffff0;

But it still failed ...



More information about the coreboot mailing list