On Thursday 03 Jun 2010 08:32:55 Wu Fengguang wrote: > > You are right. We need a clean way to pass the off-limits region to > > relocate(). > > > > Generic code can't access lkrnprefix.S symbols but it should be > > possible to pass an (addr, size) pair or even a pointer to an array of > > (addr, size) pairs. > > Yes! This is actually what I've been thinking: a little less > straightforward, however a more modular approach.
Do you see anything wrong with Shao Miller's approach: http://git.etherboot.org/?p=people/sha0/gpxe.git;a=commitdiff;h=e9516971 It's pretty straightforward, and solves the problem. The only reason I haven't yet merged it in to iPXE is because I'm wondering if there's a way to (neatly) pass max_addr in via a register, as is done with all other parameters in the prefix code. (The problem of using memory for parameter passing is that the ROM prefix sometimes executes with a read-only .prefix. Consequently all of the generic prefix code is written to assume that .prefix is non-writeable. While it's true that the ROM prefix wouldn't need to override max_addr, I'd prefer to avoid introducing that kind of inconsistency. We could pass parameters via the stack but, again, that would introduce an inconsistency since currently everything is passed in registers.) Michael _______________________________________________ gPXE-devel mailing list [email protected] http://etherboot.org/mailman/listinfo/gpxe-devel
