From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MIl35-0001Iy-Er for mharc-grub-devel@gnu.org; Mon, 22 Jun 2009 11:03:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIl34-0001IN-9O for grub-devel@gnu.org; Mon, 22 Jun 2009 11:03:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIl2z-0001G9-Lh for grub-devel@gnu.org; Mon, 22 Jun 2009 11:03:05 -0400 Received: from [199.232.76.173] (port=36976 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIl2z-0001FK-Fg for grub-devel@gnu.org; Mon, 22 Jun 2009 11:03:01 -0400 Received: from aybabtu.com ([69.60.117.155]:41817) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MIl2x-0007yk-IJ for grub-devel@gnu.org; Mon, 22 Jun 2009 11:02:59 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MIjzt-0006S9-MY for grub-devel@gnu.org; Mon, 22 Jun 2009 15:55:46 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MIl2q-0007L9-89 for grub-devel@gnu.org; Mon, 22 Jun 2009 17:02:52 +0200 Date: Mon, 22 Jun 2009 17:02:52 +0200 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20090622150252.GA28202@thorin> References: <20090621181748.GA21152@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="J/dobhs11T7y2rNN" Content-Disposition: inline In-Reply-To: <20090621181748.GA21152@thorin> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) Subject: [PATCH] s/GRUB_MEMORY_MACHINE_LINK_ADDR/GRUB_KERNEL_MACHINE_LINK_ADDR/g (Re: [PATCH] i386-qemu port) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 15:03:06 -0000 --J/dobhs11T7y2rNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline My latest qemu patch removes the redundancy between boot.img link address and GRUB_BOOT_MACHINE_SIZE. This requires two macros for distinguishing between kernel & boot link addresses: GRUB_BOOT_MACHINE_LINK_ADDR = 0xffe00 GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200 whereas the existing GRUB_MEMORY_MACHINE_LINK_ADDR becomes ambigous. This patch discards it in favour of GRUB_KERNEL_MACHINE_LINK_ADDR (the i386-pc bits need to be modified, since they share grub-mkimage code). -- 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." --J/dobhs11T7y2rNN Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="memory_kernel.diff" 2009-06-22 Robert Millan * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ... (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this. Update all users. Index: conf/i386-pc.rmk =================================================================== --- conf/i386-pc.rmk (revision 2358) +++ conf/i386-pc.rmk (working copy) @@ -1,6 +1,6 @@ # -*- makefile -*- -GRUB_MEMORY_MACHINE_LINK_ADDR = 0x8200 +GRUB_KERNEL_MACHINE_LINK_ADDR = 0x8200 COMMON_ASFLAGS = -nostdinc -fno-builtin -m32 COMMON_CFLAGS = -fno-builtin -mrtd -mregparm=3 -m32 @@ -67,7 +67,7 @@ machine/kernel.h machine/pxe.h i386/pit.h list.h handler.h command.h kernel_img_CFLAGS = $(COMMON_CFLAGS) $(TARGET_IMG_CFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS) -kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_MEMORY_MACHINE_LINK_ADDR) $(COMMON_CFLAGS) +kernel_img_LDFLAGS = $(COMMON_LDFLAGS) $(TARGET_IMG_LDFLAGS)$(GRUB_KERNEL_MACHINE_LINK_ADDR) $(COMMON_CFLAGS) kernel_img_FORMAT = binary MOSTLYCLEANFILES += symlist.c kernel_syms.lst @@ -95,7 +95,7 @@ grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \ util/resolve.c lib/LzmaEnc.c lib/LzFind.c endif -grub_mkimage_CFLAGS = -DGRUB_MEMORY_MACHINE_LINK_ADDR=$(GRUB_MEMORY_MACHINE_LINK_ADDR) +grub_mkimage_CFLAGS = -DGRUB_KERNEL_MACHINE_LINK_ADDR=$(GRUB_KERNEL_MACHINE_LINK_ADDR) util/i386/pc/grub-mkimage.c_DEPENDENCIES = Makefile # For grub-setup. Index: util/i386/pc/grub-mkimage.c =================================================================== --- util/i386/pc/grub-mkimage.c (revision 2358) +++ util/i386/pc/grub-mkimage.c (working copy) @@ -270,9 +270,9 @@ = grub_cpu_to_le32 (-2); } - if (GRUB_MEMORY_MACHINE_LINK_ADDR + core_size > GRUB_MEMORY_MACHINE_UPPER) + if (GRUB_KERNEL_MACHINE_LINK_ADDR + core_size > GRUB_MEMORY_MACHINE_UPPER) grub_util_error ("Core image is too big (%p > %p)\n", - GRUB_MEMORY_MACHINE_LINK_ADDR + core_size, GRUB_MEMORY_MACHINE_UPPER); + GRUB_KERNEL_MACHINE_LINK_ADDR + core_size, GRUB_MEMORY_MACHINE_UPPER); grub_util_write_image (core_img, core_size, out); free (kernel_img); --J/dobhs11T7y2rNN--