From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795692209; b=P0U6r5q1Ll2QVD2gZIsTLjp/86S0u18counGi+YFBFXDsgTLO8U3icgZFXPkA8QWdsCw gSSgprf2tNbK1mDIbADch5jP+sSyItWCYUj6J6V+Mz/qEeIEvubnRpE+BHQtTvI40u13Q 3blPhvhHvMmoSBdaeLF6ryVaeKUDobd6Dco9GJUCX1VzxiEBiXKS3COonfi1MJmSy6DoV CwCaZYLaOX9qjpKOnleyFeVucWiJPi4sd1j0DjfduySpQvLfnaZJNRUHQZ35tTwtiJQp+ Kkkh4g8W4OIluJHI8gHhkCSqGlLeyZoyXj1ju0/YGplLhZeAOWHSyiq0SjvMX5a9+Hw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795692209; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=7vXlSRXuLLmD/e6VWvr8dD+6KNmhy5l5OvwMf0QWBaA=; b=EXXWmr3PCjP+A13JWXV31emkzGBV0LR0m2HeLtY7jEIouiyVwtgkUjA3LwBSjWm7l0FY 2QJKrKLhBoWhaADh8XFROff6SaRg7WcBs4pcatiNtzhyKQtK9li1L86bhfb9cVzn8LFSX CfZFabC+4NJDrAwswy2dl/eVaP4xPwcIchdM7JIz7yMNqASeffBLjl+Qe6JVIDgZwF184 EgLTBo2dudIFImZ7M1ksZC8W9svdgKXO7eoWQWFNbYiVf1bmccsPEYuOTeNKyy3o3X5tZ 5BDHB//2ITCxb1IsnhkQFCo9uQt4sZqHTlXiuury6/dufBpLdWc5qVxUuSoSx+LPttw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=pWvlthHI; arc=none smtp.remote-ip=185.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A560606A329 for ; Thu, 26 Nov 2026 11:23:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8A560606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=pWvlthHI Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 4CC144E417A0; Thu, 26 Nov 2026 11:23:27 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 218E660237; Thu, 26 Nov 2026 11:23:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7E04B11E6B361; Thu, 26 Nov 2026 12:23:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795692205; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=7vXlSRXuLLmD/e6VWvr8dD+6KNmhy5l5OvwMf0QWBaA=; b=pWvlthHIjB2HS9ck1O98NTeJGisl7Hdxjnr0itRStgV0sngcKMyTEFtYQy+3M3rebr1DNu pldS1qVHYnn0a84rAm6M71dNt5QjBaxV7QIojS1YbBzZFXO3eCXVNo+UhNq3lH+J5PTTlP j63/uOODSCWofxoblLbrn/YLxztlvvn0JKimnFUPVujsZkGOgZi3x/GVBybnBnGM8kzynn 2ueMZUxEkbfynuA+7w+lXft+0Pz6xKAmVkEey/HAMQKyuTsUxnXCK7irhgrZO0db+Fk/ot R5+oEg5kuwpZMP74eOrjswdrg1UgtDKTMWmO65+oz4DGsH115KRA6Z8DcoPdOw== From: Herve Codina To: David Gibson , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Laurent Pinchart , Kieran Bingham , Frank Li , David Lechner , Ayush Singh , Geert Uytterhoeven , devicetree-compiler@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree-spec@vger.kernel.org, Hui Pu , Ian Ray , Luca Ceresoli , Thomas Petazzoni , Herve Codina Subject: [PATCH v4 04/22] tests/nopulate: Add an FDT_NOP before the root node Date: Thu, 26 Nov 2026 12:22:21 +0100 Message-ID: <20261126112239.636284-5-herve.codina@bootlin.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261126112239.636284-1-herve.codina@bootlin.com> References: <20261126112239.636284-1-herve.codina@bootlin.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 An FDT_NOP tag can be present at offset 0 and so before the root node. This is a legitimate case. The nopulate tool adds an FDT_NOP tag after each tag encountered but it doesn't add an FDT_NOP tag at offset 0. Improve nopulate to fix this gap and add an FDT_NOP tag at offset 0. Signed-off-by: Herve Codina Reviewed-by: David Gibson --- tests/nopulate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/nopulate.c b/tests/nopulate.c index 32624a7b..b3a7184a 100644 --- a/tests/nopulate.c +++ b/tests/nopulate.c @@ -23,7 +23,10 @@ static int nopulate_struct(char *buf, const char *fdt) uint32_t tag; char *p; + /* Add a FDT_NOP before the root node (first node) */ p = buf; + *((fdt32_t *)p) = cpu_to_fdt32(FDT_NOP); + p += FDT_TAGSIZE; do { offset = nextoffset; -- 2.56.1