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: [EMAIL PROTECTED]  • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to