Skip to contentSkip to conversation

3.9.7, 3.10-rc7 - UEFI stalls at boot (nothing displayed), when booting with mem=300M

DISCUSSION Matthew Thode 4 participants 18 messages Jun 27, 2013 – Jul 16, 2013

lore
Share & tools
lore
#0 lore raw

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

This seems like it might be hardware specific, I am running on a Lenovo T520, running bios version 1.42, firmware rev 1.36.

This seems to be limited to x86_64, as i386 does boot.

I build my initram into the kernel image, the following boot line triggers the issue. The issue causes no kernel messages to be printed to screen (looks like the kernel isn't loading at all to my untrained eyes).

linux /kernel-3.9.7 mem=300M

the following link contains kernel images and vmlinux for both amd64 and the referenced kernel versions
http://dev.gentoo.org/~prometheanfire/bugs/471626/

we are tracking the bug here (keep in mind, this is NOT a pax bug)
https://bugs.gentoo.org/show_bug.cgi?id=471626

I have tested the following combinations.

amd64 - 300M - 3.9.7    -    bug hit
amd64 - 300M - 3.10-rc7 -    big hit
amd64 - 16G  - 3.9.7    -    bug not hit
amd64 - 16G  - 3.10-rc7 -    bug not hit
i386  - 300M - 3.9.7    -    bug not hit
i386  - 300M - 3.10-rc7 -    other bug possibly hit
i386  - 16G  - 3.9.7    -    bug not hit
i386  - 16G  - 3.10-rc7 -    other bug possibly hit

the pictures taken for the other possible bug hit are located at
http://goo.gl/741ub

Signature · 1 line
-- Matthew Thode (prometheanfire)
#1 lore raw
Quoted 2 lines · Matthew Thode

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

Does it happen on systems that genuinely have small amounts of memory, or only on systems where you're passing mem=?

Signature · 1 line
Matthew Garrett | [email protected]
#2 lore raw
Quoted 7 lines · Matthew Garrett
Quoted 2 lines · Matthew Thode

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

Does it happen on systems that genuinely have small amounts of memory, or only on systems where you're passing mem=?

I don't have a system (or even memory to place in this one) that has that small amount of memory. Do they even make ddr3 sodimms that small?

Signature · 1 line
-- Matthew Thode (prometheanfire)
#3 lore raw
Quoted 10 lines · Matthew Thode
Quoted 7 lines · Matthew Garrett
Quoted 2 lines · Matthew Thode

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

Does it happen on systems that genuinely have small amounts of memory, or only on systems where you're passing mem=?

I don't have a system (or even memory to place in this one) that has that small amount of memory. Do they even make ddr3 sodimms that small?

I've no idea. If a bug can't be triggered on any hardware that actually exists, it doesn't seem like a high priority.

Signature · 1 line
Matthew Garrett | [email protected]
#4 lore raw
Quoted 6 lines · Matthew Garrett
Quoted 5 lines · Matthew Thode
Quoted 4 lines · Matthew Garrett
Quoted 2 lines · Matthew Thode

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

Does it happen on systems that genuinely have small amounts of memory, or only on systems where you're passing mem=?

I don't have a system (or even memory to place in this one) that has that small amount of memory. Do they even make ddr3 sodimms that small?

I've no idea. If a bug can't be triggered on any hardware that actually exists, it doesn't seem like a high priority.

Dunno, I've asked in the bug for more testing from others that have hit the problem. I'll let you know what I find.

Signature · 1 line
-- Matthew Thode (prometheanfire)
#5 lore raw
In reply to Matthew Thode
Quoted 6 lines · Matthew Thode

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

This seems like it might be hardware specific, I am running on a Lenovo T520, running bios version 1.42, firmware rev 1.36.

Had the same problem with linux 3.10-rc1 and a stock mac book pro, I hadn't investigated much further though.

lu

#6 lore raw
Quoted 4 lines · Luca Barbato
Quoted 3 lines · Matthew Thode

There is an early boot failure with linux-3.[9,10].??? when booting using uefi on low memory systems.

Quoted 9 lines
Quoted 3 lines

This seems like it might be hardware specific, I am running on a Lenovo T520, running bios version 1.42, firmware rev 1.36.

Had the same problem with linux 3.10-rc1 and a stock mac book pro, I hadn't investigated much further though.

lu

You had the problem where it was blank on boot (right after grub, no kernel messages at all)? Sounds like this might not be limited to just Lenovo then.

mjg59, is there anything I can do to help move this bug forward? I've done all I can think of (even tried a serial expresscard slot for logging).

Signature · 1 line
-- Matthew Thode (prometheanfire)
#7 lore raw
Quoted 3 lines · Matthew Thode

You had the problem where it was blank on boot (right after grub, no kernel messages at all)? Sounds like this might not be limited to just Lenovo then.

no grub, efi-stub directly from the efi shell.

Quoted 2 lines

mjg59, is there anything I can do to help move this bug forward? I've done all I can think of (even tried a serial expresscard slot for logging).

If you feel like bisecting seems the only option =_=

lu

#8 lore raw
Quoted 6 lines · Luca Barbato
Quoted 3 lines · Matthew Thode

You had the problem where it was blank on boot (right after grub, no kernel messages at all)? Sounds like this might not be limited to just Lenovo then.

Quoted 9 lines

no grub, efi-stub directly from the efi shell.

Quoted 2 lines

mjg59, is there anything I can do to help move this bug forward? I've done all I can think of (even tried a serial expresscard slot for logging).

If you feel like bisecting seems the only option =_=

lu

I was hoping to avoid that, was thinking of bisecting 3.8->3.9 for only the uefi stuff though, should help keep the traffic down.

Signature · 1 line
-- Matthew Thode (prometheanfire)
#9 lore raw
In reply to Matthew Thode
Quoted 2 lines · Matthew Thode

mjg59, is there anything I can do to help move this bug forward? I've done all I can think of (even tried a serial expresscard slot for logging).

It does sound like a bug, but unfortunately unless it can be duplicated on real hardware without restrictive mem= arguments it's likely to be low on my priorities - there's still enough UEFI bugs that hit people in default configurations that they tend to get priority, I'm afraid.

Signature · 1 line
Matthew Garrett | [email protected]
#10 lore raw
Quoted 10 lines · Matthew Garrett
Quoted 2 lines · Matthew Thode

mjg59, is there anything I can do to help move this bug forward? I've done all I can think of (even tried a serial expresscard slot for logging).

It does sound like a bug, but unfortunately unless it can be duplicated on real hardware without restrictive mem= arguments it's likely to be low on my priorities - there's still enough UEFI bugs that hit people in default configurations that they tend to get priority, I'm afraid.

real hardware ->

MacBookPro8,2 with efi-stub, loading directly from the efi shell w/out any memory restriction.

I guess I should try to get more information for you and see if it isn't some configuration quirk.

lu

#11 lore raw
Quoted 2 lines · Luca Barbato

MacBookPro8,2 with efi-stub, loading directly from the efi shell w/out any memory restriction.

How do you know this is the same issue?

Signature · 1 line
Matthew Garrett | [email protected]
#12 lore raw
Quoted 7 lines · Matthew Garrett
Quoted 2 lines · Luca Barbato

MacBookPro8,2 with efi-stub, loading directly from the efi shell w/out any memory restriction.

How do you know this is the same issue?

Same behavior? Can't really know until it's solved I think. Unfortunately this bug seems to cause a lack of info.

Signature · 1 line
-- Matthew Thode (prometheanfire)
#13 lore raw
In reply to Matthew Garrett
Quoted 7 lines · Matthew Garrett
Quoted 2 lines · Luca Barbato

MacBookPro8,2 with efi-stub, loading directly from the efi shell w/out any memory restriction.

How do you know this is the same issue?

I believe in duck bugs, if the range of broken commits looks the same, and the behaviour looks the same, probably the cause is the same, or at least I once can be investigated on real hardware and probably once fixed the other might be fixed as well.

I have not deep knowledge of uefi/efi internals so I'll need some pointers to figure out exactly why it happens.

Hopefully I will carve some time next weekend to play the restricted bisect game.

lu

#14 lore raw
Quoted 2 lines · Luca Barbato

Hopefully I will carve some time next weekend to play the restricted bisect game.

Release 3.10 apparently doesn't show the problem, I guess problem solved for me =)

lu

#15 lore raw
Quoted 9 lines · Luca Barbato
Quoted 2 lines · Luca Barbato

Hopefully I will carve some time next weekend to play the restricted bisect game.

Release 3.10 apparently doesn't show the problem, I guess problem solved for me =)

lu

I've just tried 3.10.0 with CONFIG_EFI=y and I still can't boot with mem=300M.

Regards,

Signature · 1 line
Yves-Alexis
#16 lore raw
Quoted 5 lines · Yves-Alexis Perez
Quoted 4 lines · Luca Barbato
Quoted 2 lines · Luca Barbato

Hopefully I will carve some time next weekend to play the restricted bisect game.

Quoted 7 lines
Quoted 5 lines

Release 3.10 apparently doesn't show the problem, I guess problem solved for me =)

lu

I've just tried 3.10.0 with CONFIG_EFI=y and I still can't boot with mem=300M.

And to be a little more specific, and with a bit of fun, I've tryied “bisecting” the amount of ram needed to make a successful boot. Platform is a Lenovo Thinkpad x230 with 4G of ram.

mem=300M bad
mem=4000M good
mem=2000M bad
mem=3000M bad
mem=3500M good
mem=3250M bad
mem=3375M bad
mem=3437M good
mem=3406M bad
mem=3421M bad
mem=3429M bad
mem=3433M good
mem=3431M bad
mem=3432M bad

So I'm not sure what happens at the 3433M boundary, but there's definitely something fishy. And 3.5G ram doesn't look like a very specific machine (although I can't test without artificially setting the memory limit (I only have one 4096M sodimm).

I'll try to git bisect between 3.8 and 3.10 and using mem=3432M when I have more time.

Regards,

Signature · 1 line
Yves-Alexis
#17 lore raw
Quoted 37 lines · Yves-Alexis Perez
Quoted 5 lines · Yves-Alexis Perez
Quoted 4 lines · Luca Barbato
Quoted 2 lines · Luca Barbato

Hopefully I will carve some time next weekend to play the restricted bisect game.

Quoted 7 lines
Quoted 5 lines

Release 3.10 apparently doesn't show the problem, I guess problem solved for me =)

lu

I've just tried 3.10.0 with CONFIG_EFI=y and I still can't boot with mem=300M.

And to be a little more specific, and with a bit of fun, I've tryied “bisecting” the amount of ram needed to make a successful boot. Platform is a Lenovo Thinkpad x230 with 4G of ram.

mem=300M bad
mem=4000M good
mem=2000M bad
mem=3000M bad
mem=3500M good
mem=3250M bad
mem=3375M bad
mem=3437M good
mem=3406M bad
mem=3421M bad
mem=3429M bad
mem=3433M good
mem=3431M bad
mem=3432M bad

So I'm not sure what happens at the 3433M boundary, but there's definitely something fishy. And 3.5G ram doesn't look like a very specific machine (although I can't test without artificially setting the memory limit (I only have one 4096M sodimm).

Quoted 5 lines

I'll try to git bisect between 3.8 and 3.10 and using mem=3432M when I have more time.

Regards,

I tested with a single 2G dimm at pipacs's request. Here is what I found.

mem=unset: booted
mem=1930M: booted
mem=1929M: failed

Booted with memblock=debug and found the following :D

It looks like the uefi regions are simply higher then what the kernel allows. Here's a grep'd dmesg and /proc/iomem. Maybe the kernel shouldn't allow you to set mem= to lower then the mem that uefi actually uses?

Signature · 1 line
-- Matthew Thode (prometheanfire)
[    0.000000] efi: EFI v2.00 by Lenovo
[    0.000000] efi:  ACPI=0x78ffe000  ACPI 2.0=0x78ffe014  SMBIOS=0x78e9e000 
[    0.000000] efi: mem00: type=3, attr=0xf, range=[0x0000000000000000-0x0000000000001000) (0MB)
[    0.000000] efi: mem01: type=7, attr=0xf, range=[0x0000000000001000-0x000000000004e000) (0MB)
[    0.000000] efi: mem02: type=3, attr=0xf, range=[0x000000000004e000-0x0000000000058000) (0MB)
[    0.000000] efi: mem03: type=10, attr=0xf, range=[0x0000000000058000-0x0000000000059000) (0MB)
[    0.000000] efi: mem04: type=7, attr=0xf, range=[0x0000000000059000-0x000000000005e000) (0MB)
[    0.000000] efi: mem05: type=4, attr=0xf, range=[0x000000000005e000-0x000000000005f000) (0MB)
[    0.000000] efi: mem06: type=3, attr=0xf, range=[0x000000000005f000-0x00000000000a0000) (0MB)
[    0.000000] efi: mem07: type=2, attr=0xf, range=[0x0000000000100000-0x0000000001d00000) (28MB)
[    0.000000] efi: mem08: type=7, attr=0xf, range=[0x0000000001d00000-0x0000000002000000) (3MB)
[    0.000000] efi: mem09: type=2, attr=0xf, range=[0x0000000002000000-0x0000000003c00000) (28MB)
[    0.000000] efi: mem10: type=7, attr=0xf, range=[0x0000000003c00000-0x0000000020000000) (452MB)
[    0.000000] efi: mem11: type=0, attr=0xf, range=[0x0000000020000000-0x0000000020200000) (2MB)
[    0.000000] efi: mem12: type=7, attr=0xf, range=[0x0000000020200000-0x000000002eb38000) (233MB)
[    0.000000] efi: mem13: type=4, attr=0xf, range=[0x000000002eb38000-0x000000002eb58000) (0MB)
[    0.000000] efi: mem14: type=7, attr=0xf, range=[0x000000002eb58000-0x0000000030d9a000) (34MB)
[    0.000000] efi: mem15: type=0, attr=0xf, range=[0x0000000030d9a000-0x0000000030f9a000) (2MB)
[    0.000000] efi: mem16: type=4, attr=0xf, range=[0x0000000030f9a000-0x0000000031b28000) (11MB)
[    0.000000] efi: mem17: type=7, attr=0xf, range=[0x0000000031b28000-0x0000000057a2f000) (607MB)
[    0.000000] efi: mem18: type=2, attr=0xf, range=[0x0000000057a2f000-0x0000000074d99000) (467MB)
[    0.000000] efi: mem19: type=7, attr=0xf, range=[0x0000000074d99000-0x0000000074f82000) (1MB)
[    0.000000] efi: mem20: type=1, attr=0xf, range=[0x0000000074f82000-0x0000000074f9f000) (0MB)
[    0.000000] efi: mem21: type=7, attr=0xf, range=[0x0000000074f9f000-0x0000000075b79000) (11MB)
[    0.000000] efi: mem22: type=4, attr=0xf, range=[0x0000000075b79000-0x0000000077f9f000) (36MB)
[    0.000000] efi: mem23: type=7, attr=0xf, range=[0x0000000077f9f000-0x000000007822d000) (2MB)
[    0.000000] efi: mem24: type=2, attr=0xf, range=[0x000000007822d000-0x0000000078236000) (0MB)
[    0.000000] efi: mem25: type=3, attr=0xf, range=[0x0000000078236000-0x000000007899f000) (7MB)
[    0.000000] efi: mem26: type=5, attr=0x800000000000000f, range=[0x000000007899f000-0x0000000078ac0000) (1MB)
[    0.000000] efi: mem27: type=5, attr=0x800000000000000f, range=[0x0000000078ac0000-0x0000000078b9f000) (0MB)
[    0.000000] efi: mem28: type=6, attr=0x800000000000000f, range=[0x0000000078b9f000-0x0000000078cb1000) (1MB)
[    0.000000] efi: mem29: type=6, attr=0x800000000000000f, range=[0x0000000078cb1000-0x0000000078d9f000) (0MB)
[    0.000000] efi: mem30: type=0, attr=0xf, range=[0x0000000078d9f000-0x0000000078e1f000) (0MB)
[    0.000000] efi: mem31: type=0, attr=0xf, range=[0x0000000078e1f000-0x0000000078e9b000) (0MB)
[    0.000000] efi: mem32: type=0, attr=0xf, range=[0x0000000078e9b000-0x0000000078e9c000) (0MB)
[    0.000000] efi: mem33: type=0, attr=0xf, range=[0x0000000078e9c000-0x0000000078e9f000) (0MB)
[    0.000000] efi: mem34: type=10, attr=0xf, range=[0x0000000078e9f000-0x0000000078ede000) (0MB)
[    0.000000] efi: mem35: type=10, attr=0xf, range=[0x0000000078ede000-0x0000000078f9f000) (0MB)
[    0.000000] efi: mem36: type=9, attr=0xf, range=[0x0000000078f9f000-0x0000000078fdd000) (0MB)
[    0.000000] efi: mem37: type=9, attr=0xf, range=[0x0000000078fdd000-0x0000000078fff000) (0MB)
[    0.000000] efi: mem38: type=4, attr=0xf, range=[0x0000000078fff000-0x0000000079000000) (0MB)
[    0.000000] efi: mem39: type=7, attr=0xf, range=[0x0000000100000000-0x0000000100600000) (6MB)
[    0.000000] efi: mem40: type=11, attr=0x8000000000000001, range=[0x00000000f80f8000-0x00000000f80f9000) (0MB)
[    0.000000] efi: mem41: type=11, attr=0x8000000000000001, range=[0x00000000fed1c000-0x00000000fed20000) (0MB)
[    0.000000] efi: Could not reserve boot range [0x0000000000-0x0000000fff]
[    0.000000] memblock_reserve: [0x0000000004e000-0x00000000058000] efi_reserve_boot_services+0x128/0x180
[    0.000000] memblock_reserve: [0x0000000005e000-0x0000000005f000] efi_reserve_boot_services+0x128/0x180
[    0.000000] efi: Could not reserve boot range [0x000005f000-0x000009ffff]
[    0.000000] memblock_reserve: [0x0000002eb38000-0x0000002eb58000] efi_reserve_boot_services+0x128/0x180
[    0.000000] memblock_reserve: [0x00000030f9a000-0x00000031b28000] efi_reserve_boot_services+0x128/0x180
[    0.000000] memblock_reserve: [0x00000075b79000-0x00000077f9f000] efi_reserve_boot_services+0x128/0x180
[    0.000000] memblock_reserve: [0x00000078236000-0x0000007899f000] efi_reserve_boot_services+0x128/0x180
[    0.000000] memblock_reserve: [0x00000078fff000-0x00000079000000] efi_reserve_boot_services+0x128/0x180
[    0.000000] ACPI: UEFI 0000000078fdf000 0003E (v01 LENOVO TP-8A    00001420 PTL  00000002)
[    0.000000] ACPI: UEFI 0000000078fde000 00042 (v01 PTL      COMBUF 00000001 PTL  00000001)
[    0.000000] ACPI: UEFI 0000000078fdd000 00292 (v01 LENOVO TP-8A    00001420 PTL  00000002)
[    1.439188] efifb: probing for efifb
[    1.439633] efifb: framebuffer at 0x80000000, mapped to 0xffffc90009580000, using 1216k, total 1216k
[    1.439658] efifb: mode is 640x480x32, linelength=2560, pages=1
[    1.439670] efifb: scrolling: redraw
[    1.439685] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    1.445524] fb0: EFI VGA frame buffer device
[    1.568214] fb: conflicting fb hw usage inteldrmfb vs EFI VGA - removing generic driver
[    2.359805] tsc: Refined TSC clocksource calibration: 2491.905 MHz
[    3.384447] EFI Variables Facility v0.08 2004-May-17

00000000-00000fff : reserved
00001000-00057fff : System RAM
00058000-00058fff : ACPI Non-volatile Storage
00059000-0009ffff : System RAM
000a0000-000bffff : PCI Bus 0000:00
000c0000-000c7fff : Video ROM
000c8000-000cbfff : pnp 00:00
000cc000-000cffff : pnp 00:00
000d0000-000d3fff : pnp 00:00
000d4000-000d7fff : pnp 00:00
000d8000-000dbfff : pnp 00:00
000dc000-000dffff : pnp 00:00
000e0000-000e3fff : pnp 00:00
000e4000-000e7fff : pnp 00:00
000e8000-000ebfff : pnp 00:00
000ec000-000effff : pnp 00:00
000f0000-000fffff : System ROM
00100000-1fffffff : System RAM
02000000-02df8f33 : Kernel code
03400000-035a4aff : Kernel data
039d3000-03b17fff : Kernel bss
20000000-201fffff : reserved
20200000-30d99fff : System RAM
30d9a000-30f99fff : reserved
30f9a000-7899efff : System RAM
7899f000-78e9efff : reserved
78e9f000-78f9efff : ACPI Non-volatile Storage
78f9f000-78ffefff : ACPI Tables
78fff000-78ffffff : System RAM
79000000-7bffffff : RAM buffer
7da00000-febfffff : PCI Bus 0000:00
7da00000-7dbfffff : PCI Bus 0000:02
7dc00000-7ddfffff : PCI Bus 0000:02
80000000-8fffffff : 0000:00:02.0
90000000-903fffff : 0000:00:02.0
90400000-90bfffff : PCI Bus 0000:05
90c00000-913fffff : PCI Bus 0000:0d
91400000-91bfffff : PCI Bus 0000:0d

    91400000-914007ff : 0000:0d:00.3
    91401000-914010ff : 0000:0d:00.0
      91401000-914010ff : mmc0
  91c00000-923fffff : PCI Bus 0000:05
  92400000-924fffff : PCI Bus 0000:03
    92400000-92401fff : 0000:03:00.0
      92400000-92401fff : iwlwifi
  92500000-9251ffff : 0000:00:19.0
    92500000-9251ffff : e1000e
  92520000-92523fff : 0000:00:1b.0
    92520000-92523fff : ICH HD audio
  92524000-925240ff : 0000:00:1f.3
  92525000-9252500f : 0000:00:16.0
    92525000-9252500f : mei
  92528000-925287ff : 0000:00:1f.2
    92528000-925287ff : ahci
  92529000-925293ff : 0000:00:1d.0
    92529000-925293ff : ehci_hcd
  9252a000-9252a3ff : 0000:00:1a.0
    9252a000-9252a3ff : ehci_hcd
  9252b000-9252bfff : 0000:00:19.0
    9252b000-9252bfff : e1000e
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
    f80f8000-f80f8fff : reserved

fec00000-fec003ff : IOAPIC 0
fed00000-fed003ff : HPET 0
fed10000-fed13fff : pnp 00:01
fed18000-fed18fff : pnp 00:01
fed19000-fed19fff : pnp 00:01
fed1c000-fed1ffff : reserved
fed1c000-fed1ffff : pnp 00:01

    fed1f410-fed1f414 : iTCO_wdt
      fed1f410-fed1f414 : iTCO_wdt

fed40000-fed4bfff : PCI Bus 0000:00
fed45000-fed4bfff : pnp 00:01
fed90000-fed90fff : dmar0
fed91000-fed91fff : dmar1
fee00000-fee00fff : Local APIC
100000000-1005fffff : System RAM
100600000-103ffffff : RAM buffer