From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nfS86-0000Gy-Lb for mharc-grub-devel@gnu.org; Fri, 15 Apr 2022 16:01:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfS83-0000FV-6M for grub-devel@gnu.org; Fri, 15 Apr 2022 16:01:15 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:51358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nfS7y-0004gr-Ou for grub-devel@gnu.org; Fri, 15 Apr 2022 16:01:14 -0400 Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 840D93F19C for ; Fri, 15 Apr 2022 20:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1650052866; bh=nVK2R3Eu9q9KX0Oo8pmWhOGMMbloBHsB/N3BsvdqMU8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Prp57CnSEd0QLGrEVC4HimaeCoS6eate+R6LpKI+yaKedsUJHOv/9FmtRdETPZYud gsdCxRSY5w6Ra36u8rKKAZY8Ksozn9ynojgD19bo6flHGPpbcgQaPhGG+/C1T5B7o3 WRgANNqOGc9wyb8biFSBuSnMF75QPXBTO2NYgepHEr014WqZ+d46Pudbg1ffUg41ij PDymP9jwkQBArcrMfPPIrvlZkporhvdm5wXT0KwGAhbemdUhps18HP5MHQ9fX5IIWF esKNeS8khlrcAs9hJLxV+mXrBxpqe4twdGLOZef3OIVe55EpvGVGavBJQV+lxhYQAa +VZOdNijrWpJQ== Received: by mail-il1-f198.google.com with SMTP id g7-20020a056e02198700b002c9f4289eecso5305170ilf.13 for ; Fri, 15 Apr 2022 13:01:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nVK2R3Eu9q9KX0Oo8pmWhOGMMbloBHsB/N3BsvdqMU8=; b=SVKnTzhOoeBwkoFwWO49DTAAdkKiJ981WxUODOY6dYSE7Ce5REaEzwWYZyQYZrq4To gnPhqPdl0ECloKq14Ww1os/aynEL1QoHL9r6dK0Lrh/5lTCWNq6iwB1AYu7iu6UWQnTs NCC8FElFc7hPuPO2j1M3hoBFgRJLxkMEh+OXGSVaIcBGoa7JUyNsn1Y7qdcEmE28N1+V t4X7ArCH1W9H+/OJuhIBd7CsWAXj2B/ijbxesKqxxoAfHkA+hNP8hyzkuNH/WvW8WIgs SfyBpuEtCUOy97ayZg/8dU/e3RJdF3Y59ROXHmq6ada04D01ouw7AZ0ykBRj/M75qoR9 D2Ew== X-Gm-Message-State: AOAM531o2sxtZi3D7SlVeGY45jFc1E7oic6Fl3pYrxyRDfoJyQQ8fHRc s9Dt8lRwy/NIjpbY5ER5AIiYQb2K7DT2Ch0N2csHz9wzuaDdaHfNuzCaJSTWLgwseACnH2I4maC XoZAh1STDfVuGrvGzh4bsAj5BXh3f X-Received: by 2002:a05:6e02:1544:b0:2c7:e364:2c49 with SMTP id j4-20020a056e02154400b002c7e3642c49mr179342ilu.227.1650052864054; Fri, 15 Apr 2022 13:01:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhiFRQHThgMw/Mmb3lnvqL/yrL2sanaDMYQh7gy+Q3OZRpHuQfZL6l0VhIak8rlSWzFrXugA== X-Received: by 2002:a05:6e02:1544:b0:2c7:e364:2c49 with SMTP id j4-20020a056e02154400b002c7e3642c49mr179335ilu.227.1650052863847; Fri, 15 Apr 2022 13:01:03 -0700 (PDT) Received: from xps13.dannf (c-73-14-97-161.hsd1.co.comcast.net. [73.14.97.161]) by smtp.gmail.com with ESMTPSA id p2-20020a5d9c82000000b00649b622f528sm3267247iop.18.2022.04.15.13.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 13:01:02 -0700 (PDT) Date: Fri, 15 Apr 2022 14:00:59 -0600 From: dann frazier To: The development of GNU GRUB Cc: Ard Biesheuvel , Atish Patra , Daniel Kiper , Heinrich Schuchardt , Leif Lindholm , Fu Wei , Nikita Ermakov Subject: Re: [PATCH v3 3/7] efi: implemented LoadFile2 initrd loading protocol for Linux Message-ID: References: <20211028203118.7908-1-arei@altlinux.org> <20211028203118.7908-4-arei@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211028203118.7908-4-arei@altlinux.org> Received-SPF: pass client-ip=185.125.188.123; envelope-from=dann.frazier@canonical.com; helo=smtp-relay-internal-1.canonical.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2022 20:01:15 -0000 On Thu, Oct 28, 2021 at 11:31:16PM +0300, Nikita Ermakov wrote: > From: Ard Biesheuvel > > Recent Linux kernels will invoke the LoadFile2 protocol installed on > a well-known vendor media path to load the initrd if it is exposed by > the firmware. Using this method is preferred for two reasons: > - the Linux kernel is in charge of allocating the memory, and so it can > implement any placement policy it wants (given that these tend to > change between kernel versions), > - it is no longer necessary to modify the device tree provided by the > firmware. > > So let's install this protocol when handling the 'initrd' command if > such a recent kernel was detected (based on the PE/COFF image version), > and defer loading the initrd contents until the point where the kernel > invokes the LoadFile2 protocol. > > Signed-off-by: Ard Biesheuvel > Signed-off-by: Nikita Ermakov > --- > grub-core/loader/arm64/linux.c | 117 ++++++++++++++++++++++++++++++++- > 1 file changed, 116 insertions(+), 1 deletion(-) > fyi, Ubuntu currently includes this patch in our in-devel release, but we'll likely have to disable it for arm64 due to a regression. We found that it casuse our PXE boot install tests to fail because grub_net_fini_hw() is called before the TFTP transfer for the initramfs is attempted. More info here: https://launchpad.net/bugs/1967562 -dann