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