linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP
Date: Thu, 16 Nov 2017 16:00:08 +0900	[thread overview]
Message-ID: <20171116070005.GI29552@linaro.org> (raw)
In-Reply-To: <3df4c6c5-0abe-01ee-730d-2edaa5f497d2@redhat.com>

Bhupesh,

On Wed, Nov 15, 2017 at 04:28:55PM +0530, Bhupesh Sharma wrote:
> 
  (snip)

> # dmesg | grep -B 2 -i "ACPI reclaim"
> [    0.000000] efi:   0x000039670000-0x0000396bffff [Runtime Code |RUN|  |
> |  |  |  |  |   |WB|WT|WC|UC]
> [    0.000000] efi:   0x0000396c0000-0x00003970ffff [Boot Code |   |  |  |
> |  |  |  |   |WB|WT|WC|UC]
> [    0.000000] efi:   0x000039710000-0x00003975ffff [ACPI Reclaim Memory|
> |  |  |  |  |  |  |   |WB|WT|WC|UC]
> 
> 2. Now, I am not sure which kernel layer does the following changes (I am
> still trying to dig it out more), but I see that the 'Boot Code' and ACPI
> DSDT table regions are somehow merged into one memblock_region and appear as
> range '396c0000-3975ffff' in the '/proc/iomem' interface:
> 
> # cat /proc/iomem | grep -A 2 -B 2 39
> 00000000-3961ffff : System RAM
>   00080000-00b6ffff : Kernel code
>   00cb0000-0167ffff : Kernel data
>   0e800000-2e7fffff : Crash kernel
> 39620000-396bffff : reserved
> 396c0000-3975ffff : System RAM
> 39760000-3976ffff : reserved
> 39770000-397affff : reserved
> 397b0000-3989ffff : reserved
> 398a0000-398bffff : reserved
> 398c0000-39d3ffff : reserved
> 39d40000-3ed2ffff : System RAM
> 
  (snip)
> 
> So, I am looking at what could be causing the 'Boot Code' and 'ACPI DSDT
> table' ranges to be merged into a single region at
> '0x0000396c0000-0x00003970ffff' which cannot be marked as RESERVED using
> 'memblock_is_reserved'.

Simple:) The short answer is that memblock_add() does.

The long answer:
First, please note that memblock maintains two type of regions list,
"memory" and "reserved".

efi_init()
    reserve_regions()
        early_init_dt_add_memory_arch()
            memblock_add()
                memblock_add_range(memblock.memory)

The memory regions described in efi.memmap are added to "memory" list
with all the neighboring regions being merged into ones,
in this case, "Runtime Code", "Boot Code", "ACPI Reclaim Memory" and others.

The secret here is that "Runtime Code" is also marked with "NOMAP" flag in
reserve_regions(), which creates an isolated region since it now has
a different attribute.
Consequently only "Boot Code" and "ACPI Reclaim Memory" are
unified.

Look at request_standard_resources(). It handles only "memory" list,
and doesn't care about whether any arbitrary part of memory is in
"reserved" list or not.

Thanks,
-Takahiro AKASHI

> 
> Any pointers?
> 
> Regards,
> Bhupesh
> 

  reply	other threads:[~2017-11-16  7:00 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 12:09 arm64 crashkernel fails to boot on acpi-only machines due to ACPI regions being no longer mapped as NOMAP Bhupesh Sharma
2017-11-10 12:11 ` Bhupesh Sharma
2017-11-13  9:27   ` AKASHI Takahiro
2017-11-14 11:20     ` Ard Biesheuvel
2017-11-15 10:58       ` Bhupesh Sharma
2017-11-16  7:00         ` AKASHI Takahiro [this message]
2017-11-26  8:29           ` Bhupesh SHARMA
2017-12-04 14:02             ` Ard Biesheuvel
2017-12-12 21:51               ` Bhupesh Sharma
2017-12-13 10:26                 ` AKASHI Takahiro
2017-12-13 10:49                   ` Ard Biesheuvel
2017-12-13 12:16                     ` AKASHI Takahiro
2017-12-13 12:17                       ` Ard Biesheuvel
2017-12-13 19:22                         ` Bhupesh SHARMA
2017-12-15  8:59                         ` AKASHI Takahiro
2017-12-15  9:35                           ` Ard Biesheuvel
2017-12-17 21:01                             ` Bhupesh Sharma
2017-12-18  5:16                               ` Dave Young
2017-12-18  5:54                                 ` AKASHI Takahiro
2017-12-18  8:59                                   ` Bhupesh SHARMA
2017-12-18 11:18                                     ` AKASHI Takahiro
2017-12-18 22:28                                       ` Bhupesh Sharma
2017-12-19  5:01                                     ` AKASHI Takahiro
2017-12-20 19:52                                       ` Bhupesh Sharma
2017-12-18 21:28                                 ` Bhupesh Sharma
2017-12-19  5:25                                   ` AKASHI Takahiro
2017-12-18  5:40                           ` Dave Young
2017-12-18  5:43                             ` Dave Young
2017-12-19  6:09                             ` AKASHI Takahiro
2017-12-19 13:09                               ` Ard Biesheuvel
2017-12-20 20:00                                 ` Bhupesh Sharma
2017-12-21 10:34                                   ` AKASHI Takahiro
2017-12-21 12:06                                     ` Bhupesh Sharma
2017-12-22  8:33                                       ` AKASHI Takahiro
2017-12-23 19:51                                         ` Bhupesh Sharma
2017-12-25  3:25                                           ` AKASHI Takahiro
2017-12-25 20:14                                             ` Bhupesh Sharma
2017-12-26  1:32                                               ` Dave Young
2017-12-26  1:35                                                 ` Dave Young
2017-12-26  2:28                                                   ` AKASHI Takahiro
2017-12-26  2:56                                                     ` Bhupesh Sharma
2017-12-26  6:58                                                       ` Dave Young
2018-01-09  5:22                                                         ` AKASHI Takahiro
2018-01-08 20:00                                                       ` Bhupesh Sharma
2018-01-09  4:42                                                         ` AKASHI Takahiro
2018-01-09 11:46                                                           ` Bhupesh Sharma
2017-12-26  6:56                                                     ` Dave Young
2018-01-09  5:02                                                       ` AKASHI Takahiro
2017-11-24  8:47         ` Dave Young

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=20171116070005.GI29552@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).