Skip to contentSkip to conversation

Warning messages

DISCUSSION "João.Paulo.Just.Peixoto <[email protected]> 2 participants 2 messages May 2, 2004 – May 3, 2004

lore
Share & tools
lore
#0 lore raw

Hello all,

Everytime I compile the 2.6.5 Linux kernel I get these warning messages:

AS arch/i386/boot/setup.o
/usr/src/linux-2.6.5/arch/i386/boot/setup.S: Assembler messages:
/usr/src/linux-2.6.5/arch/i386/boot/setup.S:159: Warning: value 0x37ffffff truncated to 0x37ffffff

What does it mean?

Thanks in advance.

#1 lore raw
Quoted 8 lines · On Sat, 1 May 2004 22:55:59 +0100, linux-kernel-owner+joern=40wohnheim.fh-wedel…

Everytime I compile the 2.6.5 Linux kernel I get these warning messages:

AS arch/i386/boot/setup.o
/usr/src/linux-2.6.5/arch/i386/boot/setup.S: Assembler messages:
/usr/src/linux-2.6.5/arch/i386/boot/setup.S:159: Warning: value 0x37ffffff truncated to 0x37ffffff

What does it mean?

That the kernel depends on a funny side effect of the assembler. It's harmless, but if you don't like it, apply the patch below. Linus, would you consider it as well?

Jörn

Signature · 22 lines
When in doubt, use brute force.
-- Ken Thompson


The warning is correct, the calculated value for ramdisk_max would be
0xb7ffffff instead of 0x37ffffff.  Truncating 0xb7ffffff to 0x37ffffff
is desired behaviour, so we should do it explicitly.

 setup.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.1/arch/i386/boot/setup.S~initrd_warning	2004-03-09 11:37:29.000000000 +0100
+++ linux-2.6.1/arch/i386/boot/setup.S	2004-03-09 11:38:59.000000000 +0100
@@ -162,7 +162,8 @@
 					# can be located anywhere in
 					# low memory 0x10000 or higher.
 
-ramdisk_max:	.long MAXMEM-1		# (Header version 0x0203 or later)
+ramdisk_max:	.long (MAXMEM-1) & 0x7fffffff
+					# (Header version 0x0203 or later)
 					# The highest safe address for
 					# the contents of an initrd