Re: [Etherboot-developers] Comboot - Local Boot Support

Michael Brown <[email protected]> Mon, 29 Sep 2008 21:52:13 +0100
Newsgroups gmane.network.etherboot.user,gmane.network.etherboot.devel
Message-ID <[email protected]>
On Monday 29 September 2008 19:58:31 Daniel Verkamp wrote:
> Where should I store the register values for the PM version? It will
> run in PHYS_CODE; can I still use CS to access data in .text16?

No; %cs will be a flat, zero-based 4GB code descriptor at that point.  There's 
no absolute address you can use.  However, _virt_to_phys will preserve all 
(non-segment) registers and flags and will modify %esp to point to the same 
physical location as before the call; you can probably do something with 
this.  (You can trivially do everything *apart* from load %esp with an 
arbitrary value: just have the asm load up %esp with the address of a 
register dump structure and then have a series of "pop" instructions followed 
by a "ret".)

Michael

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/