[PATCH 1/4] fdt: add support for adding pmem nodes
Sughosh Ganu
sughosh.ganu at linaro.org
Mon Oct 28 12:29:24 CET 2024
On Sun, 27 Oct 2024 at 20:30, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Sughosh,
>
> On Fri, 25 Oct 2024 at 13:15, Sughosh Ganu <sughosh.ganu at linaro.org> wrote:
> >
> > From: Masahisa Kojima <kojima.masahisa at socionext.com>
> >
> > One of the problems OS installers face, when running in EFI, is that
> > the mounted ISO after calling ExitBootServices goes away. For some
> > distros this is a problem since they rely on finding some core packages
> > before continuing the installation. Distros have works around this --
> > e.g Fedora has a special kernel command line parameter called
> > inst.stage2 [0].
> >
> > ACPI has NFIT and NVDIMM support to provide ramdisks to the OS, but we
> > don't have anything in place for DTs. Linux and device trees have support
> > for persistent memory devices. So add a function that can inject a pmem
> > node in a DT, so we can use it when launhing OS installers with EFI.
> >
> > [0]
> > https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/installation_guide/chap-anaconda-boot-options#sect-boot-options-installer
> >
> > Signed-off-by: Masahisa Kojima <kojima.masahisa at socionext.com>
> > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > ---
> > boot/fdt_support.c | 41 +++++++++++++++++++++++++++++++++++++++--
> > include/fdt_support.h | 13 +++++++++++++
> > 2 files changed, 52 insertions(+), 2 deletions(-)
>
> Can you please use the ofnode interface for this? We are trying not to
> add more of this kind of fixup, as it means someone will have to port
> it over later.
>
> See EVT_FT_FIXUP
Are you suggesting using the EVT_FT_FIXUP interface for adding the
pmem node? If so, how does this work on platforms which enable
livetree? Looking at the code, I see that the EVT_FT_FIXUP gets called
only when the livetree is not active. However, I am not able to find
any place where the livetree is getting disabled. We do have a
function, oftree_to_fdt() which flattens a livetree, but I don't see
it getting called from anywhere except from a 'upl' command. The
of_root pointer does get set in initr_of_live(), but apart from
dm_test_pre_run(), I do not see where we disable the livetree and set
of_root to NULL.
So on platforms which do enable livetree, how does this fixup work?
What am I missing?
-sughosh
>
> Regards,
> Simon
More information about the U-Boot
mailing list