mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Carl Smith <carl.smith@alliedtelesis.co.nz>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: Octeon: Verify the device tree so that /sys/firmware/fdt is created
Date: Tue, 17 Nov 2026 17:11:13 +0100	[thread overview]
Message-ID: <avx8oTkiiFQypQl9@alpha.franken.de> (raw)
In-Reply-To: <20261025192918.586220-1-carl.smith@alliedtelesis.co.nz>

On Mon, Oct 26, 2026 at 08:29:18AM +1300, Carl Smith wrote:
> device_tree_init() sets initial_boot_params directly without calling
> early_init_dt_verify(), so the FDT CRC is never computed and
> of_fdt_raw_init() skips creating /syts/firmware/fdt.
> 
>   not creating '/sys/firmware/fdt': CRC check failed
> 
> Call early_init_dt_verify() after the tree has been pruned and the MAC
> addresses filled in, so that the CRC covers the tree that the kernel
> unflattens.
> 
> Tested on a CN7130 with a bootloader-provided device tree.
> Fixes: 08d53aa58cb1 ("of/fdt: export fdt blob as /sys/firmware/fdt")
> 
> Signed-off-by: Carl Smith <carl.smith@alliedtelesis.co.nz>
> ---
>  arch/mips/cavium-octeon/setup.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
> index 1ad2602a0383..f25301e08222 100644
> --- a/arch/mips/cavium-octeon/setup.c
> +++ b/arch/mips/cavium-octeon/setup.c
> @@ -1178,6 +1178,7 @@ void __init device_tree_init(void)
>  	}
>  	if (fill_mac)
>  		octeon_fill_mac_addresses();
> +	early_init_dt_verify(initial_boot_params, __pa(initial_boot_params));
>  	unflatten_and_copy_device_tree();
>  	init_octeon_system_type();
>  }
> -- 
> 2.56.0

applied to mips-next

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2026-11-17 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 19:29 Carl Smith
2026-11-17 16:11 ` Thomas Bogendoerfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avx8oTkiiFQypQl9@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=carl.smith@alliedtelesis.co.nz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®