/* -*-Asm-*- */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007,2008,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <multiboot.h>
.file "lnxboot.S"
.text
. = data_start + 0x1F1
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0
.word 0xAA55
.word 0, 0 /* default_switch, SETUPSEG. */
.word 0 /* Version string ptr. */
.byte 0 /* Filled in by boot loader. */
.word 0 /* Unused. */
.long 0x100000 /* 32-bit start address. */
.long 0 /* Loaded ramdisk image address. */
.long 0 /* Size of loaded ramdisk. */
.word 0, 0
.word 0
pad1:
.word 0
.long 0 /* Command line. */
.long 0xffffffff /* Highest allowed ramdisk address. */
gdt:
.long 0, 0, 0, 0 /* Must be zero. */
.byte 0, 0 ,0 /* Low 24 bits of source address. */
.byte 0 /* Extended access rights. */
.byte 0 /* High 8 bits of source address. */
.byte 0, 0, 0 /* Low 24 bits of target address. */
.byte 0 /* Extended access rights. */
.byte 0 /* High 8 bits of source address. */
.long 0, 0, 0, 0 /* More space for the BIOS. */
.long 0
lret /* Jump to real_code. */
/* Setup stack. */
/* Move itself to 0:CODE_ADDR. */
jnz 1f
1:
#else
#endif
/* Check for multiboot signature. */
jz 1f
jmp 2f
1:
2:
/*
* Parameters:
* esi: source address
* edi: target address
* ecx: number of bytes
*/
1:
jbe 2f
2:
int $0x15
jnc 2f
2:
jnz 1b
/*
* Parameters:
* si: message
*/
1:
int $0x10
jne 1b
.ascii "move memory fails\0"