7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #if defined(__lint)
28
29 int silence_lint_warnings = 0;
30
31 #else /* __lint */
32
33 #include <sys/multiboot.h>
34 #include <sys/multiboot2.h>
35 #include <sys/asm_linkage.h>
36 #include <sys/segments.h>
37 #include <sys/controlregs.h>
38
39 #include "dboot_xboot.h"
40
41 .text
42 .globl _start
43 _start:
44 jmp code_start
45
46 /*
47 * The multiboot header has to be at the start of the file
48 *
49 * The 32 bit kernel is ELF32, so the MB header is mostly ignored.
50 *
51 * The 64 bit kernel is ELF64, so we get grub to load the entire
52 * ELF file into memory and trick it into jumping into this code.
355 xorl $0x200000, %ecx
356 pushl %ecx
357 popf
358 pushf
359 popl %ecx
360 cmpl %ecx, %edx
361 setne %al
362 popf
363 ret
364 SET_SIZE(have_cpuid)
365
366 /*
367 * We want the GDT to be on its own page for better performance
368 * running under hypervisors.
369 */
370 .skip 4096
371 #include "../boot/boot_gdt.s"
372 .skip 4096
373 .long 0
374
375 #endif /* __lint */
|
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 #include <sys/multiboot.h>
28 #include <sys/multiboot2.h>
29 #include <sys/asm_linkage.h>
30 #include <sys/segments.h>
31 #include <sys/controlregs.h>
32
33 #include "dboot_xboot.h"
34
35 .text
36 .globl _start
37 _start:
38 jmp code_start
39
40 /*
41 * The multiboot header has to be at the start of the file
42 *
43 * The 32 bit kernel is ELF32, so the MB header is mostly ignored.
44 *
45 * The 64 bit kernel is ELF64, so we get grub to load the entire
46 * ELF file into memory and trick it into jumping into this code.
349 xorl $0x200000, %ecx
350 pushl %ecx
351 popf
352 pushf
353 popl %ecx
354 cmpl %ecx, %edx
355 setne %al
356 popf
357 ret
358 SET_SIZE(have_cpuid)
359
360 /*
361 * We want the GDT to be on its own page for better performance
362 * running under hypervisors.
363 */
364 .skip 4096
365 #include "../boot/boot_gdt.s"
366 .skip 4096
367 .long 0
368
|