bss_end:
.long 0
#endif
+/*
+ * This is the area for all of the special variables.
+ */
+
+VARIABLE(grub_boot_drive)
+ .byte 0
+
+/* the real mode code continues... */
+LOCAL (codestart):
+ cli /* we're not safe here! */
+ /* set up %ds, %ss, and %es */
+ xorw %ax, %ax
+ movw %ax, %ds
+ movw %ax, %ss
+ movw %ax, %es
+
+ /* set up the real mode/BIOS stack */
+ movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp
+ movl %ebp, %esp
+
+ sti /* we're safe again */
+
+ /* save the boot drive */
+ ADDR32 movb %dl, EXT_C(grub_boot_drive)
+
+ /* reset disk system (%ah = 0) */
+ int $0x13
+
+ /* transition to protected mode */
+ DATA32 call real_to_prot
+
+ /* The ".code32" directive takes GAS out of 16-bit mode. */
+ .code32
+
+ incl %eax
+ call grub_gate_a20
+
+ movl EXT_C(grub_compressed_size), %edx
+ addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART), %edx
+ movl reed_solomon_redundancy, %ecx
+ leal _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART, %eax
+ testl %edx, %edx
+ jz post_reed_solomon
+ call EXT_C (grub_reed_solomon_recover)
+ jmp post_reed_solomon
+
+#include <rs_decoder.S>
+
+ .text
+
+ . = _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART
/*
* Support for booting GRUB from a Multiboot boot loader (e.g. GRUB itself).
* This uses the a.out kludge to load raw binary to the area starting at 1MB,
movb $0xFF, %dh
/* enter the usual booting */
call prot_to_real
- .code16
-
-/* the real mode code continues... */
-LOCAL (codestart):
- cli /* we're not safe here! */
-
- /* set up %ds, %ss, and %es */
- xorw %ax, %ax
- movw %ax, %ds
- movw %ax, %ss
- movw %ax, %es
-
- /* set up the real mode/BIOS stack */
- movl $GRUB_MEMORY_MACHINE_REAL_STACK, %ebp
- movl %ebp, %esp
-
- sti /* we're safe again */
-
- /* save the boot drive */
- ADDR32 movb %dl, EXT_C(grub_boot_drive)
-
- /* reset disk system (%ah = 0) */
- int $0x13
-
- /* transition to protected mode */
- DATA32 call real_to_prot
-
- /* The ".code32" directive takes GAS out of 16-bit mode. */
- .code32
- incl %eax
- call grub_gate_a20
-
- movl EXT_C(grub_compressed_size), %edx
- addl $(GRUB_KERNEL_MACHINE_RAW_SIZE - GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART), %edx
- movl reed_solomon_redundancy, %ecx
- leal _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART, %eax
- testl %edx, %edx
- jz post_reed_solomon
- call EXT_C (grub_reed_solomon_recover)
- jmp post_reed_solomon
-
-#include <rs_decoder.S>
-
- .text
-
- . = _start + GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART
post_reed_solomon:
#ifdef ENABLE_LZMA
*/
call EXT_C(grub_main)
-/*
- * This is the area for all of the special variables.
- */
-
-VARIABLE(grub_boot_drive)
- .byte 0
-
- .p2align 2 /* force 4-byte alignment */
-
#include "../realmode.S"
/*