summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/transitions/librm.S
diff options
context:
space:
mode:
authorMichael Brown2006-05-26 00:04:17 +0200
committerMichael Brown2006-05-26 00:04:17 +0200
commit29340d77286166cbe987b948d9a18404df758f91 (patch)
treed36247c2e4ec2d7ed91ab9cafb6d45bee78a2b17 /src/arch/i386/transitions/librm.S
parentrelocate.o is now dragged in by the objects that require it; there is no (diff)
downloadipxe-29340d77286166cbe987b948d9a18404df758f91.tar.gz
ipxe-29340d77286166cbe987b948d9a18404df758f91.tar.xz
ipxe-29340d77286166cbe987b948d9a18404df758f91.zip
Documented the fact that the prefix can prot_call(main) without
worrying about its stack being destroyed during the Etherboot run.
Diffstat (limited to 'src/arch/i386/transitions/librm.S')
-rw-r--r--src/arch/i386/transitions/librm.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/i386/transitions/librm.S b/src/arch/i386/transitions/librm.S
index 5033a3aa..7364f9f2 100644
--- a/src/arch/i386/transitions/librm.S
+++ b/src/arch/i386/transitions/librm.S
@@ -328,6 +328,15 @@ rm_ds: .word 0
* function explicitly overwrites values in ix86. Interrupt status
* and GDT will also be preserved. Gate A20 will be enabled.
*
+ * Note that prot_call() does not rely on the real-mode stack
+ * remaining intact in order to return, since everything relevant is
+ * copied to the protected-mode stack for the duration of the call.
+ * In particular, this means that a real-mode prefix can make a call
+ * to main() which will return correctly even if the prefix's stack
+ * gets vapourised during the Etherboot run. (The prefix cannot rely
+ * on anything else on the stack being preserved, so should move any
+ * critical data to registers before calling main()).
+ *
* Parameters:
* function : virtual address of protected-mode function to call
*