1 /* ----------------------------------------------------------------------- *
3 * Copyright (C) 1991, 1992 Linus Torvalds
4 * Copyright 2007 rPath, Inc. - All Rights Reserved
6 * This file is part of the Linux kernel, and is made available under
7 * the terms of the GNU General Public License version 2.
9 * ----------------------------------------------------------------------- */
12 * arch/i386/boot/pmjump.S
14 * The actual transition into protected mode
18 #include <asm/segment.h>
22 .globl protected_mode_jump
23 .type protected_mode_jump, @function
28 * void protected_mode_jump(u32 entrypoint, u32 bootparams);
31 xorl %ebx, %ebx # Flag to indicate this is a boot
32 movl %edx, %esi # Pointer to boot_params table
33 movl %eax, 2f # Patch ljmpl instruction
34 jmp 1f # Short jump to flush instruction q.
40 orb $1, %dl # Protected mode (PE) bit
49 # Jump to the 32-bit entrypoint
50 .byte 0x66, 0xea # ljmpl opcode
52 .word __BOOT_CS # segment
54 .size protected_mode_jump, .-protected_mode_jump