Re: [Etherboot-developers] Comboot - Local Boot Support
"H. Peter Anvin" <[email protected]> Mon, 06 Oct 2008 15:36:52 -0700
| Newsgroups | gmane.network.etherboot.user,gmane.network.etherboot.devel |
|---|---|
| Message-ID | <[email protected]> |
Michael Brown wrote: > 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".) > How do you set %esp itself then, other than using self-modifying code? (This is the reason I started using self-modifying code in the Syslinux case, and once I was doing it there, I figured I might as well use it for all the cases.) -hpa ------------------------------------------------------------------------- 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=/