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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09412C54EBC for ; Tue, 10 Jan 2023 22:37:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1184C85304; Tue, 10 Jan 2023 23:37:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=@gmx.de header.b="KLlEgTzZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5ACD580EB1; Tue, 10 Jan 2023 23:37:15 +0100 (CET) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 25E7E85473 for ; Tue, 10 Jan 2023 23:37:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1673390229; bh=0azUs6QAos+JHwVmkqR/GBbptkET1CtCYFbuR2jsQ1Q=; h=X-UI-Sender-Class:Date:Subject:From:To:Cc:References:In-Reply-To; b=KLlEgTzZvqxUcZPDjz1hCTsHFWTZtk5MyQRh6BlfhnyCTC6E7kKAGDHcfUDaWCvoB oqEiQwqJlRGtILhFHNEU7mR6UFXnFkKoDkjjamPHNqXcdjr0M7ElnFteG0e6g3vJQ9 /0XCT8IwTfLb+hk4pxYgWzThOifXP2HWPZhBT8SDgRQpqOApijlHARyQlBzTMpJdvw fXQpfcvhkyteJM79IGyEjNU9JZRQsr0BgHHglktfyY9GOtIxutFrNdWld0c0t5iH7m 84afZWanq2adwRnt5aPEW6tNE650u9UcBNmB6tfFGHUkRp/72JsU4RwN+MNlqcc5d8 T3XB7EmfW6ttg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.94] ([88.152.145.137]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N0X8o-1os5ei3yb6-00wZOL; Tue, 10 Jan 2023 23:37:09 +0100 Message-ID: <1c21164d-c687-365b-8219-12a25a2442d6@gmx.de> Date: Tue, 10 Jan 2023 23:37:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 5/5] test: Add sandbox TPM boot measurement Content-Language: en-US From: Heinrich Schuchardt To: Eddie James Cc: ilias.apalodimas@linaro.org, sjg@chromium.org, u-boot@lists.denx.de References: <20230109215525.79046-1-eajames@linux.ibm.com> <20230109215525.79046-6-eajames@linux.ibm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Fe5w8eKdATYo+mbFMITE1sSuiSMbtRhGHbBWWRcZBDtx8NhPzEP awfIPXfcinkDbw0vOwXjU/1kNE0ELCiG5o9cNyUC2CONXoyipFoTAaBfZ0SdI1Uo0FDukT4 OQ+pR1JOqP+bQlbhHwxx0inavJW5FL4TbIiRVh+Pn9Y5KPcI1VEifGB4/JjmqDE7kvHvL+N 7eqqo2w+g//GNexN8l8Zg== UI-OutboundReport: notjunk:1;M01:P0:1ukBi8DGg7w=;GUWHMLPgR8A0XKBi/aM5J3x73Jn HLlZmF2+lwM+4Zh2CRfRoJnEIJMGEMrXaCEl9Skq5pkB8bPAOxSzPXoCzK5p23trlV920m7fc ypqJ0xQGKagrGflHSXlakrH4cD8Yee5UsGmL9CTjAY9y5zVUhF6vI8/tH0LmTSxiZMcx16bwE X+tqXEHbhMdt+Vlz+YS5ZJzwYmlEzI4PeQQwW+4w/ipWkGqeZvfsV7Cf74o23Dk3TU9zAXFUx xqx0FZpzaiKYDmRZz/M4j51IGEj16qTtbAYNyzd4q2cYmbxFudyXsFjwBICHC3OaZbl/dxppC 785wbF6a19QTgzz1Aa0xMk+zpEWr5CxJztu0rBitneRZ79TAPaRkcyYiWjN8MDsvDGS02mYrW rnvD5rkUETTpOrjP6lUtgV6zLNlP7t2TlVgLu7yIne1BFzKCagXGBt36Q3r0SeIEejZwW6msG POaaU8zaGwbii3bAr9rE+tf2TXvZVf7bj+Q6vxjPPa5GQkm3SE57MwJN6BIwCJq2Za5TOhpoy x16Gv1y0qTj2qFSY948Di3LsRYXwt8NN9UWoCvOL6EPfNunwnf5hvuRYoE2K7QyM20yvQ9cZn gAPi76czt6lH3Vk/zbzk/Xjqhu9aWIVmVfyqMO2vb12kGnJQhLginyH23AfVDLkngrOmanJjc d/IQI+Vmx6GogicL9t7VJy4oN2DzKUbRuKsAWX4jTOK4EWkOWL+Z7g4vGPLWiep2IyQtIUN9l h7II84c/ckoskXVQASBcBwvnRvu2B4tWvBKNMH6UZCiXRc7xTvDawjf7mNbrHrO48Q5Os1m0X Qx5wPIeyaRcNVxwltwDiNxJaDSHO8lRIdy8kJBn68LMf9ibtpS3aTBfOzDWNpFEQBomMEtGPX aXdOQ+UGOTIxX4YVhE7zWj9yC6oiPyYqcDWyLTR61Pr6l6CI90l6SABCdtJK+ZIYrBuLo9ODp EmKFwFGJXL0lkLcpWjpfUhTyLSE= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 1/10/23 23:32, Heinrich Schuchardt wrote: > On 1/9/23 22:55, Eddie James wrote: >> Use the sandbox TPM driver to measure some boot images in a unit >> test case. >> >> $ ./u-boot -T -c "ut measurement" >> Running 1 measurement tests >> Test: measure: measurement.c >> Failures: 0 >> >> Signed-off-by: Eddie James >> --- >> =C2=A0 arch/sandbox/dts/test.dts | 12 +++++++ >> =C2=A0 configs/sandbox_defconfig |=C2=A0 1 + >> =C2=A0 include/test/suites.h=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 1 + >> =C2=A0 test/boot/Makefile=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |= =C2=A0 1 + >> =C2=A0 test/boot/measurement.c=C2=A0=C2=A0 | 66 +++++++++++++++++++++++= ++++++++++++++++ >> =C2=A0 test/cmd_ut.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 ++ >> =C2=A0 6 files changed, 83 insertions(+) >> =C2=A0 create mode 100644 test/boot/measurement.c >> >> diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts >> index dffe10adbf..ad90bf0541 100644 >> --- a/arch/sandbox/dts/test.dts >> +++ b/arch/sandbox/dts/test.dts >> @@ -66,6 +66,17 @@ >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 osd0 =3D "/osd"; >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 }; >> >> +=C2=A0=C2=A0=C2=A0 reserved-memory { >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #address-cells =3D <1>; >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #size-cells =3D <1>; >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ranges; >> + >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 event_log: tcg_event_log@d0= e000 { >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 no-= map; > > Isn't no-map misplaced? Shouldn't it be a reserved-memory property? The placement is correct. But I still wonder why we should have this area as no-map. > > If the memory region is not mapped, Linux can never access it as > described in > Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml. > > Please, document all changes to the device-tree semantics via patches > for the Linux kernels documentation and provide a full example. > > Best regards > > Heinrich