Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1789171pxv; Fri, 2 Jul 2021 12:15:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdbxQrk8hFCpsb9bdHIuMbHzPJ21TNtWNE8mWEujO6eGApSX0dxt2eY4B/LQOxDIJIWkbF X-Received: by 2002:a17:906:c1d2:: with SMTP id bw18mr1286381ejb.123.1625253308691; Fri, 02 Jul 2021 12:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625253308; cv=none; d=google.com; s=arc-20160816; b=noKzBYD2waXhJZVx1u+1skYXi+ANqkx60dZfaPJ5QKaroyEas0A0f/20Vr5he9FV3S BkWdaO2fwFXaYdbqF5A2Adqh92Ayf9eObFJzYW1oFinxGMO4afwzQW0DUlcDMvcq+X/O QO+83Cdw2EZQuEPKaLe5D+/SFpR2zoZJHYyoVW/H9MA4hEsKIDwoPYeGGrDkAOgUVe9q DSNB/EW8MRe/rihTioksu0sTIQNceyFGANBE2sobg3z7ZrXCfcl2zIhnEkLuJU1aI6VH UIXsnMGK9tNGx5ikMiDWpEBeE4hwRra2LXxCjEk5KrJ+mWqVdZ5H/tZ9iuhu6B+XM1k/ 3lDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UNe0CZD49Y6HeTR2zvAdV2swVmjxw8HGAOl4RmeBDHE=; b=gIlCdyjSI9KrDCDEcCEPdZpJEVVfDTZfmSQ6Z994n8VChOAYLtRFDHQcvNCKhCTJrJ PKPAZM5JHAwA9q3mxzA1uJ7+ppc1w1Ps/oY3S5N0e82pqjljXjiFEPmYipHJXtjCGQf0 aldiDBTl7B98NyXl8+gECPzqs+EZ2G1/ctjZD6q7Prl7sUsZXv8+PK/fymA21okhB6/p vxgHOQmi90Ky5mpjLgyX2jPfnqFOpPqVdG+c8r5a1le++P3kC/nY8vBc7MN1Rcjov6ki EBIyPKpBrxDAZRKlRo3ACvlxrL3/TpbazZuEjwC8ietqbavAr6dXWKdBYds/GKCuW1eR a0SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=OOVuX5kU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 25si3877021ejd.711.2021.07.02.12.14.45; Fri, 02 Jul 2021 12:15:08 -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=@atishpatra.org header.s=google header.b=OOVuX5kU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230517AbhGBTOC (ORCPT + 99 others); Fri, 2 Jul 2021 15:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbhGBTOC (ORCPT ); Fri, 2 Jul 2021 15:14:02 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D3D0C061765 for ; Fri, 2 Jul 2021 12:11:29 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id m9so17953007ybo.5 for ; Fri, 02 Jul 2021 12:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UNe0CZD49Y6HeTR2zvAdV2swVmjxw8HGAOl4RmeBDHE=; b=OOVuX5kUkOlD/17Ow3pMt/Tn89olUzx+mZzFNrRE4ecm1Jj02CZuYiUFeZr0lWOjWz xvpR/25J+giT5ahz7BrHpktRPhIefWfoJLpypEkWWgiZudgt5ffrOhODpUYXBmNgX1uK nME76vrEPtrO4pBugfe6fpIZRc9NP2F0trgYY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UNe0CZD49Y6HeTR2zvAdV2swVmjxw8HGAOl4RmeBDHE=; b=HvetY2NrgTBoDthIsWg3QexWmAy8IMZ4k1FcST2oG5KUlLycWyMJ9wlSv189NZo35D 6/GPbKjiyGTMBIbOwsl+HGg9bWNpbMfvu9p12RTdIJtljMwV/loGGmzZ0oiu0PT8ouXY eUL3ZrQ4kNbVq4ec6t4PDCSvoh4uiTxg+4NpH3EKi4JUtHl8PFxL20srO2kADd48CWor ubuWwN+sAF7BOxWo9o+GmjC6hupPqm2T9l9WbTa5dtPj53hZsYAc+H6s/czLfK/I4qVd Hky6jeN9rJ5AD38bbg0WSqnDIvrdvRYOQF9JOGZymKgo5bhYCQ7NwbE3nFMZLMvgitbR 3v9w== X-Gm-Message-State: AOAM533CaQtgxNT+VXx9E39310C8ZFJr73v10XHe38S/Qn829NfeTfuK HILtJYKb1D6WaozIU08hT/E/FpEivnQHlq1Xb7ek X-Received: by 2002:a25:b3c3:: with SMTP id x3mr1106992ybf.147.1625253088549; Fri, 02 Jul 2021 12:11:28 -0700 (PDT) MIME-Version: 1.0 References: <20210629134018.62859-1-xypron.glpk@gmx.de> In-Reply-To: From: Atish Patra Date: Fri, 2 Jul 2021 12:11:17 -0700 Message-ID: Subject: Re: [PATCH 1/1] RISC-V: load initrd wherever it fits into memory To: Palmer Dabbelt , Alexandre Ghiti , Anup Patel Cc: Heinrich Schuchardt , Andreas Schwab , Paul Walmsley , Albert Ou , Atish Patra , linux-efi , linux-riscv , Linux Kernel Mailing List , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 30, 2021 at 12:30 AM Ard Biesheuvel wrote: > > On Wed, 30 Jun 2021 at 00:56, Atish Patra wrote: > > > > On Tue, Jun 29, 2021 at 6:40 AM Heinrich Schuchardt wrote: > > > > > > Requiring that initrd is loaded below RAM start + 256 MiB led to failure > > > to boot SUSE Linux with GRUB on QEMU, cf. > > > https://lists.gnu.org/archive/html/grub-devel/2021-06/msg00037.html > > > > > > Remove the constraint. > > > > > > Reported-by: Andreas Schwab > > > Signed-off-by: Heinrich Schuchardt > > > --- > > > arch/riscv/include/asm/efi.h | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/arch/riscv/include/asm/efi.h b/arch/riscv/include/asm/efi.h > > > index 7542282f1141..649ab513dc99 100644 > > > --- a/arch/riscv/include/asm/efi.h > > > +++ b/arch/riscv/include/asm/efi.h > > > @@ -33,10 +33,10 @@ static inline unsigned long efi_get_max_fdt_addr(unsigned long image_addr) > > > > > > #define ARCH_EFI_IRQ_FLAGS_MASK (SR_IE | SR_SPIE) > > > > > > -/* Load initrd at enough distance from DRAM start */ > > > +/* Load initrd anywhere in system RAM */ Alex/Anup/Palmer: As per my understanding initrd can be loaded in system RAM as long as it doesn't overwrite the existing data (fdt/kernel image) and respect reserved memory regions. Let us know if we have any inherent memory location limitation for initrd loading. > > > static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr) > > > { > > > - return image_addr + SZ_256M; > > > + return ULONG_MAX; > > > } > > > > > > #define alloc_screen_info(x...) (&screen_info) > > > -- > > > 2.30.2 > > > > > > > LGTM > > > > Reviewed-by: Atish Patra > > > > Acked-by: Ard Biesheuvel > > Please take this via the RISC-V tree. -- Regards, Atish