Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1157753yba; Tue, 2 Apr 2019 03:34:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNDn+nYz3rmsEFGscs2kQEG1+ETfAu/zMqfEtqwXmRjnFzAZtmLAYeszc2tvfx++G6TiEG X-Received: by 2002:a17:902:bf07:: with SMTP id bi7mr47468443plb.87.1554201275964; Tue, 02 Apr 2019 03:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554201275; cv=none; d=google.com; s=arc-20160816; b=q5CVXLk4M6O21z03vu4BSFZfTwFLCjN1/TYqvgXbTgA3i+LTcI7hw+6XCTsB7uv197 +G7S/mGqiEGJj3SmwHwFl948ccWnn75xTF30E6dZtGTlW75WnKDcohXCv/Ft/EOEQ88r H+rb+AVt4MrK0JI8UeQ9zELnZhKWDRYbS7G5kGgnTeIgYX1CCj3i5E7nHI11lvQ6F/oa R1P/PNrigu/UdSIn30zhjlDhTvNcHPu4/tplRr+ZBxFVfHbJKXK009jxwFqU+G/2kbBt XKhsFjfJJOQP6pGoZX9QdAngaSQtXbodpwzQKjjSHHKaEkWZGgfqLscB5zS7hIGoQuc8 +xjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=2yMnY3JrljkC7LP75h1oWKh/h+U30OOMHPNPHzzohCE=; b=yw6C9Is6+krqqrqRbGYcy3zOdtCrZqBWQ5JVZjaZbkQcTswYFjRWkM9U3mf+TWllzg sGpnWsNbCX8Me983FFhunQlUe3sdsph9f5v1X4Q7LWSRs+Lb1bLoKaIggFzcq7nJUjPt pUxXFd3rs2R0l71Xt7AW3mCuoh9va9WMPx9U/BDKU8Zuk4eQ93Fw7aSr4Uk56qaiPhgk E6YltVEEi3b1a0mn+0ScP+Zzlyemmbt319/Cu71efU2kyDu+Si3DN+X/B9fkhcNdn5Ev L1lADarm+TaF+kIzddeOol9Nfqcqh0rO9EEVMAO44lplx7EF06XXx38C4xVHKRpY3yZH riDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si9451615pgk.85.2019.04.02.03.34.20; Tue, 02 Apr 2019 03:34:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729306AbfDBKO2 (ORCPT + 99 others); Tue, 2 Apr 2019 06:14:28 -0400 Received: from foss.arm.com ([217.140.101.70]:47894 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbfDBKO2 (ORCPT ); Tue, 2 Apr 2019 06:14:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CA68E15AD; Tue, 2 Apr 2019 03:14:27 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B32AA3F59C; Tue, 2 Apr 2019 03:14:26 -0700 (PDT) Subject: Re: of_reserved_mem()/kexec interaction To: Roy Pledge Cc: Rob Herring , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" References: From: James Morse Message-ID: Date: Tue, 2 Apr 2019 11:14:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Roy, On 01/04/2019 20:09, Roy Pledge wrote: > I'm trying to understand if memory reserved in the device tree via the > "reserved-memory" facility is preserved during a kexec system call, > i.e., is the memory at the same location with the contents undisturbed > when the new kernel starts? If the reservation is a static-allocation (so the address appears in the DT) then the new kernel should know this is reserved too, and not touch it. If its a dynamic-allocation, the address isn't in the DT, so the new kernel can't know. It will dynamically allocate a new reservation, which may be in a different place. If the data didn't matter at the first-boot, it probably doesn't matter over subsequent kexec either. As an outlier: the gic has some funny requirements around this. It needs to dynamically allocate a page during first-boot that is preserved over kexec. It does this using efi_mem_reserve_persistent(). Thanks, James