2 * head.S: VMXAssist runtime start off.
4 * Leendert van Doorn, leendert@watson.ibm.com
5 * Copyright (c) 2005, International Business Machines Corporation.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 * Place - Suite 330, Boston, MA 02111-1307 USA.
24 * When a partition tries to mask off the CR0_PE bit a world
25 * switch happens to the environment below. The magic indicates
26 * that this is a valid context.
32 .long newctx /* new context */
33 .long oldctx /* old context */
36 * This is the real start. Control was transfered to this point
37 * with CR0_PE set and executing in some 32-bit segment. We call
38 * main and setup our own environment.
45 /* save register parameters to C land */
55 movl %edx, booting_cpu
56 movl %ebx, booting_vector
58 /* make sure we are in a sane world */
61 /* setup my own stack */
70 * Something bad happened, print invoking %eip and loop forever
82 .asciz "Halt called from %%eip 0x%x\n"
90 .globl stack, stack_top