summaryrefslogtreecommitdiff
path: root/payloads/libpayload/i386/head.S
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-03-20 19:54:59 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-03-20 19:54:59 +0000
commit6a441bfb46337ed6b59abed56dad35d94802282c (patch)
tree44eb1d67fcbc450907472186bbc0036afe9e380c /payloads/libpayload/i386/head.S
parent5f4c8abb6537fa7377969e837dab987abefcf922 (diff)
Cosmetics, coding style fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3180 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/i386/head.S')
-rw-r--r--payloads/libpayload/i386/head.S47
1 files changed, 21 insertions, 26 deletions
diff --git a/payloads/libpayload/i386/head.S b/payloads/libpayload/i386/head.S
index 1278bdf4ed..e05cb3ed30 100644
--- a/payloads/libpayload/i386/head.S
+++ b/payloads/libpayload/i386/head.S
@@ -26,60 +26,55 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
+
.global _entry, _leave
.text
.align 4
-/* Our entry point - assume that the CPU is in
- * 32 bit protected mode and all segments are in a
- * flat model. Thats our operating mode, so we won't
- * change anything
+/*
+ * Our entry point - assume that the CPU is in 32 bit protected mode and
+ * all segments are in a flat model. That's our operating mode, so we won't
+ * change anything.
*/
-
_entry:
call _init
- /* We're back - go back to the bootloader */
+ /* We're back - go back to the bootloader. */
ret
-/* This function saves off the previous stack and
- switches us to our own execution enviornment
-*/
-
+/*
+ * This function saves off the previous stack and switches us to our
+ * own execution environment.
+ */
_init:
- /* No interrupts, please */
+ /* No interrupts, please. */
cli
- /* Get the current stack pointer */
+ /* Get the current stack pointer. */
movl %esp, %esi
movl _istack, %ebx
- /* lret needs %cs in the stack, so copy it over */
+ /* lret needs %cs in the stack, so copy it over. */
movw %cs, 4(%ebx)
- /* Exchange the current stack pointer for the one in
- the initial stack (which happens to be the new
- stack pointer) */
-
+ /*
+ * Exchange the current stack pointer for the one in the initial
+ * stack (which happens to be the new stack pointer).
+ */
xchgl %esi, 16(%ebx)
- /* Set the new stack pointer */
+ /* Set the new stack pointer. */
movl %esi, %esp
- /* Return into the main entry function
- and go
- */
-
+ /* Return into the main entry function and go. */
lret
_leave:
movl _istack, %ebx
- /* Restore the stack pointer from the storage area */
+ /* Restore the stack pointer from the storage area. */
movl 16(%ebx), %esp
- /* Return to the original context */
+ /* Return to the original context. */
lret
-