All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Millan <rmh@aybabtu.com>
To: grub-devel@gnu.org
Subject: [PATCH] s/GRUB_MEMORY_MACHINE_LINK_ADDR/GRUB_KERNEL_MACHINE_LINK_ADDR/g (Re: [PATCH] i386-qemu port)
Date: Mon, 22 Jun 2009 17:02:52 +0200	[thread overview]
Message-ID: <20090622150252.GA28202@thorin> (raw)
In-Reply-To: <20090621181748.GA21152@thorin>

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


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."

[-- Attachment #2: memory_kernel.diff --]
[-- Type: text/x-diff, Size: 2145 bytes --]

2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>

	* 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);

  parent reply	other threads:[~2009-06-22 15:03 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21 18:17 [PATCH] i386-qemu port Robert Millan
2009-06-21 18:50 ` does module area require alignment? (Re: [PATCH] i386-qemu port) Robert Millan
2009-06-21 19:08   ` Pavel Roskin
2009-06-21 19:33     ` Robert Millan
2009-06-22 12:31       ` [PATCH] define GRUB_MOD_ALIGN to 0 on non-ieee1275 (Re: does module area require alignment? (Re: [PATCH] i386-qemu port)) Robert Millan
2009-06-22 19:43         ` Pavel Roskin
2009-06-22 20:41           ` Robert Millan
2009-06-22 20:51             ` Pavel Roskin
2009-06-22 21:22               ` Robert Millan
2009-06-22 21:45                 ` Pavel Roskin
2009-06-22 22:31                   ` Robert Millan
2009-06-22 19:51       ` does module area require alignment? (Re: [PATCH] i386-qemu port) Pavel Roskin
2009-06-22 22:50         ` Vladimir 'phcoder' Serbinenko
2009-06-23  0:10           ` Pavel Roskin
2009-06-21 18:54 ` [PATCH] move grub_stop() " Robert Millan
2009-06-21 19:05   ` Pavel Roskin
2009-06-21 19:25     ` Robert Millan
2009-06-22  2:14       ` Pavel Roskin
2009-06-22 10:10         ` Robert Millan
2009-06-22 16:16           ` Pavel Roskin
2009-06-22 18:05             ` Robert Millan
2009-06-21 19:00 ` [PATCH] i386-qemu port Pavel Roskin
2009-06-21 19:30   ` Robert Millan
2009-06-22 12:45     ` Robert Millan
2009-06-21 20:34   ` Robert Millan
2009-06-21 20:40     ` Vladimir 'phcoder' Serbinenko
2009-06-21 19:19 ` [PATCH] rename kernel.elf to kernel.img (Re: [PATCH] i386-qemu port) Robert Millan
2009-06-22  2:20   ` Pavel Roskin
2009-06-22 10:27     ` Robert Millan
2009-06-21 19:52 ` [PATCH] swap real_to_prot() and prot_to_real() " Robert Millan
2009-06-22  1:56   ` Pavel Roskin
2009-06-22 10:45     ` Robert Millan
2009-06-21 20:22 ` [PATCH] i386-qemu port Robert Millan
2009-06-22  1:50   ` Pavel Roskin
2009-06-22 10:57     ` Robert Millan
2009-06-21 22:53 ` [PATCH] access gdtdesc on segment 0 unconditionally (Re: [PATCH] i386-qemu port) Robert Millan
2009-06-22  1:22   ` Pavel Roskin
2009-06-22  9:52     ` Robert Millan
2009-06-22 19:39       ` Pavel Roskin
2009-06-22 20:52         ` Robert Millan
2009-06-22 21:32           ` Robert Millan
2009-06-22 21:44             ` Pavel Roskin
2009-06-22 22:43               ` Robert Millan
2009-06-23  0:53                 ` Pavel Roskin
2009-06-23 11:02                   ` Robert Millan
2009-06-22 21:36           ` Pavel Roskin
2009-06-22 22:52             ` Robert Millan
2009-06-22 10:26     ` about Apple compiler (Re: [PATCH] access gdtdesc on segment 0 unconditionally (Re: [PATCH] i386-qemu port)) Robert Millan
2009-06-22 16:10       ` Pavel Roskin
2009-06-22 15:02 ` Robert Millan [this message]
2009-06-22 19:00   ` [PATCH] s/GRUB_MEMORY_MACHINE_LINK_ADDR/GRUB_KERNEL_MACHINE_LINK_ADDR/g (Re: [PATCH] i386-qemu port) Pavel Roskin
2009-06-22 23:07 ` clean patch for i386-qemu port " Robert Millan
2009-06-23  1:29   ` Pavel Roskin
2009-06-23 11:38     ` Robert Millan
2009-06-23 12:13       ` Robert Millan
2009-06-24  1:00         ` Robert Millan
2009-06-24 23:10           ` [PATCH] fix for loading modules from read-only memory area (Re: clean patch for i386-qemu port (Re: [PATCH] i386-qemu port)) Robert Millan
2009-06-25 19:53             ` Pavel Roskin
2009-06-25 20:31               ` Robert Millan
2009-06-25 20:51                 ` Pavel Roskin
2009-06-26 14:41                   ` Robert Millan
2009-06-26 16:44                     ` Pavel Roskin
2009-06-26 17:03                       ` Robert Millan
2009-06-26 17:16                         ` Pavel Roskin
2009-06-26 17:43                           ` Robert Millan
2009-06-26 19:52                             ` Pavel Roskin
2009-06-26 22:26                             ` Pavel Roskin
2009-06-26 23:57                               ` Robert Millan
2009-06-27  3:08                                 ` Pavel Roskin
2009-06-27 11:18                                   ` Robert Millan
2009-06-29  3:48                                     ` 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=20090622150252.GA28202@thorin \
    --to=rmh@aybabtu.com \
    --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.