From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Wed, 14 Jul 2021 07:51:01 -0600 From: Rob Herring Subject: Re: [PATCH v4 02/10] memblock: Add variables for usable memory limitation Message-ID: <20210714135101.GB2441138@robh.at.kernel.org> References: <04c4d231fb03a3810d72a45c8a5bc2272c5975f3.1626266516.git.geert+renesas@glider.be> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <04c4d231fb03a3810d72a45c8a5bc2272c5975f3.1626266516.git.geert+renesas@glider.be> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Geert Uytterhoeven Cc: Russell King , Nicolas Pitre , Ard Biesheuvel , Linus Walleij , Catalin Marinas , Will Deacon , Nick Kossifidis , Paul Walmsley , Palmer Dabbelt , Albert Ou , Frank Rowand , Dave Young , Mike Rapoport , Baoquan He , Vivek Goyal , Andrew Morton , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kexec@lists.infradead.org, linux-mm@kvack.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org On Wed, Jul 14, 2021 at 02:50:12PM +0200, Geert Uytterhoeven wrote: > Add two global variables (cap_mem_addr and cap_mem_size) for storing a > base address and size, describing a limited region in which memory may > be considered available for use by the kernel. If enabled, memory > outside of this range is not available for use. > > These variables can by filled by firmware-specific code, and used in > calls to memblock_cap_memory_range() by architecture-specific code. > An example user is the parser of the "linux,usable-memory-range" > property in the DT "/chosen" node. > > Signed-off-by: Geert Uytterhoeven > --- > This is similar to how the initial ramdisk (phys_initrd_{start,size}) > and ELF core headers (elfcorehdr_{addr,size})) are handled. > > Does there exist a suitable place in the common memblock code to call > "memblock_cap_memory_range(cap_mem_addr, cap_mem_size)", or does this > have to be done in architecture-specific code? Can't you just call it from early_init_dt_scan_usablemem? If the property is present, you want to call it. If the property is not present, nothing happens. Rob _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec