All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>, Jim Bos <jim876@xs4all.nl>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg KH <gregkh@suse.de>, "H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: 2.6.39.1 immediately reboots/resets on EFI system
Date: Tue, 07 Jun 2011 08:14:57 -0700	[thread overview]
Message-ID: <4DEE4071.2020607@kernel.org> (raw)
In-Reply-To: <4DEDE071.4020401@gmail.com>

On 06/07/2011 01:25 AM, Maarten Lankhorst wrote:
> Hi,
> 
> Op 07-06-11 04:05, Yinghai Lu schreef:
>> On 06/06/2011 06:41 PM, Matthew Garrett wrote:
>>> On Mon, Jun 06, 2011 at 05:19:17PM -0700, Yinghai Lu wrote:
>>>
>>>> assume EFI in ram is not page-aligned?
>>> They'll be 4K aligned at least.
>>>
>>
>> can you get boot log with "memblock=debug"?
>>
>> wonder if 
>>
>> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
>> index 4be9b39..c6724e4 100644 (file)
>> --- a/arch/x86/kernel/setup.c
>> +++ b/arch/x86/kernel/setup.c
>> @@ -912,6 +912,13 @@ void __init setup_arch(char **cmdline_p)
>>         memblock.current_limit = get_max_mapped();
>>         memblock_x86_fill();
>>  
>> +       /*
>> +        * The EFI specification says that boot service code won't be called
>> +        * after ExitBootServices(). This is, in fact, a lie.
>> +        */
>> +       if (efi_enabled)
>> +               efi_reserve_boot_services(
>>
>> wonder if double memblock ram array in memblock_x86_fill() that is overlapping with boot services.
> Seems that numa's NODE_DATA beats the boot services to reserving the boot block, and it's already being reserved. Kinda makes my previous patch miss the point. :-)

NODE_DATA are get allocated from initmem_init() and it is rather later after efi_reserve_boot_services()

> 
> Is moving efi_reserve_boot_memory to inside efi_init(); allowed?

no, memblock reserved array can not be resized yet at that point, so if you have too many entries for efi entries, will have problem.

> 
> [    0.000000] Initializing cgroup subsys cpuset
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Linux version 3.0.0-rc1-patser+ (mlankhorst@patser.local) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4) ) #27 SMP PREEMPT Tue Jun 7 09:49:18 CEST 2011
> [    0.000000] Command line: ro rootflags=ssd,discard root=/dev/sdb2 devtmpfs.mount=1 video=efifb reboot=a,e,p init=/init quiet splash vt.handoff=7 memblock=debug
> [    0.000000] BIOS-provided physical RAM map:
> [    0.000000]  BIOS-e820: 0000000000000100 - 00000000000a0000 (usable)
> [    0.000000]  BIOS-e820: 0000000000100000 - 00000000befa5000 (usable)
> [    0.000000]  BIOS-e820: 00000000befa5000 - 00000000bf2c0000 (reserved)
> [    0.000000]  BIOS-e820: 00000000bf2c0000 - 00000000bf311000 (ACPI NVS)
> [    0.000000]  BIOS-e820: 00000000bf311000 - 00000000bf60c000 (reserved)
> [    0.000000]  BIOS-e820: 00000000bf60c000 - 00000000bf60d000 (usable)
> [    0.000000]  BIOS-e820: 00000000bf60d000 - 00000000bf60e000 (ACPI data)
> [    0.000000]  BIOS-e820: 00000000bf60e000 - 00000000bf618000 (ACPI NVS)
> [    0.000000]  BIOS-e820: 00000000bf618000 - 00000000bf63d000 (reserved)
> [    0.000000]  BIOS-e820: 00000000bf63d000 - 00000000bf680000 (ACPI NVS)
> [    0.000000]  BIOS-e820: 00000000bf680000 - 00000000bf800000 (usable)
> [    0.000000]  BIOS-e820: 00000000fed1c000 - 00000000fed40000 (reserved)
> [    0.000000]  BIOS-e820: 00000000ff000000 - 0000000100000000 (reserved)
> [    0.000000]  BIOS-e820: 0000000100000000 - 000000023f800000 (usable)
> [    0.000000] NX (Execute Disable) protection: active
> [    0.000000] DMI not present or invalid.
> [    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
> [    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
> [    0.000000] No AGP bridge found
> [    0.000000] last_pfn = 0x23f800 max_arch_pfn = 0x400000000
> [    0.000000] MTRR default type: uncachable
> [    0.000000] MTRR fixed ranges enabled:
> [    0.000000]   00000-9FFFF write-back
> [    0.000000]   A0000-BFFFF uncachable
> [    0.000000]   C0000-CFFFF write-protect
> [    0.000000]   D0000-DFFFF uncachable
> [    0.000000]   E0000-E7FFF write-through
> [    0.000000]   E8000-FFFFF write-protect
> [    0.000000] MTRR variable ranges enabled:
> [    0.000000]   0 base 000000000 mask E00000000 write-back
> [    0.000000]   1 base 200000000 mask FC0000000 write-back
> [    0.000000]   2 base 0C0000000 mask FC0000000 uncachable
> [    0.000000]   3 base 23F800000 mask FFF800000 uncachable
> [    0.000000]   4 disabled
> [    0.000000]   5 disabled
> [    0.000000]   6 disabled
> [    0.000000]   7 disabled
> [    0.000000]   8 disabled
> [    0.000000]   9 disabled
> [    0.000000] x86 PAT enabled: cpu 0, old 0x7010600070106, new 0x7010600070106
> [    0.000000] e820 update range: 00000000c0000000 - 0000000100000000 (usable) ==> (reserved)
> [    0.000000] last_pfn = 0xbf800 max_arch_pfn = 0x400000000
> [    0.000000] found SMP MP-table at [ffff8800000fcf50] fcf50
> [    0.000000]     memblock_x86_reserve_range: [0x000fcf50-0x000fcf5f]   * MP-table mpf
> [    0.000000]     memblock_x86_reserve_range: [0x000fcbf0-0x000fced3]   * MP-table mpc
> [    0.000000] MEMBLOCK configuration:
> [    0.000000]  memory size = 0x1fe8b6000
> [    0.000000]  memory.cnt  = 0x5
> [    0.000000]  memory[0x0]    [0x00000000010000-0x0000000009ffff], 0x90000 bytes
> [    0.000000]  memory[0x1]    [0x00000000100000-0x000000befa4fff], 0xbeea5000 bytes
> [    0.000000]  memory[0x2]    [0x000000bf60c000-0x000000bf60cfff], 0x1000 bytes
> [    0.000000]  memory[0x3]    [0x000000bf680000-0x000000bf7fffff], 0x180000 bytes
> [    0.000000]  memory[0x4]    [0x00000100000000-0x0000023f7fffff], 0x13f800000 bytes
> [    0.000000]  reserved.cnt  = 0x2
> [    0.000000]  reserved[0x0]    [0x0000000009d800-0x000000000fffff], 0x62800 bytes
> [    0.000000]  reserved[0x1]    [0x00000001000000-0x00000001c67fff], 0xc68000 bytes

should have some 
	memblock_x86_reserve_range: [xxxxx-xxxx]       EFI Boot
...


> [    0.000000] initial memory mapped : 0 - 20000000
> [    0.000000]     memblock_x86_reserve_range: [0x00098000-0x0009cfff]       TRAMPOLINE
> [    0.000000] Base memory trampoline at [ffff880000098000] 98000 size 20480
> [    0.000000] init_memory_mapping: 0000000000000000-00000000bf800000
> [    0.000000]  0000000000 - 00bf800000 page 2M
> [    0.000000] kernel direct mapping tables up to bf800000 @ bf7fc000-bf800000
> [    0.000000]     memblock_x86_reserve_range: [0xbf7fc000-0xbf7fdfff]          PGTABLE
> [    0.000000] init_memory_mapping: 0000000100000000-000000023f800000
> [    0.000000]  0100000000 - 023f800000 page 2M
> [    0.000000] kernel direct mapping tables up to 23f800000 @ 23f7f6000-23f800000
> [    0.000000]     memblock_x86_reserve_range: [0x23f7f6000-0x23f7fafff]          PGTABLE
> [    0.000000] ACPI: RSDP 00000000000fcf60 00024 (v02 ALASKA)
> [    0.000000] ACPI: XSDT 00000000bf309070 0005C (v01 ALASKA    A M I 01072009 AMI  00010013)
> [    0.000000] ACPI: FACP 00000000bf310048 000F4 (v04 ALASKA    A M I 01072009 AMI  00010013)
> [    0.000000] ACPI: DSDT 00000000bf309158 06EED (v02 ALASKA    A M I 00000000 INTL 20051117)
> [    0.000000] ACPI: FACS 00000000bf60ff80 00040
> [    0.000000] ACPI: APIC 00000000bf310140 00072 (v03 ALASKA    A M I 01072009 AMI  00010013)
> [    0.000000] ACPI: SSDT 00000000bf3101b8 00102 (v01 AMICPU     PROC 00000001 MSFT 03000001)
> [    0.000000] ACPI: MCFG 00000000bf3102c0 0003C (v01 ALASKA    A M I 01072009 MSFT 00000097)
> [    0.000000] ACPI: AAFT 00000000bf310300 0006F (v01 ALASKA OEMAAFT  01072009 MSFT 00000097)
> [    0.000000] ACPI: HPET 00000000bf310370 00038 (v01 ALASKA    A M I 01072009 AMI. 00000004)
> [    0.000000] ACPI: DMAR 00000000bf3103a8 000B0 (v01 ALASKA    A M I 00000001 INTL 00000001)
> [    0.000000] ACPI: Local APIC address 0xfee00000
> [    0.000000] No NUMA configuration found
> [    0.000000] Faking a node at 0000000000000000-000000023f800000
> [    0.000000] Initmem setup node 0 0000000000000000-000000023f800000
> [    0.000000]     memblock_x86_reserve_range: [0x23f7fb000-0x23f7fffff]        NODE_DATA
> [    0.000000]   NODE_DATA [000000023f7fb000 - 000000023f7fffff]
> [    0.000000]     memblock_x86_reserve_range: [0x23f7f5000-0x23f7f5fff]          BOOTMEM
> [    0.000000]     memblock_x86_reserve_range: [0x23f3f5000-0x23f7f4fff]          BOOTMEM
> [    0.000000]     memblock_x86_reserve_range: [0x23f3f4a00-0x23f3f4fff]          BOOTMEM
> [    0.000000]     memblock_x86_reserve_range: [0x23eff4a00-0x23f3f49ff]          BOOTMEM
> [    0.000000]     memblock_x86_reserve_range: [0x236e00000-0x23edfffff]          BOOTMEM
> [    0.000000]     memblock_x86_reserve_range: [0x23eff3000-0x23eff3fff]          BOOTMEM
> [    0.000000]     memblock_x86_reserve_range: [0x23eff2000-0x23eff2fff]          BOOTMEM
> [    0.000000]        memblock_x86_free_range: [0x23de00000-0x23edfffff]
> [    0.000000]  [ffffea0000000000-ffffea0007dfffff] PMD -> [ffff880236e00000-ffff88023ddfffff] on node 0
> [    0.000000]        memblock_x86_free_range: [0x23eff4a00-0x23f3f49ff]
> [    0.000000]        memblock_x86_free_range: [0x23f3f5000-0x23f7f4fff]
> 
> ~Maarten


  reply	other threads:[~2011-06-07 15:15 UTC|newest]

Thread overview: 129+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 11:15 gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ? Jim
2010-11-07 21:31 ` Andi Kleen
2010-11-07 22:41   ` Andreas Schwab
2010-11-07 23:03     ` Andi Kleen
2010-11-08 10:49       ` Richard Guenther
2010-11-08 11:20         ` Andi Kleen
2010-11-08 11:20           ` Richard Guenther
2010-11-08 11:47             ` Paul Koning
2010-11-08 11:53               ` Jakub Jelinek
2010-11-08 12:20           ` Michael Matz
2010-11-08 18:39           ` Dave Korn
2010-11-09 13:00             ` Michael Matz
2010-11-09 13:48               ` Andi Kleen
2010-11-09 13:57                 ` Andreas Schwab
2010-11-09 16:43                   ` Jim
2010-11-13 11:13                     ` [PATCH] i8k: Tell gcc that *regs gets clobbered Jim Bos
2010-11-15  0:52                     ` gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ? James Cloos
2010-11-15  3:21                       ` Linus Torvalds
2010-11-15  8:56                         ` Jakub Jelinek
2010-11-15  9:12                           ` Andi Kleen
2010-11-15  9:20                           ` Jakub Jelinek
2010-11-15 10:03                           ` Jakub Jelinek
2010-11-15 10:54                             ` Andi Kleen
2010-11-15 11:16                               ` Jakub Jelinek
2010-11-15 11:37                                 ` Andi Kleen
2010-11-15 17:36                                   ` Jim Bos
2010-11-15 17:44                                     ` Jakub Jelinek
2010-11-15 18:17                                       ` Jim Bos
2010-11-15 18:26                                         ` Jakub Jelinek
2010-11-15 19:10                                           ` Jim Bos
2010-11-15 16:04                                 ` Linus Torvalds
2010-11-15 17:40                                   ` Jim Bos
2010-11-15 18:08                                     ` Linus Torvalds
2010-11-15 18:30                                       ` Jim Bos
2010-11-15 18:37                                         ` Jim Bos
2010-11-15 18:56                                         ` Linus Torvalds
2010-11-15 18:58                                         ` Jakub Jelinek
2010-11-15 19:12                                           ` Jakub Jelinek
2010-11-15 19:21                                             ` Linus Torvalds
2010-11-15 19:51                                               ` Jakub Jelinek
2010-11-15 20:22                                                 ` Jim Bos
2011-06-03 13:05                                                   ` 2.6.39.1 immediately reboots/resets on EFI system Jim Bos
2011-06-03 13:33                                                     ` Matthew Garrett
2011-06-03 14:26                                                       ` Jim Bos
2011-06-03 14:46                                                         ` Matthew Garrett
2011-06-05 10:40                                                           ` Jim Bos
2011-06-05 12:57                                                             ` Maarten Lankhorst
2011-06-06 15:01                                                           ` Maarten Lankhorst
2011-06-06 15:40                                                             ` Jim Bos
2011-06-06 15:44                                                             ` Matthew Garrett
2011-06-06 15:27                                                         ` Maarten Lankhorst
2011-06-06 16:11                                                           ` Jim Bos
2011-06-06 16:43                                                             ` Maarten Lankhorst
2011-06-07  0:19                                                               ` Yinghai Lu
2011-06-07  1:41                                                                 ` Matthew Garrett
2011-06-07  2:05                                                                   ` Yinghai Lu
2011-06-07  8:25                                                                     ` Maarten Lankhorst
2011-06-07 15:14                                                                       ` Yinghai Lu [this message]
2011-06-07  9:08                                                                     ` Maarten Lankhorst
2011-06-07 12:22                                                                       ` Maarten Lankhorst
2011-06-07 22:25                                                                         ` Yinghai Lu
2011-06-08 16:44                                                                           ` Jim Bos
2011-06-08 19:17                                                                             ` Yinghai Lu
2011-06-08 19:23                                                                               ` Matthew Garrett
2011-06-08 19:27                                                                                 ` Yinghai Lu
2011-06-08 19:29                                                                                   ` Matthew Garrett
2011-06-08 19:35                                                                                     ` Yinghai Lu
2011-06-08 19:38                                                                                       ` Matthew Garrett
2011-06-08 19:46                                                                                         ` Yinghai Lu
2011-06-08 19:52                                                                                           ` Matthew Garrett
2011-06-08 19:48                                                                                         ` Yinghai Lu
2011-06-08 19:52                                                                                           ` Matthew Garrett
2011-06-08 20:03                                                                                             ` Yinghai Lu
2011-06-08 20:09                                                                                               ` Matthew Garrett
2011-06-08 20:23                                                                                                 ` Yinghai Lu
2011-06-08 20:30                                                                                                   ` Matthew Garrett
2011-06-08 20:36                                                                                                     ` Yinghai Lu
2011-06-08 20:42                                                                                                       ` Matthew Garrett
2011-06-08 20:46                                                                                                         ` Yinghai Lu
2011-06-08 21:06                                                                                                           ` Matthew Garrett
2011-06-08 21:06                                                                                                         ` Linus Torvalds
2011-06-08 21:28                                                                                                           ` Matthew Garrett
2011-06-08 21:31                                                                                                             ` H. Peter Anvin
2011-06-08 21:36                                                                                                               ` Matthew Garrett
2011-06-08 21:31                                                                                                             ` Linus Torvalds
2011-06-08 21:42                                                                                                               ` Matthew Garrett
2011-06-08 21:51                                                                                                               ` H. Peter Anvin
2011-06-08 22:57                                                                                                                 ` Linus Torvalds
2011-06-08 23:54                                                                                                                   ` Maarten Lankhorst
2011-06-08 21:38                                                                                                             ` Yinghai Lu
2011-06-10 16:47                                                                       ` Matthew Garrett
2011-06-10 17:51                                                                         ` Maarten Lankhorst
2011-06-10 17:54                                                                           ` Matthew Garrett
2011-06-10 22:45                                                                             ` Maarten Lankhorst
2011-06-10 22:58                                                                               ` Yinghai Lu
2011-06-10 23:03                                                                                 ` Matthew Garrett
2011-06-10 23:17                                                                                   ` Greg KH
2011-06-10 23:22                                                                                     ` Maarten Lankhorst
2011-06-10 23:25                                                                                     ` H. Peter Anvin
2011-06-10 23:26                                                                                   ` Yinghai Lu
2011-06-10 23:32                                                                                     ` H. Peter Anvin
2011-06-10 23:55                                                                                       ` Yinghai Lu
2011-06-11  0:00                                                                                         ` H. Peter Anvin
2011-06-11  0:19                                                                                           ` Yinghai Lu
2011-06-14 18:06                                                                                             ` H. Peter Anvin
2011-06-11 15:29                                                                                     ` Matthew Garrett
2011-06-10 23:00                                                                               ` Yinghai Lu
2011-06-13 16:47                                                                               ` Matthew Garrett
2011-06-13 17:52                                                                                 ` Maarten Lankhorst
2011-06-13 18:00                                                                                   ` Matthew Garrett
2011-06-13 18:14                                                                                     ` Maarten Lankhorst
2011-06-13 18:17                                                                                       ` Matthew Garrett
2011-06-13 18:23                                                                                         ` Maarten Lankhorst
2011-06-13 18:33                                                                                           ` Matthew Garrett
2011-06-13 18:45                                                                                             ` Maarten Lankhorst
2011-06-14 14:34                                                                                             ` Maarten Lankhorst
2011-06-14 14:50                                                                                             ` Maarten Lankhorst
2011-06-14 14:55                                                                                               ` Matthew Garrett
2010-11-15 22:43                                                 ` gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ? Andi Kleen
2010-11-15 22:46                                                   ` Jakub Jelinek
2010-11-15 19:53                                             ` Richard Henderson
2010-11-15 10:24                           ` Richard Guenther
2010-11-15 18:45         ` Jeff Law
2010-11-15 19:04           ` Linus Torvalds
2010-11-15 22:07           ` Richard Guenther
2010-11-15 22:58             ` Jeff Law
2010-11-15 23:07               ` Richard Guenther
2010-11-16  4:10                 ` Jeff Law
2010-11-15 18:42     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DEE4071.2020607@kernel.org \
    --to=yinghai@kernel.org \
    --cc=gregkh@suse.de \
    --cc=hpa@linux.intel.com \
    --cc=jim876@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.b.lankhorst@gmail.com \
    --cc=mjg59@srcf.ucam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.