From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C79CC07E95 for ; Fri, 2 Jul 2021 19:11:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EEB6661422 for ; Fri, 2 Jul 2021 19:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbhGBTOD (ORCPT ); Fri, 2 Jul 2021 15:14:03 -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-Google-Smtp-Source: ABdhPJzqkbkxM1MEMKQQBXENZX/GSVyjLhXai8633EMbMtXXh8Efubsw76BaSmLC7bBeenfpRwhH1lqLwnbb+jznUVk= 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