[coreboot] stage2 access to LAR

Stefan Reinauer stepan at coresystems.de
Fri Jan 25 22:30:16 CET 2008


ron minnich wrote:
> how does stage 2 access LAR? The mem_file struct is an auto (local) for stage1.
>
> void __attribute__((stdcall)) stage1_main(u32 bist)
> {
>         int ret;
>         struct mem_file archive, result;
>         int elfboot_mem(struct lb_memory *mem, void *where, int size);
>         void *entry;
>
> You need that mem_file struct ... how do we get this made available to
> other functions?
>
> Remember, you can't make it global to the file before RAM is turned on ...
>
> Just have a global that is assigned once RAM is on?
>   

Or make it local to ..eh.. whats it called in v3? hardware_main()

You can always get the mem_file filled with:

        /* The len field starts behind the reset vector on x86.
         * The start is not correct for all platforms. sc520 will
         * need some hands on here.
         */
        archive.len = *(u32 *)0xfffffff4;
        archive.start =(void *)(0UL-archive.len);

Regards,
Stefan

-- 
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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080125/8b1325c6/attachment.sig>


More information about the coreboot mailing list