x86_32 machine with 4G - possible wrong last_pfn value ?

From: Haim D.
Date: Sun Mar 06 2011 - 10:04:44 EST


Hi,
I'm running Âa x86_32 bit 4G machine with 2.4.33 and 2.6.34, I've
noticed the difference between max_pfn values
2.4.33 shows 0x100000
2.4.34 shows Â0xdffe0

The issue seems to be in
--- 2.6.34/arch/x86/kernel/e820.c    17 Jun 2010 12:00:26 -0000   Â1.1.2.1
+++ 2.6.34/arch/x86/kernel/e820.c    6 Mar 2011 14:56:44 -0000
@@ -869,7 +869,7 @@ static unsigned long __init e820_end_pfn
       Âstart_pfn = ei->addr >> PAGE_SHIFT;
       Âend_pfn = (ei->addr + ei->size) >> PAGE_SHIFT;

- Â Â Â Â Â Â Â if (start_pfn >= limit_pfn)
+ Â Â Â Â Â Â Â if (start_pfn > limit_pfn)
           Âcontinue;
       Âif (end_pfn > limit_pfn) {
           Âlast_pfn = limit_pfn;

=======2.4=======
Mar Â3 09:22:32 accelerator kernel: Linux version 2.4.33
(root@haimd-ubuntu) (gcc version 3.2.3 20030502 (Red Hat Linux
3.2.3-53)) #3 Wed Mar 2 18:36:10 IST
Mar Â6 13:27:17 localhost kernel: BIOS-provided physical RAM map:
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 0000000000000000 -
000000000009fc00 (usable)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 000000000009fc00 -
00000000000a0000 (reserved)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 00000000000e0000 -
0000000000100000 (reserved)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 0000000000100000 -
00000000dffe0000 (usable)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 00000000dffe0000 -
00000000dffee000 (ACPI data)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 00000000dffee000 -
00000000e0000000 (ACPI NVS)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 00000000fee00000 -
00000000fee01000 (reserved)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 00000000ffb00000 -
0000000100000000 (reserved)
Mar Â6 13:27:17 localhost kernel: ÂBIOS-e820: 0000000100000000 -
0000000120000000 (usable)
Mar Â6 13:27:17 localhost kernel: Warning only 4GB will be used.
Mar Â6 13:27:17 localhost kernel: Use a PAE enabled kernel.
Mar Â6 13:27:17 localhost kernel: (find_max_low_pfn:1003) max_low_pfn to 753664
Mar Â6 13:27:17 localhost kernel: 1152MB HIGHMEM available.
Mar Â6 13:27:17 localhost kernel: 2944MB LOWMEM available.
Mar Â6 13:27:17 localhost kernel: found SMP MP-table at 000ff780
Mar Â6 13:27:17 localhost kernel: hm, page 000ff000 reserved twice.
Mar Â6 13:27:17 localhost kernel: hm, page 00100000 reserved twice.
Mar Â6 13:27:17 localhost kernel: hm, page 000fd000 reserved twice.
Mar Â6 13:27:17 localhost kernel: hm, page 000fe000 reserved twice.
Mar Â6 13:27:17 localhost kernel: On node 0 totalpages: 1048576

============2.6 ==========
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] Linux version
2.6.34.aos (root@builder) (gcc version 4.1.2 20080704 (Red Hat
4.1.2-48)) #1 Thu Mar 3 17:54:29 IST 2011
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] BIOS-provided physical RAM map:
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
0000000000000000 - 000000000009fc00 (usable)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
000000000009fc00 - 00000000000a0000 (reserved)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
00000000000e0000 - 0000000000100000 (reserved)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
0000000000100000 - 00000000dffe0000 (usable)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
00000000dffe0000 - 00000000dffee000 (ACPI data)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
00000000dffee000 - 00000000e0000000 (ACPI NVS)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
00000000fee00000 - 00000000fee01000 (reserved)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
00000000ffb00000 - 0000000100000000 (reserved)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] ÂBIOS-e820:
0000000100000000 - 0000000120000000 (usable)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] Notice: NX (Execute
Disable) protection cannot be enabled: non-PAE kernel!
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] DMI present.
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] AMI BIOS detected:
BIOS may corrupt low RAM, working around it.
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] e820 update range:
0000000000000000 - 0000000000010000 (usable) ==> (reserved)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] e820 update range:
0000000000000000 - 0000000000001000 (usable) ==> (reserved)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] e820 remove range:
00000000000a0000 - 0000000000100000 (usable)
Mar Â6 08:19:06 localhost kernel: [ Â Â0.000000] last_pfn = 0xdffe0
max_arch_pfn = 0x100000

please advise,
-haim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/