All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Subject: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
Date: Wed, 15 Jul 2009 23:47:15 -0400	[thread overview]
Message-ID: <20090716034715.29978.53910.stgit@ct.roinet.com> (raw)
In-Reply-To: <20090716034703.29978.94862.stgit@ct.roinet.com>

ChangeLog:

	* boot/i386/pc/boot.S: Remove ABS macro, it's useless now.
---
 boot/i386/pc/boot.S |   23 +++++++++--------------
 1 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S
index 8a8f6c7..77319a7 100644
--- a/boot/i386/pc/boot.S
+++ b/boot/i386/pc/boot.S
@@ -24,13 +24,8 @@
  *  defines for the code go here
  */
 
-	/* Absolute addresses
-	   This makes the assembler generate the address without support
-	   from the linker. (ELF can't relocate 16-bit addresses!) */
-#define ABS(x) (x-_start+0x7c00)
-
 	/* Print message string */
-#define MSG(x)	movw $ABS(x), %si; call L_message
+#define MSG(x)	movw $x, %si; call L_message
 
 	.file	"boot.S"
 
@@ -125,7 +120,7 @@ boot_drive_check:
 	 * ljmp to the next instruction because some bogus BIOSes
 	 * jump to 07C0:0000 instead of 0000:7C00.
 	 */
-	ljmp	$0, $ABS(real_start)
+	ljmp	$0, $real_start
 
 real_start:
 
@@ -142,7 +137,7 @@ real_start:
 	/*
 	 *  Check if we have a forced disk reference here
 	 */
-	movb   ABS(boot_drive), %al
+	movb   boot_drive, %al
 	cmpb	$0xff, %al
 	je	1f
 	movb	%al, %dl
@@ -154,7 +149,7 @@ real_start:
 	MSG(notification_string)
 
 	/* set %si to the disk address packet */
-	movw	$ABS(disk_address_packet), %si
+	movw	$disk_address_packet, %si
 
 	/* do not probe LBA if the drive is a floppy */
 	testb	$GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
@@ -195,9 +190,9 @@ lba_mode:
 	movw	$0x0010, (%si)
 
 	/* the absolute address */
-	movl	ABS(kernel_sector), %ebx
+	movl	kernel_sector, %ebx
 	movl	%ebx, 8(%si)
-	movl	ABS(kernel_sector + 4), %ebx
+	movl	kernel_sector + 4, %ebx
 	movl	%ebx, 12(%si)
 
 	/* the segment of buffer address */
@@ -265,13 +260,13 @@ L_final_init:
 
 setup_sectors:
 	/* load logical sector start (top half) */
-	movl	ABS(kernel_sector + 4), %eax
+	movl	kernel_sector + 4, %eax
 
 	orl	%eax, %eax
 	jnz	L_geometry_error
 
 	/* load logical sector start (bottom half) */
-	movl	ABS(kernel_sector), %eax
+	movl	kernel_sector, %eax
 
 	/* zero %edx */
 	xorl	%edx, %edx
@@ -442,7 +437,7 @@ L_floppy_probe:
  *  Perform floppy probe.
  */
 
-	movw	$ABS(probe_values-1), %si
+	movw	$probe_values - 1, %si
 
 L_probe_loop:
 	/* reset floppy controller INT 13h AH=0 */



  reply	other threads:[~2009-07-16  3:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16  3:47 [PATCH 1/2] RFT: Eliminate Apple specific code from boot/i386/pc/boot.S Pavel Roskin
2009-07-16  3:47 ` Pavel Roskin [this message]
2009-07-18 15:17   ` [PATCH 2/2] RFT: Remove ABS macro " Vladimir 'phcoder' Serbinenko
2009-07-18 18:22     ` Robert Millan
2009-07-18 18:34       ` Vladimir 'phcoder' Serbinenko
2009-07-18 19:16         ` Robert Millan
2009-08-07 17:15           ` Vladimir 'phcoder' Serbinenko
2009-08-13  5:53             ` Pavel Roskin
2009-07-16 16:31 ` [PATCH 1/2] RFT: Eliminate Apple specific code " Vladimir 'phcoder' Serbinenko
2009-08-13  5:21   ` Pavel Roskin
2009-08-08 14:48 ` [PATCH] RFT: Rename local labels with a macro " Yves Blusseau
2009-08-08 14:55   ` Vladimir 'phcoder' Serbinenko
2009-08-08 15:47     ` Yves Blusseau
2009-08-10 11:29   ` Robert Millan
2009-08-13  6:13     ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090716034715.29978.53910.stgit@ct.roinet.com \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.