All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] RFT: Eliminate Apple specific code from boot/i386/pc/boot.S
@ 2009-07-16  3:47 Pavel Roskin
  2009-07-16  3:47 ` [PATCH 2/2] RFT: Remove ABS macro " Pavel Roskin
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Pavel Roskin @ 2009-07-16  3:47 UTC (permalink / raw)
  To: grub-devel

ChangeLog:

	* boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
	Use local labels starting with "L_" so that Apple assembler
	would know they are local.
---
 boot/i386/pc/boot.S |  110 +++++++++++++++------------------------------------
 1 files changed, 32 insertions(+), 78 deletions(-)

diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S
index 1fb5f74..8a8f6c7 100644
--- a/boot/i386/pc/boot.S
+++ b/boot/i386/pc/boot.S
@@ -30,11 +30,7 @@
 #define ABS(x) (x-_start+0x7c00)
 
 	/* Print message string */
-#ifdef APPLE_CC
-#define MSG(x)	x ## _abs = ABS(x); movw $x ## _abs, %si; call message
-#else
-#define MSG(x)	movw $ABS(x), %si; call message
-#endif
+#define MSG(x)	movw $ABS(x), %si; call L_message
 
 	.file	"boot.S"
 
@@ -56,7 +52,7 @@ start:
 	 * parameter block.
 	 */
 
-	jmp	after_BPB
+	jmp	L_after_BPB
 	nop	/* do I care about this ??? */
 
 	/*
@@ -104,7 +100,7 @@ boot_drive:
 	.byte 0xff	/* the disk to load kernel from */
 			/* 0xff means use the boot drive */
 
-after_BPB:
+L_after_BPB:
 
 /* general setup */
 	cli		/* we're not safe here! */
@@ -129,12 +125,7 @@ boot_drive_check:
 	 * ljmp to the next instruction because some bogus BIOSes
 	 * jump to 07C0:0000 instead of 0000:7C00.
 	 */
-#ifdef APPLE_CC
-	real_start_abs = ABS(real_start)
-	ljmp	$0, $(real_start_abs)
-#else
 	ljmp	$0, $ABS(real_start)
-#endif
 
 real_start:
 
@@ -151,12 +142,7 @@ real_start:
 	/*
 	 *  Check if we have a forced disk reference here
 	 */
-#ifdef APPLE_CC
-	boot_drive_abs = ABS (boot_drive)
-	movb    boot_drive_abs, %al
-#else
 	movb   ABS(boot_drive), %al
-#endif
 	cmpb	$0xff, %al
 	je	1f
 	movb	%al, %dl
@@ -168,16 +154,11 @@ real_start:
 	MSG(notification_string)
 
 	/* set %si to the disk address packet */
-#ifdef APPLE_CC
-	disk_address_packet_abs = ABS (disk_address_packet)
-	movw	$disk_address_packet_abs, %si
-#else
 	movw	$ABS(disk_address_packet), %si
-#endif
 
 	/* do not probe LBA if the drive is a floppy */
 	testb	$GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
-	jz	chs_mode
+	jz	L_chs_mode
 
 	/* check if LBA is supported */
 	movb	$0x41, %ah
@@ -192,12 +173,12 @@ real_start:
 	pushw	%dx
 
 	/* use CHS if fails */
-	jc	chs_mode
+	jc	L_chs_mode
 	cmpw	$0xaa55, %bx
-	jne	chs_mode
+	jne	L_chs_mode
 
 	andw	$1, %cx
-	jz	chs_mode
+	jz	L_chs_mode
 
 lba_mode:
 	xorw	%ax, %ax
@@ -214,18 +195,10 @@ lba_mode:
 	movw	$0x0010, (%si)
 
 	/* the absolute address */
-#ifdef APPLE_CC
-	kernel_sector_abs = ABS (kernel_sector)
-	movl	(kernel_sector_abs), %ebx
-	movl	%ebx, 8(%si)
-	movl	(kernel_sector_abs + 4), %ebx
-	movl	%ebx, 12(%si)
-#else
 	movl	ABS(kernel_sector), %ebx
 	movl	%ebx, 8(%si)
 	movl	ABS(kernel_sector + 4), %ebx
 	movl	%ebx, 12(%si)
-#endif
 
 	/* the segment of buffer address */
 	movw	$GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
@@ -243,30 +216,30 @@ lba_mode:
 	int	$0x13
 
 	/* LBA read is not supported, so fallback to CHS.  */
-	jc	chs_mode
+	jc	L_chs_mode
 
 	movw	$GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
-	jmp	copy_buffer
+	jmp	L_copy_buffer
 
-chs_mode:
+L_chs_mode:
 	/*
 	 *  Determine the hard disk geometry from the BIOS!
 	 *  We do this first, so that LS-120 IDE floppies work correctly.
 	 */
 	movb	$8, %ah
 	int	$0x13
-	jnc	final_init
+	jnc	L_final_init
 
 	/*
 	 *  The call failed, so maybe use the floppy probe instead.
 	 */
 	testb	$GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
-	jz	floppy_probe
+	jz	L_floppy_probe
 
 	/* Nope, we definitely have a hard disk, and we're screwed. */
-	jmp	hd_probe_error
+	jmp	L_hd_probe_error
 
-final_init:
+L_final_init:
 	/* set the mode to zero */
 	movzbl	%dh, %eax
 	movb	%ah, -1(%si)
@@ -292,22 +265,13 @@ final_init:
 
 setup_sectors:
 	/* load logical sector start (top half) */
-#ifdef APPLE_CC
-	kernel_sector_abs = ABS (kernel_sector)
-	movl	(kernel_sector_abs + 4), %eax
-#else
 	movl	ABS(kernel_sector + 4), %eax
-#endif
 
 	orl	%eax, %eax
-	jnz	geometry_error
+	jnz	L_geometry_error
 
 	/* load logical sector start (bottom half) */
-#ifdef APPLE_CC
-	movl	(kernel_sector_abs), %eax
-#else
 	movl	ABS(kernel_sector), %eax
-#endif
 
 	/* zero %edx */
 	xorl	%edx, %edx
@@ -323,7 +287,7 @@ setup_sectors:
 
 	/* do we need too many cylinders? */
 	cmpw	8(%si), %ax
-	jge	geometry_error
+	jge	L_geometry_error
 
 	/* normalize sector start (1-based) */
 	incb	%cl
@@ -365,11 +329,11 @@ setup_sectors:
 	movw	$0x0201, %ax	/* function 2 */
 	int	$0x13
 
-	jc	read_error
+	jc	L_read_error
 
 	movw	%es, %bx
 
-copy_buffer:
+L_copy_buffer:
 	/*
 	 * We need to save %cx and %si because the startup code in
 	 * kernel uses them without initializing them.
@@ -392,42 +356,37 @@ copy_buffer:
 	popa
 
 	/* boot kernel */
-#ifdef APPLE_CC
-	kernel_address_abs = ABS (kernel_address)
-	jmp	*(kernel_address_abs)
-#else
 	jmp	*(kernel_address)
-#endif
 
 /* END OF MAIN LOOP */
 
 /*
  * BIOS Geometry translation error (past the end of the disk geometry!).
  */
-geometry_error:
+L_geometry_error:
 	MSG(geometry_error_string)
-	jmp	general_error
+	jmp	L_general_error
 
 /*
  * Disk probe failure.
  */
-hd_probe_error:
+L_hd_probe_error:
 	MSG(hd_probe_error_string)
-	jmp	general_error
+	jmp	L_general_error
 
 /*
  * Read error on the disk.
  */
-read_error:
+L_read_error:
 	MSG(read_error_string)
 
-general_error:
+L_general_error:
 	MSG(general_error_string)
 
 /* go here when you need to stop the machine hard after an error condition */
         /* tell the BIOS a boot failure, which may result in no effect */
         int	$0x18
-stop:	jmp	stop
+L_stop:	jmp	L_stop
 
 notification_string:	.asciz "GRUB "
 geometry_error_string:	.asciz "Geom"
@@ -450,7 +409,7 @@ general_error_string:	.asciz " Error\r\n"
 	movw	$0x0001, %bx
 	movb	$0xe, %ah
 	int	$0x10		/* display a byte */
-message:
+L_message:
 	lodsb
 	cmpb	$0, %al
 	jne	1b	/* if not end of string, jmp to display */
@@ -478,19 +437,14 @@ part_start:
 probe_values:
 	.byte	36, 18, 15, 9, 0
 
-floppy_probe:
+L_floppy_probe:
 /*
  *  Perform floppy probe.
  */
 
-#ifdef APPLE_CC
-	probe_values_abs = ABS (probe_values)
-	movw	$(probe_values_abs-1), %si
-#else
 	movw	$ABS(probe_values-1), %si
-#endif
 
-probe_loop:
+L_probe_loop:
 	/* reset floppy controller INT 13h AH=0 */
 	xorw	%ax, %ax
 	int	$0x13
@@ -506,7 +460,7 @@ probe_loop:
  * Floppy disk probe failure.
  */
 	MSG(fd_probe_error_string)
-	jmp	general_error
+	jmp	L_general_error
 
 /* "Floppy" */
 fd_probe_error_string:	.asciz "Floppy"
@@ -519,14 +473,14 @@ fd_probe_error_string:	.asciz "Floppy"
 	movb	$0, %dh
 	int	$0x13
 
-	/* if error, jump to "probe_loop" */
-	jc	probe_loop
+	/* if error, jump to "L_probe_loop" */
+	jc	L_probe_loop
 
 	/* %cl is already the correct value! */
 	movb	$1, %dh
 	movb	$79, %ch
 
-	jmp	final_init
+	jmp	L_final_init
 
 	. = _start + GRUB_BOOT_MACHINE_PART_END
 



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  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
  2009-07-18 15:17   ` Vladimir 'phcoder' Serbinenko
  2009-07-16 16:31 ` [PATCH 1/2] RFT: Eliminate Apple specific code " Vladimir 'phcoder' Serbinenko
  2009-08-08 14:48 ` [PATCH] RFT: Rename local labels with a macro " Yves Blusseau
  2 siblings, 1 reply; 15+ messages in thread
From: Pavel Roskin @ 2009-07-16  3:47 UTC (permalink / raw)
  To: grub-devel

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 */



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] RFT: Eliminate Apple specific code from  boot/i386/pc/boot.S
  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 ` [PATCH 2/2] RFT: Remove ABS macro " Pavel Roskin
@ 2009-07-16 16:31 ` 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
  2 siblings, 1 reply; 15+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-07-16 16:31 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jul 16, 2009 at 5:47 AM, Pavel Roskin<proski@gnu.org> wrote:
> ChangeLog:
>
>        * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
>        Use local labels starting with "L_" so that Apple assembler
>        would know they are local.
You have really a lot of patches. It's undoubtly a good thing but
since I was on vacation I lost a track a bit. For casual viewers I
suppose it's even worse. Perhaps you could create a git repository
which would hold all patches you haven't committed yet, one per
branch? It will make a much better overview. Bean created a mirror on
github. Perhaps we can use it as a tool to have an easily-viewable
list of all unmerged patches and prevent patches from get lost. I know
it's really unfortunate that I come up with a proposition of using
such system for a relatively small project like grub. Alternatively we
may want to formulate rules which would prevent future developpement
deadlocks.
> ---
>  boot/i386/pc/boot.S |  110 +++++++++++++++------------------------------------
>  1 files changed, 32 insertions(+), 78 deletions(-)
>
> diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S
> index 1fb5f74..8a8f6c7 100644
> --- a/boot/i386/pc/boot.S
> +++ b/boot/i386/pc/boot.S
> @@ -30,11 +30,7 @@
>  #define ABS(x) (x-_start+0x7c00)
>
>        /* Print message string */
> -#ifdef APPLE_CC
> -#define MSG(x) x ## _abs = ABS(x); movw $x ## _abs, %si; call message
> -#else
> -#define MSG(x) movw $ABS(x), %si; call message
> -#endif
> +#define MSG(x) movw $ABS(x), %si; call L_message
>
>        .file   "boot.S"
>
> @@ -56,7 +52,7 @@ start:
>         * parameter block.
>         */
>
> -       jmp     after_BPB
> +       jmp     L_after_BPB
>        nop     /* do I care about this ??? */
>
>        /*
> @@ -104,7 +100,7 @@ boot_drive:
>        .byte 0xff      /* the disk to load kernel from */
>                        /* 0xff means use the boot drive */
>
> -after_BPB:
> +L_after_BPB:
>
>  /* general setup */
>        cli             /* we're not safe here! */
> @@ -129,12 +125,7 @@ boot_drive_check:
>         * ljmp to the next instruction because some bogus BIOSes
>         * jump to 07C0:0000 instead of 0000:7C00.
>         */
> -#ifdef APPLE_CC
> -       real_start_abs = ABS(real_start)
> -       ljmp    $0, $(real_start_abs)
> -#else
>        ljmp    $0, $ABS(real_start)
> -#endif
>
>  real_start:
>
> @@ -151,12 +142,7 @@ real_start:
>        /*
>         *  Check if we have a forced disk reference here
>         */
> -#ifdef APPLE_CC
> -       boot_drive_abs = ABS (boot_drive)
> -       movb    boot_drive_abs, %al
> -#else
>        movb   ABS(boot_drive), %al
> -#endif
>        cmpb    $0xff, %al
>        je      1f
>        movb    %al, %dl
> @@ -168,16 +154,11 @@ real_start:
>        MSG(notification_string)
>
>        /* set %si to the disk address packet */
> -#ifdef APPLE_CC
> -       disk_address_packet_abs = ABS (disk_address_packet)
> -       movw    $disk_address_packet_abs, %si
> -#else
>        movw    $ABS(disk_address_packet), %si
> -#endif
>
>        /* do not probe LBA if the drive is a floppy */
>        testb   $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
> -       jz      chs_mode
> +       jz      L_chs_mode
>
>        /* check if LBA is supported */
>        movb    $0x41, %ah
> @@ -192,12 +173,12 @@ real_start:
>        pushw   %dx
>
>        /* use CHS if fails */
> -       jc      chs_mode
> +       jc      L_chs_mode
>        cmpw    $0xaa55, %bx
> -       jne     chs_mode
> +       jne     L_chs_mode
>
>        andw    $1, %cx
> -       jz      chs_mode
> +       jz      L_chs_mode
>
>  lba_mode:
>        xorw    %ax, %ax
> @@ -214,18 +195,10 @@ lba_mode:
>        movw    $0x0010, (%si)
>
>        /* the absolute address */
> -#ifdef APPLE_CC
> -       kernel_sector_abs = ABS (kernel_sector)
> -       movl    (kernel_sector_abs), %ebx
> -       movl    %ebx, 8(%si)
> -       movl    (kernel_sector_abs + 4), %ebx
> -       movl    %ebx, 12(%si)
> -#else
>        movl    ABS(kernel_sector), %ebx
>        movl    %ebx, 8(%si)
>        movl    ABS(kernel_sector + 4), %ebx
>        movl    %ebx, 12(%si)
> -#endif
>
>        /* the segment of buffer address */
>        movw    $GRUB_BOOT_MACHINE_BUFFER_SEG, 6(%si)
> @@ -243,30 +216,30 @@ lba_mode:
>        int     $0x13
>
>        /* LBA read is not supported, so fallback to CHS.  */
> -       jc      chs_mode
> +       jc      L_chs_mode
>
>        movw    $GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
> -       jmp     copy_buffer
> +       jmp     L_copy_buffer
>
> -chs_mode:
> +L_chs_mode:
>        /*
>         *  Determine the hard disk geometry from the BIOS!
>         *  We do this first, so that LS-120 IDE floppies work correctly.
>         */
>        movb    $8, %ah
>        int     $0x13
> -       jnc     final_init
> +       jnc     L_final_init
>
>        /*
>         *  The call failed, so maybe use the floppy probe instead.
>         */
>        testb   $GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
> -       jz      floppy_probe
> +       jz      L_floppy_probe
>
>        /* Nope, we definitely have a hard disk, and we're screwed. */
> -       jmp     hd_probe_error
> +       jmp     L_hd_probe_error
>
> -final_init:
> +L_final_init:
>        /* set the mode to zero */
>        movzbl  %dh, %eax
>        movb    %ah, -1(%si)
> @@ -292,22 +265,13 @@ final_init:
>
>  setup_sectors:
>        /* load logical sector start (top half) */
> -#ifdef APPLE_CC
> -       kernel_sector_abs = ABS (kernel_sector)
> -       movl    (kernel_sector_abs + 4), %eax
> -#else
>        movl    ABS(kernel_sector + 4), %eax
> -#endif
>
>        orl     %eax, %eax
> -       jnz     geometry_error
> +       jnz     L_geometry_error
>
>        /* load logical sector start (bottom half) */
> -#ifdef APPLE_CC
> -       movl    (kernel_sector_abs), %eax
> -#else
>        movl    ABS(kernel_sector), %eax
> -#endif
>
>        /* zero %edx */
>        xorl    %edx, %edx
> @@ -323,7 +287,7 @@ setup_sectors:
>
>        /* do we need too many cylinders? */
>        cmpw    8(%si), %ax
> -       jge     geometry_error
> +       jge     L_geometry_error
>
>        /* normalize sector start (1-based) */
>        incb    %cl
> @@ -365,11 +329,11 @@ setup_sectors:
>        movw    $0x0201, %ax    /* function 2 */
>        int     $0x13
>
> -       jc      read_error
> +       jc      L_read_error
>
>        movw    %es, %bx
>
> -copy_buffer:
> +L_copy_buffer:
>        /*
>         * We need to save %cx and %si because the startup code in
>         * kernel uses them without initializing them.
> @@ -392,42 +356,37 @@ copy_buffer:
>        popa
>
>        /* boot kernel */
> -#ifdef APPLE_CC
> -       kernel_address_abs = ABS (kernel_address)
> -       jmp     *(kernel_address_abs)
> -#else
>        jmp     *(kernel_address)
> -#endif
>
>  /* END OF MAIN LOOP */
>
>  /*
>  * BIOS Geometry translation error (past the end of the disk geometry!).
>  */
> -geometry_error:
> +L_geometry_error:
>        MSG(geometry_error_string)
> -       jmp     general_error
> +       jmp     L_general_error
>
>  /*
>  * Disk probe failure.
>  */
> -hd_probe_error:
> +L_hd_probe_error:
>        MSG(hd_probe_error_string)
> -       jmp     general_error
> +       jmp     L_general_error
>
>  /*
>  * Read error on the disk.
>  */
> -read_error:
> +L_read_error:
>        MSG(read_error_string)
>
> -general_error:
> +L_general_error:
>        MSG(general_error_string)
>
>  /* go here when you need to stop the machine hard after an error condition */
>         /* tell the BIOS a boot failure, which may result in no effect */
>         int    $0x18
> -stop:  jmp     stop
> +L_stop:        jmp     L_stop
>
>  notification_string:   .asciz "GRUB "
>  geometry_error_string: .asciz "Geom"
> @@ -450,7 +409,7 @@ general_error_string:       .asciz " Error\r\n"
>        movw    $0x0001, %bx
>        movb    $0xe, %ah
>        int     $0x10           /* display a byte */
> -message:
> +L_message:
>        lodsb
>        cmpb    $0, %al
>        jne     1b      /* if not end of string, jmp to display */
> @@ -478,19 +437,14 @@ part_start:
>  probe_values:
>        .byte   36, 18, 15, 9, 0
>
> -floppy_probe:
> +L_floppy_probe:
>  /*
>  *  Perform floppy probe.
>  */
>
> -#ifdef APPLE_CC
> -       probe_values_abs = ABS (probe_values)
> -       movw    $(probe_values_abs-1), %si
> -#else
>        movw    $ABS(probe_values-1), %si
> -#endif
>
> -probe_loop:
> +L_probe_loop:
>        /* reset floppy controller INT 13h AH=0 */
>        xorw    %ax, %ax
>        int     $0x13
> @@ -506,7 +460,7 @@ probe_loop:
>  * Floppy disk probe failure.
>  */
>        MSG(fd_probe_error_string)
> -       jmp     general_error
> +       jmp     L_general_error
>
>  /* "Floppy" */
>  fd_probe_error_string: .asciz "Floppy"
> @@ -519,14 +473,14 @@ fd_probe_error_string:    .asciz "Floppy"
>        movb    $0, %dh
>        int     $0x13
>
> -       /* if error, jump to "probe_loop" */
> -       jc      probe_loop
> +       /* if error, jump to "L_probe_loop" */
> +       jc      L_probe_loop
>
>        /* %cl is already the correct value! */
>        movb    $1, %dh
>        movb    $79, %ch
>
> -       jmp     final_init
> +       jmp     L_final_init
>
>        . = _start + GRUB_BOOT_MACHINE_PART_END
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  2009-07-16  3:47 ` [PATCH 2/2] RFT: Remove ABS macro " Pavel Roskin
@ 2009-07-18 15:17   ` Vladimir 'phcoder' Serbinenko
  2009-07-18 18:22     ` Robert Millan
  0 siblings, 1 reply; 15+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-07-18 15:17 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Jul 16, 2009 at 5:47 AM, Pavel Roskin<proski@gnu.org> wrote:
> ChangeLog:
>
>        * boot/i386/pc/boot.S: Remove ABS macro, it's useless now.
Could you wait before committing this patch? I'm currently making
grub2 compiling with gcc 2.95 supplied as a possibility (another one
is gcc 4.x) with haiku. The fixes are mostly also fixes for bad style.
Once I've finished I'll test this patch with gcc 2.95 to see if it
generates any problem with old systems
> ---
>  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 */
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  2009-07-18 15:17   ` Vladimir 'phcoder' Serbinenko
@ 2009-07-18 18:22     ` Robert Millan
  2009-07-18 18:34       ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Millan @ 2009-07-18 18:22 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Jul 18, 2009 at 05:17:10PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Thu, Jul 16, 2009 at 5:47 AM, Pavel Roskin<proski@gnu.org> wrote:
> > ChangeLog:
> >
> >        * boot/i386/pc/boot.S: Remove ABS macro, it's useless now.
> Could you wait before committing this patch? I'm currently making
> grub2 compiling with gcc 2.95 supplied as a possibility (another one
> is gcc 4.x) with haiku. The fixes are mostly also fixes for bad style.
> Once I've finished I'll test this patch with gcc 2.95 to see if it
> generates any problem with old systems

What kind of changes does this require?  gcc 2.95 is ten years old.  I don't
see a problem with supporting it if it comes really cheap, but I wouldn't
like having to live with a set of kludges if it's only for the sake of
keeping an old gcc around.

Aside from this, maybe someone should tell the Haiku folks that it won't
cost them a dime in license fees to upgrade their gcc sometime :-)

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  2009-07-18 18:22     ` Robert Millan
@ 2009-07-18 18:34       ` Vladimir 'phcoder' Serbinenko
  2009-07-18 19:16         ` Robert Millan
  0 siblings, 1 reply; 15+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-07-18 18:34 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Jul 18, 2009 at 8:22 PM, Robert Millan<rmh@aybabtu.com> wrote:
> On Sat, Jul 18, 2009 at 05:17:10PM +0200, Vladimir 'phcoder' Serbinenko wrote:
>> On Thu, Jul 16, 2009 at 5:47 AM, Pavel Roskin<proski@gnu.org> wrote:
>> > ChangeLog:
>> >
>> >        * boot/i386/pc/boot.S: Remove ABS macro, it's useless now.
>> Could you wait before committing this patch? I'm currently making
>> grub2 compiling with gcc 2.95 supplied as a possibility (another one
>> is gcc 4.x) with haiku. The fixes are mostly also fixes for bad style.
>> Once I've finished I'll test this patch with gcc 2.95 to see if it
>> generates any problem with old systems
>
> What kind of changes does this require?  gcc 2.95 is ten years old.  I don't
> see a problem with supporting it if it comes really cheap, but I wouldn't
> like having to live with a set of kludges if it's only for the sake of
> keeping an old gcc around.
I'm compiling now the code on qemu and if I succeed I push it to my
git and break into patches. The most of changes are added checks for
compiler features to avoid passing incompatible options and avoid
mixing declarations with code and putting double semicolons.
>
> Aside from this, maybe someone should tell the Haiku folks that it won't
> cost them a dime in license fees to upgrade their gcc sometime :-)
>
Haiku can be compiled and can use either gcc 4.x or gcc2.95. The main
reason for them to keep gcc 2.95 possibility is the binary
compatibility with BeOS. As François Revol explained me on IRC C++ ABI
changed from gcc2 to gcc3 and as BeOS and Haiku heavily rely on C++
it's impossible to launch BeOS apps under Haiku if it was compiled
with gcc4. Now there is also a possibility to compile haiku with gcc4
and some libraries compile additionally with gcc2 but currently it's
not a default. Anyway gcc4 is available on haiku and if it reveals
that supporing gcc2 is too expensive it's not really a problem
> --
> Robert Millan
>
>  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>  how) you may access your data; but nobody's threatening your freedom: we
>  still allow you to remove your data and not access it at all."
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  2009-07-18 18:34       ` Vladimir 'phcoder' Serbinenko
@ 2009-07-18 19:16         ` Robert Millan
  2009-08-07 17:15           ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 15+ messages in thread
From: Robert Millan @ 2009-07-18 19:16 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Jul 18, 2009 at 08:34:41PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> Haiku can be compiled and can use either gcc 4.x or gcc2.95. The main
> reason for them to keep gcc 2.95 possibility is the binary
> compatibility with BeOS. As François Revol explained me on IRC C++ ABI
> changed from gcc2 to gcc3 and as BeOS and Haiku heavily rely on C++
> it's impossible to launch BeOS apps under Haiku if it was compiled
> with gcc4.

Ok, but this doesn't seem to be related to GRUB, since we don't need to
link its utils with any proprietary code.  Can't they compile runtime
libraries intended for BeOS compatibility using gcc2 and use gcc4 for
GRUB (and, well, just about everything else)?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  2009-07-18 19:16         ` Robert Millan
@ 2009-08-07 17:15           ` Vladimir 'phcoder' Serbinenko
  2009-08-13  5:53             ` Pavel Roskin
  0 siblings, 1 reply; 15+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-08-07 17:15 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Jul 18, 2009 at 9:16 PM, Robert Millan<rmh@aybabtu.com> wrote:
> On Sat, Jul 18, 2009 at 08:34:41PM +0200, Vladimir 'phcoder' Serbinenko wrote:
>> Haiku can be compiled and can use either gcc 4.x or gcc2.95. The main
>> reason for them to keep gcc 2.95 possibility is the binary
>> compatibility with BeOS. As François Revol explained me on IRC C++ ABI
>> changed from gcc2 to gcc3 and as BeOS and Haiku heavily rely on C++
>> it's impossible to launch BeOS apps under Haiku if it was compiled
>> with gcc4.
>
> Ok, but this doesn't seem to be related to GRUB, since we don't need to
> link its utils with any proprietary code.  Can't they compile runtime
> libraries intended for BeOS compatibility using gcc2 and use gcc4 for
> GRUB (and, well, just about everything else)?
>
gcc2 even the one updated by haiku has bugs. I don't think we should
go long way just to support it. Hence I withdraw my request for
holding this patch back because of it
> --
> Robert Millan
>
>  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>  how) you may access your data; but nobody's threatening your freedom: we
>  still allow you to remove your data and not access it at all."
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH] RFT: Rename local labels with a macro from boot/i386/pc/boot.S
  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 ` [PATCH 2/2] RFT: Remove ABS macro " Pavel Roskin
  2009-07-16 16:31 ` [PATCH 1/2] RFT: Eliminate Apple specific code " Vladimir 'phcoder' Serbinenko
@ 2009-08-08 14:48 ` Yves Blusseau
  2009-08-08 14:55   ` Vladimir 'phcoder' Serbinenko
  2009-08-10 11:29   ` Robert Millan
  2 siblings, 2 replies; 15+ messages in thread
From: Yves Blusseau @ 2009-08-08 14:48 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

Here a patch to be apply after the 2 pavel's patch (Eliminate Apple  
specific code and Remove ABS macro). This patch create a new macro  
LOCAL to define local labels and rename all labels starting with "L_"  
with the new macro.

I have compil boot.img under OSX and boot with the new generated file  
without a problem.

Yves Blusseau

ChangeLog:

    * include/grub/symbol.h: add the LOCAL macro.
    * boot/i386/pc/boot.S: Rename all local labels starting with "L_"
    with the new macro: LOCAL.
---

boot/i386/pc/boot.S   |   66 ++++++++++++++++++++++++ 
+------------------------
include/grub/symbol.h |    2 +
2 files changed, 36 insertions(+), 32 deletions(-)


[-- Attachment #2: rft-rename-local-labels.patch --]
[-- Type: text/plain, Size: 5198 bytes --]

diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S
index 77319a7..865326e 100644
--- a/boot/i386/pc/boot.S
+++ b/boot/i386/pc/boot.S
@@ -17,6 +17,7 @@
  *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <grub/symbol.h>
 #include <grub/boot.h>
 #include <grub/machine/boot.h>
 
@@ -25,7 +26,7 @@
  */
 
 	/* Print message string */
-#define MSG(x)	movw $x, %si; call L_message
+#define MSG(x)	movw $x, %si; call LOCAL(message)
 
 	.file	"boot.S"
 
@@ -47,7 +48,7 @@ start:
 	 * parameter block.
 	 */
 
-	jmp	L_after_BPB
+	jmp	LOCAL(after_BPB)
 	nop	/* do I care about this ??? */
 
 	/*
@@ -95,7 +96,7 @@ boot_drive:
 	.byte 0xff	/* the disk to load kernel from */
 			/* 0xff means use the boot drive */
 
-L_after_BPB:
+LOCAL(after_BPB):
 
 /* general setup */
 	cli		/* we're not safe here! */
@@ -153,7 +154,7 @@ real_start:
 
 	/* do not probe LBA if the drive is a floppy */
 	testb	$GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
-	jz	L_chs_mode
+	jz	LOCAL(chs_mode)
 
 	/* check if LBA is supported */
 	movb	$0x41, %ah
@@ -168,12 +169,12 @@ real_start:
 	pushw	%dx
 
 	/* use CHS if fails */
-	jc	L_chs_mode
+	jc	LOCAL(chs_mode)
 	cmpw	$0xaa55, %bx
-	jne	L_chs_mode
+	jne	LOCAL(chs_mode)
 
 	andw	$1, %cx
-	jz	L_chs_mode
+	jz	LOCAL(chs_mode)
 
 lba_mode:
 	xorw	%ax, %ax
@@ -211,30 +212,30 @@ lba_mode:
 	int	$0x13
 
 	/* LBA read is not supported, so fallback to CHS.  */
-	jc	L_chs_mode
+	jc	LOCAL(chs_mode)
 
 	movw	$GRUB_BOOT_MACHINE_BUFFER_SEG, %bx
-	jmp	L_copy_buffer
+	jmp	LOCAL(copy_buffer)
 
-L_chs_mode:
+LOCAL(chs_mode):
 	/*
 	 *  Determine the hard disk geometry from the BIOS!
 	 *  We do this first, so that LS-120 IDE floppies work correctly.
 	 */
 	movb	$8, %ah
 	int	$0x13
-	jnc	L_final_init
+	jnc	LOCAL(final_init)
 
 	/*
 	 *  The call failed, so maybe use the floppy probe instead.
 	 */
 	testb	$GRUB_BOOT_MACHINE_BIOS_HD_FLAG, %dl
-	jz	L_floppy_probe
+	jz	LOCAL(floppy_probe)
 
 	/* Nope, we definitely have a hard disk, and we're screwed. */
-	jmp	L_hd_probe_error
+	jmp	LOCAL(hd_probe_error)
 
-L_final_init:
+LOCAL(final_init):
 	/* set the mode to zero */
 	movzbl	%dh, %eax
 	movb	%ah, -1(%si)
@@ -263,7 +264,7 @@ setup_sectors:
 	movl	kernel_sector + 4, %eax
 
 	orl	%eax, %eax
-	jnz	L_geometry_error
+	jnz	LOCAL(geometry_error)
 
 	/* load logical sector start (bottom half) */
 	movl	kernel_sector, %eax
@@ -282,7 +283,7 @@ setup_sectors:
 
 	/* do we need too many cylinders? */
 	cmpw	8(%si), %ax
-	jge	L_geometry_error
+	jge	LOCAL(geometry_error)
 
 	/* normalize sector start (1-based) */
 	incb	%cl
@@ -324,11 +325,11 @@ setup_sectors:
 	movw	$0x0201, %ax	/* function 2 */
 	int	$0x13
 
-	jc	L_read_error
+	jc	LOCAL(read_error)
 
 	movw	%es, %bx
 
-L_copy_buffer:
+LOCAL(copy_buffer):
 	/*
 	 * We need to save %cx and %si because the startup code in
 	 * kernel uses them without initializing them.
@@ -358,30 +359,31 @@ L_copy_buffer:
 /*
  * BIOS Geometry translation error (past the end of the disk geometry!).
  */
-L_geometry_error:
+LOCAL(geometry_error):
 	MSG(geometry_error_string)
-	jmp	L_general_error
+	jmp	LOCAL(general_error)
 
 /*
  * Disk probe failure.
  */
-L_hd_probe_error:
+LOCAL(hd_probe_error):
 	MSG(hd_probe_error_string)
-	jmp	L_general_error
+	jmp	LOCAL(general_error)
 
 /*
  * Read error on the disk.
  */
-L_read_error:
+LOCAL(read_error):
 	MSG(read_error_string)
 
-L_general_error:
+LOCAL(general_error):
 	MSG(general_error_string)
 
 /* go here when you need to stop the machine hard after an error condition */
         /* tell the BIOS a boot failure, which may result in no effect */
         int	$0x18
-L_stop:	jmp	L_stop
+LOCAL(stop):
+	jmp	LOCAL(stop)
 
 notification_string:	.asciz "GRUB "
 geometry_error_string:	.asciz "Geom"
@@ -404,7 +406,7 @@ general_error_string:	.asciz " Error\r\n"
 	movw	$0x0001, %bx
 	movb	$0xe, %ah
 	int	$0x10		/* display a byte */
-L_message:
+LOCAL(message):
 	lodsb
 	cmpb	$0, %al
 	jne	1b	/* if not end of string, jmp to display */
@@ -432,14 +434,14 @@ part_start:
 probe_values:
 	.byte	36, 18, 15, 9, 0
 
-L_floppy_probe:
+LOCAL(floppy_probe):
 /*
  *  Perform floppy probe.
  */
 
 	movw	$probe_values - 1, %si
 
-L_probe_loop:
+LOCAL(probe_loop):
 	/* reset floppy controller INT 13h AH=0 */
 	xorw	%ax, %ax
 	int	$0x13
@@ -455,7 +457,7 @@ L_probe_loop:
  * Floppy disk probe failure.
  */
 	MSG(fd_probe_error_string)
-	jmp	L_general_error
+	jmp	LOCAL(general_error)
 
 /* "Floppy" */
 fd_probe_error_string:	.asciz "Floppy"
@@ -468,14 +470,14 @@ fd_probe_error_string:	.asciz "Floppy"
 	movb	$0, %dh
 	int	$0x13
 
-	/* if error, jump to "L_probe_loop" */
-	jc	L_probe_loop
+	/* if error, jump to "LOCAL(probe_loop)" */
+	jc	LOCAL(probe_loop)
 
 	/* %cl is already the correct value! */
 	movb	$1, %dh
 	movb	$79, %ch
 
-	jmp	L_final_init
+	jmp	LOCAL(final_init)
 
 	. = _start + GRUB_BOOT_MACHINE_PART_END
 
diff --git a/include/grub/symbol.h b/include/grub/symbol.h
index 68d9f00..5fba549 100644
--- a/include/grub/symbol.h
+++ b/include/grub/symbol.h
@@ -21,6 +21,8 @@
 
 #include <config.h>
 
+#define LOCAL(X)	L_##X
+
 /* Add an underscore to a C symbol in assembler code if needed. */
 #ifdef HAVE_ASM_USCORE
 # define EXT_C(sym)	_ ## sym

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] RFT: Rename local labels with a macro from  boot/i386/pc/boot.S
  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
  1 sibling, 1 reply; 15+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-08-08 14:55 UTC (permalink / raw)
  To: The development of GRUB 2

On Sat, Aug 8, 2009 at 4:48 PM, Yves Blusseau<blusseau@zetam.org> wrote:
> Here a patch to be apply after the 2 pavel's patch (Eliminate Apple specific
> code and Remove ABS macro). This patch create a new macro LOCAL to define
> local labels and rename all labels starting with "L_" with the new macro.
>
Nice. I will submit later the patch to eliminate a lot of APPLE_CC
using LOCAL() macro. Could you test it on cygwin, linux and FreeBSD
and confirm that three patches together don't break anything?
> I have compil boot.img under OSX and boot with the new generated file
> without a problem.
>
> Yves Blusseau
>
> ChangeLog:
>
>   * include/grub/symbol.h: add the LOCAL macro.
>   * boot/i386/pc/boot.S: Rename all local labels starting with "L_"
>   with the new macro: LOCAL.
> ---
>
> boot/i386/pc/boot.S   |   66
> +++++++++++++++++++++++++------------------------
> include/grub/symbol.h |    2 +
> 2 files changed, 36 insertions(+), 32 deletions(-)
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] RFT: Rename local labels with a macro from boot/i386/pc/boot.S
  2009-08-08 14:55   ` Vladimir 'phcoder' Serbinenko
@ 2009-08-08 15:47     ` Yves Blusseau
  0 siblings, 0 replies; 15+ messages in thread
From: Yves Blusseau @ 2009-08-08 15:47 UTC (permalink / raw)
  To: The development of GRUB 2

Le 8 août 09 à 16:55, Vladimir 'phcoder' Serbinenko a écrit :

> On Sat, Aug 8, 2009 at 4:48 PM, Yves Blusseau<blusseau@zetam.org>  
> wrote:
>> Here a patch to be apply after the 2 pavel's patch (Eliminate Apple  
>> specific
>> code and Remove ABS macro). This patch create a new macro LOCAL to  
>> define
>> local labels and rename all labels starting with "L_" with the new  
>> macro.
>>
> Nice. I will submit later the patch to eliminate a lot of APPLE_CC
> using LOCAL() macro. Could you test it on cygwin, linux and FreeBSD
> and confirm that three patches together don't break anything?

I have compil and test on OSX and Linux:  "boot.img" load perfectly.
Need someonelse to test on cygwin and FreeBSD because i don't have  
this "OS".

Yves Blusseau


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] RFT: Rename local labels with a macro from boot/i386/pc/boot.S
  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-10 11:29   ` Robert Millan
  2009-08-13  6:13     ` Pavel Roskin
  1 sibling, 1 reply; 15+ messages in thread
From: Robert Millan @ 2009-08-10 11:29 UTC (permalink / raw)
  To: The development of GRUB 2; +Cc: Pavel Roskin

On Sat, Aug 08, 2009 at 04:48:32PM +0200, Yves Blusseau wrote:
> diff --git a/include/grub/symbol.h b/include/grub/symbol.h
> index 68d9f00..5fba549 100644
> --- a/include/grub/symbol.h
> +++ b/include/grub/symbol.h
> @@ -21,6 +21,8 @@
>  
>  #include <config.h>
>  
> +#define LOCAL(X)	L_##X
> +
>  /* Add an underscore to a C symbol in assembler code if needed. */
>  #ifdef HAVE_ASM_USCORE
>  # define EXT_C(sym)	_ ## sym

Assuming Pavel is OK with it, I have no objection.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/2] RFT: Eliminate Apple specific code from  boot/i386/pc/boot.S
  2009-07-16 16:31 ` [PATCH 1/2] RFT: Eliminate Apple specific code " Vladimir 'phcoder' Serbinenko
@ 2009-08-13  5:21   ` Pavel Roskin
  0 siblings, 0 replies; 15+ messages in thread
From: Pavel Roskin @ 2009-08-13  5:21 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, 2009-07-16 at 18:31 +0200, Vladimir 'phcoder' Serbinenko wrote:
> On Thu, Jul 16, 2009 at 5:47 AM, Pavel Roskin<proski@gnu.org> wrote:
> > ChangeLog:
> >
> >        * boot/i386/pc/boot.S: Remove all code dependent on APPLE_CC.
> >        Use local labels starting with "L_" so that Apple assembler
> >        would know they are local.
> You have really a lot of patches.

I don't think so.

> It's undoubtly a good thing but
> since I was on vacation I lost a track a bit. For casual viewers I
> suppose it's even worse. Perhaps you could create a git repository
> which would hold all patches you haven't committed yet, one per
> branch?

I'm sorry, I don't have time to create any private repositories.  I wish
I could do it, but I couldn't find time from that for almost a month, so
chances are it won't happen any time soon.

> It will make a much better overview. Bean created a mirror on
> github. Perhaps we can use it as a tool to have an easily-viewable
> list of all unmerged patches and prevent patches from get lost. I know
> it's really unfortunate that I come up with a proposition of using
> such system for a relatively small project like grub. Alternatively we
> may want to formulate rules which would prevent future developpement
> deadlocks.

There are ways to apply patches from e-mail.  STGit can do it.

My concern is that we would make the submitters responsible for
something other than the quality of the patch if we require them to
create private repositories.  Normally, a patch is good as long as it
applies.  With a private repository, it will need to be kept up-to-date
with the master repository, otherwise testing might find already fixed
problems.

As for the deadlocks, I don't think it's a technical issue.

In any case, I find myself submitting too many patches, I'm ready to
reconsider, but right now I cannot create any private repositories.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/2] RFT: Remove ABS macro from boot/i386/pc/boot.S
  2009-08-07 17:15           ` Vladimir 'phcoder' Serbinenko
@ 2009-08-13  5:53             ` Pavel Roskin
  0 siblings, 0 replies; 15+ messages in thread
From: Pavel Roskin @ 2009-08-13  5:53 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, 2009-08-07 at 19:15 +0200, Vladimir 'phcoder' Serbinenko wrote:

> gcc2 even the one updated by haiku has bugs. I don't think we should
> go long way just to support it. Hence I withdraw my request for
> holding this patch back because of it

Both patches have been committed.

Mirroring to git://repo.or.cz/grub2.git is currently not working.
Apparently they have run out of space:

error: file write error (No space left on device)
fatal: unable to write sha1 file
error: unpack failed: unpacker exited with error code
To git+ssh://repo.or.cz/srv/git/grub2.git
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'git+ssh://repo.or.cz/srv/git/grub2.git'

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] RFT: Rename local labels with a macro from boot/i386/pc/boot.S
  2009-08-10 11:29   ` Robert Millan
@ 2009-08-13  6:13     ` Pavel Roskin
  0 siblings, 0 replies; 15+ messages in thread
From: Pavel Roskin @ 2009-08-13  6:13 UTC (permalink / raw)
  To: The development of GRUB 2

On Mon, 2009-08-10 at 13:29 +0200, Robert Millan wrote:
> On Sat, Aug 08, 2009 at 04:48:32PM +0200, Yves Blusseau wrote:
> > diff --git a/include/grub/symbol.h b/include/grub/symbol.h
> > index 68d9f00..5fba549 100644
> > --- a/include/grub/symbol.h
> > +++ b/include/grub/symbol.h
> > @@ -21,6 +21,8 @@
> >  
> >  #include <config.h>
> >  
> > +#define LOCAL(X)	L_##X
> > +
> >  /* Add an underscore to a C symbol in assembler code if needed. */
> >  #ifdef HAVE_ASM_USCORE
> >  # define EXT_C(sym)	_ ## sym

I changed LOCAL to be more similar to EXT_C (macro arguments don't
normally use capital letters).  I also added a comment, as there is no
other way to know why we are adding "L_" to the labels.

> Assuming Pavel is OK with it, I have no objection.

Committed.  Thank you!

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-08-13  6:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] RFT: Remove ABS macro " Pavel Roskin
2009-07-18 15:17   ` 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

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.