Hello!
I believe the issue with adding the "mem" option for the Linux kernels
should be revisited. There have been several bug reports in the Linux
PCMCIA list (http://lists.infradead.org/pipermail/linux-pcmcia) that
turned out to be caused by that option. Some PCMCIA bridges prefer their
memory resource 0 to be allocate at the end of the first gigabyte of
memory, and BIOS does it. It the system has 1 Gb of memory, GNU GRUB
instructs to treat that area as system memory. Using --no-mem-option
fixes the problem. It's going to become a FAQ.
In fact, it would be very strange if any bootloader was doing better job
and determining memory layout than the Linux kernel on its most supported
architecture.
I believe that adding the "mem" option was intended to prevent breakage in
old Linux kernels. It was also meant to protect GNU GRUB developers from
complaints about Linux bugs. I believe the situation has changed and the
issue should be revisited.
Linux boot protocol 2.03, which appeared in Linux 2.4.18 and is present in
2.6 kernels, provides a pointer to the kernel version. We could parse it
to see if the kernel can be trusted to do its own memory detection. But
for simplicity we could assume that any Linux kernel with boot protocol
2.03 should be trusted.
The attached patch makes --no-mem-option implied for Linux kernels with
boot protocol 2.03, i.e. kernel versions 2.4.18 and newer.
--
Regards,
Pavel Roskin
--- ChangeLog
+++ ChangeLog
@@ -1 +1,6 @@
+2004-03-28 Pavel Roskin <[EMAIL PROTECTED]>
+
+ * stage2/boot.c: Imply --no-mem-option for Linux kernels with
+ protocol version 0x0203 and above (Linux 2.4.18 and newer).
+
2004-03-27 Yoshinori K. Okuji <[EMAIL PROTECTED]>
--- NEWS
+++ NEWS
@@ -6,6 +6,7 @@
* Support ATARAID for Linux in the grub shell and grub-install.
* Add CDROM support for El Torito with no emulation mode. You can use
(cd) as a CDROM drive in the config file.
+* Option --no-mem-option is implied for Linux 2.4.18 and newer.
New in 0.94 - 2004-01-25:
* Support building on x86-64 with gcc -m32.
--- docs/grub.texi
+++ docs/grub.texi
@@ -2735,7 +2735,7 @@
The option @option{--no-mem-option} is effective only for Linux. If the
option is specified, GRUB doesn't pass the option @option{mem=} to the
-kernel.
+kernel. This option is implied for Linux kernels 2.4.18 and newer.
@end deffn
--- stage2/boot.c
+++ stage2/boot.c
@@ -408,9 +408,10 @@ load_image (char *kernel, char *arg, ker
*(dest++) = *(src++);
/* Add a mem option automatically only if the user doesn't
- specify it explicitly. */
+ specify it explicitly (old kernels only). */
if (! grub_strstr (arg, "mem=")
&& ! (load_flags & KERNEL_LOAD_NO_MEM_OPTION)
+ && lh->version < 0x0203 /* kernel version < 2.4.18 */
&& dest + 15 < linux_data_tmp_addr + LINUX_CL_END_OFFSET)
{
*dest++ = ' ';
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub