dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / arch / x86 / kernel / krtld / 32 / kobj_crt.s
blob8b1d6d353017ee0884b1a29b137e5139242f1bc2
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #pragma ident "%Z%%M% %I% %E% SMI"
29 * exit routine from linker/loader to kernel
32 #include <sys/asm_linkage.h>
33 #include <sys/reboot.h>
34 #include <sys/trap.h>
37 * exitto is called from main() and does 1 things
38 * It then jumps directly to the just-loaded standalone.
39 * There is NO RETURN from exitto(). ????
43 .data
44 save_esp2:
45 .long 0
47 ENTRY(exitto)
48 push %ebp / save stack
49 mov %esp,%ebp
50 pushal / protect secondary boot
52 movl %esp, %eax
53 movl %eax, save_esp2
55 /holds address of array of pointers to functions
56 movl $romp, %eax
57 movl (%eax), %ecx
59 /holds address of bootops structure
60 movl $ops, %eax
61 movl (%eax), %ebx
63 movl 8(%ebp), %eax
64 call *%eax
66 movl save_esp2, %eax
67 movl %eax, %esp
69 popal
70 pop %ebp / restore frame pointer
72 ret
73 SET_SIZE(exitto)