[U-Boot] [PATCH v2 00/22] x86: Add ACPI S3 resume support

Stefan Roese sr at denx.de
Tue Apr 25 08:51:35 UTC 2017


Hi Bin,

On 25.04.2017 10:02, Bin Meng wrote:

<snip>

>> Booting Ubuntu 16.04 (kernel 4.4) with graphical interface seems to
>> have some (rare) problems though. When I boot into Ubuntu with the
>> correct "console=" configuration (log via serial console), suspend
>> / resume seems to work fine as well - at least in the tests I did
>> so far. But when I don't provide this "console=" and use "quiet"
>> instead, resume does not seem to work reliably. Most of the times it
>> works just fine as well, but sometimes the graphical user interface
>> doesn't come up at all after resuming (display stays in power safe
>> mode). The U-Boot log is the same in both cases:
>>
> 
> I only have a pre-installed Ubuntu 14.04 hard disk which was installed
> from U-Boot and SeaBIOS at the time when ACPI/SeaBIOS support was
> added to U-Boot long time ago. So suspend/resume does not work with my
> installation since I believe Ubuntu has lots of custom scripts for
> helping suspend/resume. I've run the testing on this installation
> though, and U-Boot did not even boot after I pressed the power button
> which means my Ubuntu 14.04 might not even put the system into the
> correct ACPI sleeping state. So I have to reinstall a new one.
> 
> So how about your Ubuntu 16.04 installation? Was it installed from
> U-Boot? Or from original commercial BIOS?

Installed via original congatec BIOS.

> What do you mean by "display
> stays in power safe mode"? Is it a black screen, or is it just
> U-Boot's video output screen?

Blank screen and the monitor does not wake up from power-safe
mode. I see the log on the serial console, since I've changed the
environment (stdio) to not use the LCD as the console in U-Boot.
U-Boot uses the console as a splash screen instead.
 
>> Jumping to OS waking vector 0009a1d0
>>
>> And the POST debug byte is also identical (0x40).
>>
> 
> These logs looks good. Nothing strange.
> 
>> Do you have any ideas, where this might come from? Could you
>> perhaps check this on MinnoxMax as well, if such a setup also
>> sometimes has problems with resuming? Is there anything that I could
>> do to test this on my platform?
>>
> 
> To match your env, I will install a 16.04 from U-Boot for testing. Can
> you add the following kernel parameters for testing suspend/resume?
> 
> "console=ttyS0,115200 initcall_debug ignore_loglevel no_console_suspend"

Ah, this brings some infos. Here the resume log:

[   49.810439] smpboot: CPU 3 is now offline
[   49.828153] PM: Calling kvm_suspend+0x0/0x30 [kvm]
[   49.833517] PM: Calling mce_syscore_suspend+0x0/0x20
[   49.839072] PM: Calling ledtrig_cpu_syscore_suspend+0x0/0x20
[   49.845404] PM: Calling acpi_processor_suspend+0x0/0x1e
[   49.851255] PM: Calling timekeeping_suspend+0x0/0x2a0
[   49.856925] PM: Calling irq_gc_suspend+0x0/0x70
[   49.861992] PM: Calling save_ioapic_entries+0x0/0x90
[   49.867738] PM: Calling i8259A_suspend+0x0/0x30
[   49.872806] PM: Calling fw_suspend+0x0/0x20
[   49.877484] PM: Calling lapic_suspend+0x0/0x1b0
��

U-Boot 2017.05-rc2-00122-gf6a9c0b4fd-dirty (Apr 24 2017 - 10:50:06 +0200)

CPU: x86_64, vendor Intel, device 30679h
DRAM:  4 GiB
MMC:   ValleyView SDHCI: 0, ValleyView SDHCI: 1, ValleyView SDHCI: 2
SF: Detected w25q64cv with page size 256 Bytes, erase size 4 KiB, total 8 MiB
Model: congatec-QEVAL20-QA3-E3845
SCSI:  SATA link 0 timeout.
Target spinup took 0 ms.
AHCI 0001.0300 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: 64bit ncq stag pm led clo pio slum part sxs 
scanning bus for devices...
  Device 0: (1:0) Vendor: ATA Prod.: SanDisk Ultra II Rev: X411
            Type: Hard Disk
            Capacity: 457862.8 MB = 447.1 GB (937703088 x 512)
Found 1 device(s).
Net:   e1000: 00:13:95:1c:51:e8
       eth0: e1000#0
Jumping to OS waking vector 0009a1d0
[   49.882704] ACPI: Low-level resume complete
[   49.887483] PM: Restoring platform NVS memory
[   49.892361] PM: Calling bsp_resume+0x0/0x20
[   49.897040] PM: Calling lapic_resume+0x0/0x2b0
[   49.902035] PM: Calling irqrouter_resume+0x0/0x3f
[   49.907297] PM: Calling i8259A_resume+0x0/0x30
[   49.912393] PM: Calling i8237A_resume+0x0/0x90
[   49.917434] PM: Calling ioapic_resume+0x0/0xa0
[   49.922495] PM: Calling irq_gc_resume+0x0/0x60
[   49.927464] PM: Calling irq_pm_syscore_resume+0x0/0x20
[   49.933256] PM: Calling timekeeping_resume+0x0/0x200
[   49.938844] PM: Calling acpi_processor_resume+0x0/0x5c
[   49.944595] PM: Calling ledtrig_cpu_syscore_resume+0x0/0x20
[   49.950829] PM: Calling mce_syscore_resume+0x0/0x30
[   49.956291] PM: Calling mc_bp_resume+0x0/0x50
[   49.961193] PM: Calling kvm_resume+0x0/0x40 [kvm]
[   49.966523] Enabling non-boot CPUs ...
[   49.990192] x86: Booting SMP configuration:
[   49.994894] smpboot: Booting Node 0 Processor 1 APIC 0x2
[   50.011048]  cache: parent cpu1 should not be sleeping
[   50.017239] CPU1 is up
[   50.038380] smpboot: Booting Node 0 Processor 2 APIC 0x4
[   50.054552]  cache: parent cpu2 should not be sleeping
[   50.060685] CPU2 is up
[   50.082550] smpboot: Booting Node 0 Processor 3 APIC 0x6
[   50.098820]  cache: parent cpu3 should not be sleeping
[   50.104972] CPU3 is up
[   50.108534] ACPI: Waking up from system sleep state S3
[   50.114576] calling  0000:00:00.0+ @ 2269, parent: pci0000:00
[   50.114630] calling  0000:00:02.0+ @ 163, parent: pci0000:00
[   50.114728] calling  0000:00:11.0+ @ 2265, parent: pci0000:00
[   50.114759] calling  0000:00:12.0+ @ 2268, parent: pci0000:00
[   50.114800] calling  0000:00:13.0+ @ 159, parent: pci0000:00
[   50.114830] calling  0000:00:15.0+ @ 149, parent: pci0000:00
[   50.114926] call 0000:00:15.0+ returned 0 after 86 usecs
[   50.114942] calling  0000:00:17.0+ @ 149, parent: pci0000:00
[   50.114979] calling  0000:00:1c.0+ @ 2267, parent: pci0000:00
[   50.115003] calling  0000:00:1c.1+ @ 40, parent: pci0000:00
[   50.115020] calling  0000:00:1c.2+ @ 2266, parent: pci0000:00
[   50.115261] call 0000:00:1c.0+ returned 0 after 267 usecs
[   50.115282] calling  0000:00:1c.3+ @ 2267, parent: pci0000:00
[   50.115289] call 0000:00:1c.1+ returned 0 after 268 usecs
[   50.115304] calling  0000:00:1d.0+ @ 40, parent: pci0000:00
[   50.115409] calling  0000:00:1e.0+ @ 6, parent: pci0000:00
[   50.115446] calling  0000:00:1e.1+ @ 158, parent: pci0000:00
[   50.115465] call 0000:00:1c.3+ returned 0 after 171 usecs
[   50.115482] calling  0000:00:1e.2+ @ 2271, parent: pci0000:00
[   50.115487] calling  0000:00:1e.4+ @ 2267, parent: pci0000:00
[   50.115689] calling  0000:00:1e.5+ @ 2270, parent: pci0000:00
[   50.115748] call 0000:00:1e.5+ returned 0 after 51 usecs
[   50.115759] calling  0000:00:1f.0+ @ 2270, parent: pci0000:00
[   50.115804] call 0000:00:1f.0+ returned 0 after 38 usecs
[   50.115813] calling  0000:00:1f.3+ @ 2270, parent: pci0000:00
[   50.115899] call 0000:00:1f.3+ returned 0 after 77 usecs
[   50.115907] calling  0000:04:00.0+ @ 2270, parent: 0000:00:1c.3
[   50.129887] call 0000:00:1e.1+ returned 0 after 14073 usecs
[   50.129890] call 0000:00:1e.2+ returned 0 after 14040 usecs
[   50.129959] call 0000:00:1e.0+ returned 0 after 14181 usecs
[   50.130106] call 0000:04:00.0+ returned 0 after 13839 usecs
[   50.130142] ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
[   50.130149] call 0000:00:1e.4+ returned 0 after 14290 usecs
[   50.130151] call 0000:00:1d.0+ returned 0 after 14471 usecs
[   50.130210] call 0000:00:17.0+ returned 0 after 14882 usecs
[   50.130256] call 0000:00:13.0+ returned 0 after 15063 usecs
[   50.130268] call 0000:00:11.0+ returned 0 after 15145 usecs
[   50.130311] call 0000:00:12.0+ returned 0 after 15158 usecs
[   50.130327] call 0000:00:02.0+ returned 0 after 15299 usecs
[   50.359559] call 0000:00:00.0+ returned 0 after 16 usecs
[   76.935630] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [kworker/u8:7:2266]
[   76.944393] Modules linked in: intel_rapl intel_soc_dts_iosf intel_powerclamp spi_pxa2xx_platform kvm_intel kvm irqbypass punit_atom_debug crct10dif_pclmul crc32_pclmul aesni_intel aes_x86_64 joydev input_leds lrw gf128mul glue_helper ablk_helper cryptd lpc_ich serio_raw pwm_lpss_pci spi_pxa2xx_pci pwm_lpss dw_dmac_pci dw_dmac_core shpchp 8250_fintek mac_hid nfsd auth_rpcgss nfs_acl lockd coretemp grace parport_pc ppdev lp parport sunrpc autofs4 hid_cherry usbhid hid mmc_block igb dca ptp i915 video drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ahci psmouse pps_core drm i2c_algo_bit sdhci_pci libahci sdhci fjes
[   77.006747] CPU: 0 PID: 2266 Comm: kworker/u8:7 Not tainted 4.4.0-36-generic #55-Ubuntu
[   77.015702] Hardware name: congatec conga-qeval20-qa3-e3845/conga-qeval20-qa3-e3845, BIOS 2017.05-rc2-00122-gf6a9c0b4fd-dirty 04/24/2017
[   77.029429] Workqueue: events_unbound async_run_entry_fn
[   77.035374] task: ffff8800628b0c80 ti: ffff880176dc8000 task.ti: ffff880176dc8000
[   77.043746] RIP: 0010:[<ffffffff81085ad1>]  [<ffffffff81085ad1>] __do_softirq+0x81/0x290
[   77.052807] RSP: 0018:ffff88017fc03f28  EFLAGS: 00000206
[   77.058747] RAX: ffff880176dcc000 RBX: 0000000000000000 RCX: 00000000000006e0
[   77.066730] RDX: 0000000000000000 RSI: 0000000004208060 RDI: 00000000000006e0
[   77.074704] RBP: ffff88017fc03f80 R08: ffff88017820e400 R09: ffff88017fc16d30
[   77.082687] R10: 0000000000000020 R11: 0000000000000004 R12: 0000000000000246
[   77.090669] R13: 00000000000000e2 R14: 000000000000002c R15: 000000000000000c
[   77.098653] FS:  0000000000000000(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000
[   77.107706] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   77.114132] CR2: 00007f7a3c016028 CR3: 0000000176cb5000 CR4: 00000000001006f0
[   77.122115] Stack:
[   77.124359]  042080607fc0ede8 ffff880176dcc000 00000000ffff0b90 ffffffff81f361c0
[   77.132648]  ffff88010000000a 000002827fc0d640 0000000000000000 0000000000000246
[   77.140937]  00000000000000e2 000000000000002c 000000000000000c ffff88017fc03f90
[   77.149226] Call Trace:
[   77.151957]  <IRQ> 
[   77.154107]  [<ffffffff81085e53>] irq_exit+0xa3/0xb0
[   77.159860]  [<ffffffff81830a62>] smp_apic_timer_interrupt+0x42/0x50
[   77.166969]  [<ffffffff8182ed22>] apic_timer_interrupt+0x82/0x90
[   77.173686]  <EOI> 
[   77.175834]  [<ffffffff8182da05>] ? _raw_spin_unlock_irqrestore+0x15/0x20
[   77.183630]  [<ffffffff81436269>] pci_bus_write_config_dword.part.7+0x59/0x70
[   77.191614]  [<ffffffff81436299>] pci_bus_write_config_dword+0x19/0x20
[   77.198919]  [<ffffffff8143c335>] pci_restore_config_dword+0x65/0xe0
[   77.206029]  [<ffffffff8143e1a2>] pci_restore_state.part.33+0x222/0x250
[   77.213429]  [<ffffffff8143e1e8>] pci_restore_state+0x18/0x20
[   77.219858]  [<ffffffff8144237f>] pci_pm_resume_noirq+0x2f/0xa0
[   77.226480]  [<ffffffff81442350>] ? pci_add_dynid+0xd0/0xd0
[   77.232715]  [<ffffffff81560ebe>] dpm_run_callback+0x4e/0x140
[   77.239143]  [<ffffffff81561060>] device_resume_noirq+0xb0/0x190
[   77.245861]  [<ffffffff8156115d>] async_resume_noirq+0x1d/0x50
[   77.252378]  [<ffffffff810a3208>] async_run_entry_fn+0x48/0x150
[   77.259001]  [<ffffffff8109a2c5>] process_one_work+0x165/0x480
[   77.265526]  [<ffffffff8109a62b>] worker_thread+0x4b/0x4c0
[   77.271662]  [<ffffffff8109a5e0>] ? process_one_work+0x480/0x480
[   77.278381]  [<ffffffff810a0808>] kthread+0xd8/0xf0
[   77.283826]  [<ffffffff810a0730>] ? kthread_create_on_node+0x1e0/0x1e0
[   77.291130]  [<ffffffff8182e34f>] ret_from_fork+0x3f/0x70
[   77.297168]  [<ffffffff810a0730>] ? kthread_create_on_node+0x1e0/0x1e0
[   77.304460] Code: 00 c7 45 c8 0a 00 00 00 48 89 45 c0 65 48 8b 04 25 04 42 01 00 48 89 45 b0 65 c7 05 76 e6 f8 7e 00 00 00 00 fb 66 0f 1f 44 00 00 <b8> ff ff ff ff 49 c7 c4 c0 90 e0 81 0f bc 45 d4 83 c0 01 89 45 
[  104.983574] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [kworker/u8:7:2266]
[  104.992336] Modules linked in: intel_rapl intel_soc_dts_iosf intel_powerclamp spi_pxa2xx_platform kvm_intel kvm irqbypass punit_atom_debug crct10dif_pclmul crc32_pclmul aesni_intel aes_x86_64 joydev input_leds lrw gf128mul glue_helper ablk_helper cryptd lpc_ich serio_raw pwm_lpss_pci spi_pxa2xx_pci pwm_lpss dw_dmac_pci dw_dmac_core shpchp 8250_fintek mac_hid nfsd auth_rpcgss nfs_acl lockd coretemp grace parport_pc ppdev lp parport sunrpc autofs4 hid_cherry usbhid hid mmc_block igb dca ptp i915 video drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ahci psmouse pps_core drm i2c_algo_bit sdhci_pci libahci sdhci fjes
[  105.054669] CPU: 0 PID: 2266 Comm: kworker/u8:7 Tainted: G             L  4.4.0-36-generic #55-Ubuntu
[  105.064986] Hardware name: congatec conga-qeval20-qa3-e3845/conga-qeval20-qa3-e3845, BIOS 2017.05-rc2-00122-gf6a9c0b4fd-dirty 04/24/2017
[  105.078710] Workqueue: events_unbound async_run_entry_fn
[  105.084655] task: ffff8800628b0c80 ti: ffff880176dc8000 task.ti: ffff880176dc8000
[  105.093017] RIP: 0010:[<ffffffff81085ad1>]  [<ffffffff81085ad1>] __do_softirq+0x81/0x290
[  105.102075] RSP: 0018:ffff88017fc03f28  EFLAGS: 00000206
[  105.108015] RAX: ffff880176dcc000 RBX: 0000000000000000 RCX: 00000000000006e0
[  105.115998] RDX: 0000000000000000 RSI: 0000000004208060 RDI: 00000000000006e0
[  105.123980] RBP: ffff88017fc03f80 R08: ffff88017820e400 R09: ffff88017fc16d30
[  105.131963] R10: 0000000000000020 R11: 0000000000000004 R12: 0000000000000246
[  105.139936] R13: 00000000000000e2 R14: 000000000000002c R15: 000000000000000c
[  105.147920] FS:  0000000000000000(0000) GS:ffff88017fc00000(0000) knlGS:0000000000000000
[  105.156963] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  105.163390] CR2: 00007f7a3c016028 CR3: 0000000176cb5000 CR4: 00000000001006f0
[  105.171372] Stack:
[  105.173615]  042080607fc0ede8 ffff880176dcc000 00000000ffff0b90 ffffffff81f361c0
[  105.181905]  ffff88010000000a 000002827fc0d640 0000000000000000 0000000000000246
[  105.190194]  00000000000000e2 000000000000002c 000000000000000c ffff88017fc03f90
[  105.198483] Call Trace:
[  105.201212]  <IRQ> 
[  105.203360]  [<ffffffff81085e53>] irq_exit+0xa3/0xb0
[  105.209112]  [<ffffffff81830a62>] smp_apic_timer_interrupt+0x42/0x50
[  105.216221]  [<ffffffff8182ed22>] apic_timer_interrupt+0x82/0x90
[  105.222938]  <EOI> 
[  105.225086]  [<ffffffff8182da05>] ? _raw_spin_unlock_irqrestore+0x15/0x20
[  105.232870]  [<ffffffff81436269>] pci_bus_write_config_dword.part.7+0x59/0x70
[  105.240854]  [<ffffffff81436299>] pci_bus_write_config_dword+0x19/0x20
[  105.248159]  [<ffffffff8143c335>] pci_restore_config_dword+0x65/0xe0
[  105.255267]  [<ffffffff8143e1a2>] pci_restore_state.part.33+0x222/0x250
[  105.262667]  [<ffffffff8143e1e8>] pci_restore_state+0x18/0x20
[  105.269095]  [<ffffffff8144237f>] pci_pm_resume_noirq+0x2f/0xa0
[  105.275718]  [<ffffffff81442350>] ? pci_add_dynid+0xd0/0xd0
[  105.281951]  [<ffffffff81560ebe>] dpm_run_callback+0x4e/0x140
[  105.288379]  [<ffffffff81561060>] device_resume_noirq+0xb0/0x190
[  105.295099]  [<ffffffff8156115d>] async_resume_noirq+0x1d/0x50
[  105.301624]  [<ffffffff810a3208>] async_run_entry_fn+0x48/0x150
[  105.308247]  [<ffffffff8109a2c5>] process_one_work+0x165/0x480
[  105.314772]  [<ffffffff8109a62b>] worker_thread+0x4b/0x4c0
[  105.320908]  [<ffffffff8109a5e0>] ? process_one_work+0x480/0x480
[  105.327628]  [<ffffffff810a0808>] kthread+0xd8/0xf0
[  105.333083]  [<ffffffff810a0730>] ? kthread_create_on_node+0x1e0/0x1e0
[  105.340386]  [<ffffffff8182e34f>] ret_from_fork+0x3f/0x70
[  105.346426]  [<ffffffff810a0730>] ? kthread_create_on_node+0x1e0/0x1e0

...

Thanks,
Stefan


More information about the U-Boot mailing list