grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/7] Eliminate kernel_segment


From: Pavel Roskin
Subject: [PATCH 3/7] Eliminate kernel_segment
Date: Tue, 14 Jul 2009 21:00:30 -0400
User-agent: StGit/0.15-rc1-4-g4ce8

ChangeLog:

        * boot/i386/pc/boot.S (kernel_segment): Remove.
        (copy_buffer): Copy to 0x0000:0x8000, not to 0x0800:0x0000.
---
 boot/i386/pc/boot.S |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S
index e5685dc..15d02e5 100644
--- a/boot/i386/pc/boot.S
+++ b/boot/i386/pc/boot.S
@@ -94,8 +94,6 @@ cylinder_start:
 
 kernel_address:
        .word   GRUB_BOOT_MACHINE_KERNEL_ADDR
-kernel_segment:
-       .word   GRUB_BOOT_MACHINE_KERNEL_SEG
 
        . = _start + GRUB_BOOT_MACHINE_KERNEL_SECTOR
 kernel_sector:
@@ -372,13 +370,6 @@ setup_sectors:
        movw    %es, %bx
 
 copy_buffer:
-#ifdef APPLE_CC
-       kernel_segment_abs = ABS (kernel_segment)
-       movw    (kernel_segment_abs), %es
-#else
-       movw    ABS(kernel_segment), %es
-#endif
-
        /*
         * We need to save %cx and %si because the startup code in
         * kernel uses them without initializing them.
@@ -389,7 +380,8 @@ copy_buffer:
        movw    $0x100, %cx
        movw    %bx, %ds
        xorw    %si, %si
-       xorw    %di, %di
+       movw    $GRUB_BOOT_MACHINE_KERNEL_ADDR, %di
+       movw    %si, %es
 
        cld
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]