Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp730745pxj; Wed, 16 Jun 2021 12:13:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP6xbzqj13HNxyrPf+Ig9MT4NphJEr2pLu5iIgOf7CrZY6U7OWKsSDU70Ya+1W3spqtRSv X-Received: by 2002:a05:6402:10d7:: with SMTP id p23mr1586307edu.74.1623870792422; Wed, 16 Jun 2021 12:13:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623870792; cv=none; d=google.com; s=arc-20160816; b=CUb7Itg5Oc2G7iwzxOMpAEOZ6vJ3eEO83G7zzBj7OCyIj9+/xt/hy3wvS48iLFK58k uwJiafl++9ICV5Tro2OZw2/PO4i2DOk7L9XSoomBNDBP5RTlKQ4sOKcqbLywMnWz2MDL ND5/fhRIyxTU7/t4fJ1Q5Cd9yOqIVltrDsSHJI/EiVBA9tVFexKfKu0ggni2bQAGlPQb czawxkKaW+guKStYcfGV7PbDc5PXVk+4ECiV1Ff1UKhxKtaUQ+91Gqlr4GGHg6zcw0JY zVCSAT4cwjOUMep3Nq7gixNGxA07/ULAAwDAkaxRS/lC05xtPfL8+zA/RFiv9Iv7/Ao3 8fWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TnWkQtgxmg6lGfGOpt7Z5dqfrtSaE/NqdcZtUZxltZg=; b=QgLT301Ig0iItnwX2AUoHwrqE8hRr9x0wsy+m1sv8+kGPP5d+DHos1sS/N5bwGTe8z Wc7IqmNnelEnlajhlqTM69UDDLTA9HV5eznvSnDTAGPoIdONaP8O5TduSRee6sYuP4rm AsFXhibMmXluukviOJLv/6eeKQ1YHCegRLTezkgHPEid2eubvl4Rqs1s1C1y9cdUiofs Zjlo2xH72QE1+ACNGgaGf9EikArl9vxvmgGf4TER13jnKfjGa7L3K7/NlhXLfi/Q9R3d DWMO67Du/IxTrejxa8pwzZwgEGEBdlThMgNvKahX0KIRNIvZBUoeN1VPwZtbIKTW20nR zlEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QbxJDVCX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n9si3022413edw.373.2021.06.16.12.12.50; Wed, 16 Jun 2021 12:13:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QbxJDVCX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233787AbhFPO51 (ORCPT + 99 others); Wed, 16 Jun 2021 10:57:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:40994 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234087AbhFPO5W (ORCPT ); Wed, 16 Jun 2021 10:57:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C1E176105A; Wed, 16 Jun 2021 14:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623855316; bh=AxlyDycZpX8N+vmFuWI19Sd23V+DuNrgeU3nJ9fSOlQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QbxJDVCXZCiJeF3/Q66YYkQXX8XrqQWunoHlN3fz7MvO3OBOJzfBaIE1+y9uV3EAJ 7ZOnQOUax/KFmkvtfDUou8wXJ0FfPxJ4kcKXYjibBCJdFoN5AgHrlcU9CuAk4qCvlw zLTuWne2oMrfffRAnHML8LSecawZJ9nk0RmoqKCSYZh8Z9k8REa/NtJtsTmhlIcV+3 ZIDmMzY3L8+UFaPWf88q3/7ddG2zmUdCL/6pwINt3fHenvC3PuKC/nnYWq23IPE5Nm lrqlsLz6YFDCi9nBadTiG2yRnNxG98sePhSk02i2zImkAJwuFwFs6frHPbEhyjfmgV h1jU+qvK6TdTg== Received: by mail-ej1-f41.google.com with SMTP id ce15so4411016ejb.4; Wed, 16 Jun 2021 07:55:16 -0700 (PDT) X-Gm-Message-State: AOAM531x7aUGMl6u3nY7EwpG0GTrXvjqxoPRQDu48/ZpAHSqHq3k+fLK VCKUy2nhapZxTNAWvfcxbyydHuygUoP+2zjyuw== X-Received: by 2002:a17:906:9419:: with SMTP id q25mr163961ejx.341.1623855315390; Wed, 16 Jun 2021 07:55:15 -0700 (PDT) MIME-Version: 1.0 References: <20210419005539.22729-1-mick@ics.forth.gr> <20210419005539.22729-6-mick@ics.forth.gr> In-Reply-To: From: Rob Herring Date: Wed, 16 Jun 2021 08:55:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 5/5] RISC-V: Add crash kernel support To: Nick Kossifidis , Ard Biesheuvel Cc: Geert Uytterhoeven , linux-riscv , Palmer Dabbelt , Paul Walmsley , Linux Kernel Mailing List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Ard On Tue, Jun 15, 2021 at 5:29 PM Nick Kossifidis wrote: > > =CE=A3=CF=84=CE=B9=CF=82 2021-06-15 22:21, Rob Herring =CE=AD=CE=B3=CF=81= =CE=B1=CF=88=CE=B5: > > On Tue, Jun 15, 2021 at 12:48 PM Geert Uytterhoeven > > wrote: > >> > >> Hi Nick, > >> > >> On Tue, Jun 15, 2021 at 8:29 PM Nick Kossifidis > >> wrote: > >> > =CE=A3=CF=84=CE=B9=CF=82 2021-06-15 16:19, Geert Uytterhoeven =CE=AD= =CE=B3=CF=81=CE=B1=CF=88=CE=B5: > >> > > This does not match > >> > > https://github.com/devicetree-org/dt-schema/blob/master/schemas/ch= osen.yaml#L77: > >> > > > >> > > $ref: types.yaml#/definitions/uint64-array > >> > > maxItems: 2 > >> > > description: > >> > > This property (currently used only on arm64) holds the memor= y > >> > > range, > >> > > the address and the size, of the elf core header which mainl= y > >> > > describes > >> > > the panicked kernel\'s memory layout as PT_LOAD segments of = elf > >> > > format. > >> > > > >> > > Hence "linux,elfcorehdr" should be a property of the /chosen node, > >> > > instead of a memory node with a compatible value of "linux,elfcore= hdr". > >> > > > >> > > >> > That's a binding for a property on the /chosen node, that as the tex= t > >> > says it's defined for arm64 only and the code that handled it was al= so > >> > >> That doesn't mean it must not be used on other architectures ;-) > >> Arm64 was just the first one to use it... > > > > It is used on arm64 because memory is often passed by UEFI tables and > > not with /memory node. As riscv is also supporting EFI, I'd think they > > would do the same. > > > > We've had this discussion before, riscv uses /memory for now and even if > we switched to getting memory from ACPI/UEFI tables, the elf core header > is passed from the crashed kernel to the kdump kernel, it has nothing to > do with UEFI since the bootloader is the kernel itself. Am I missing > something ? I believe if we originally booted using UEFI tables, then those are passed the kdump kernel as well. The original DT may have had a /memory node, but it's possible it didn't match what was in the UEFI tables. So using the DT /memory nodes for kdump could give surprising results. I think reserved regions also come from UEFI. Ard can probably comment better. Rob