From owner-freebsd-arm@freebsd.org Thu Feb 13 21:32:25 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08145236944 for ; Thu, 13 Feb 2020 21:32:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-22.consmr.mail.gq1.yahoo.com (sonic302-22.consmr.mail.gq1.yahoo.com [98.137.68.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48JV8m05Yhz4c6P for ; Thu, 13 Feb 2020 21:32:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: wCw0_3kVM1lf8xRZEFc5iknZyujfn71pZpvWhqlHaadTLJbQa0OV3wAiAQB.U5A Zqouj0DLoUH8NdcbDohlZS97u8ZSgBzkN76mX0dIvNrt2Y2gkdTtYl3vPbb.uOwfzUufjntWiVXw cjOlbq_WxOzKW2DABVJ6aXpcZTNkqkBQlmQY5j7sLbtufC0G8QHrxaeeFjD0uf7444KJjxNxfii8 GRFFNOSFZRE8OHUybVHg6yzy5TakWdJLGtT9a.7CD61mUFVW6em5hr9PfRQVvrJzKs1fiy98Rr6f zzbFhalksbiLtIMzOpEGKRd_HEVFmXKR1r2bdlUK8mbv33kxkgJSEL_ZdsMv9N47zQEP.23ghwwB Wno0RD1zn.Qk1GN5eQdfZ1H6qWBXgBdP.xk0OU_1mbKOk6Pp4GAh.P6SkMbDRnYe3jGpquDSTgw_ 7zwOrOgyaxNS15rpYhy91mitsNcuUyNQ2_F8IyXkPyFNSkC8cIQY3Dng7LPha7h0dqiIlwTUnf7z 44Daw9Xk7gVL0LG8RJl8k47PxE_wv3KZupOghuCOUc97HJY1TQWpZcnanwZecPKeD0yxx6Hwfw16 jYvczhQQ3OVaOL.nXZ5NpYN_yAWcQpaEhFGz1.Utg6MEVSxu3ymV8O3XjrU00rEns9Va6DwS2qIZ P033AOxE1gyOPmrF4Vq3GixQCzljfmLpgYvDcegNeTe5q52yL.j7RyeeD0MK9_fFBzoeDJL142ob 3MXJL5I.f7HdLoY733qZWksyjq.cWGHxGaFyNYsFaRGJnHDYeJHJ11RkbvW9QEwzux4DS7u5uA1M BcGQ_c02xE_PEe2FdkC7gCzeUzbEwYquPC36mgArF5BJoMX4NC_Hd3Ye6cX_7rCQm5YvOB2aBsfU gdU7NejENtJf_zJIP3qwiqO_ckpJVct2YUEZnD5zlO5aYtmS3ZSoEQZPsLXMj1hT6S3SGaqP5nNw eNILVr1kGTa_.l3CtVlt9Nr.ZO6d59US7Et8tVGREm6Ske.dk6IJkqwUghREtvWvWlKlJb.2rv3X 2ZY2G0.V7kG_u8OhzVnNR3tDfB9aGNYwCv9S3OLA_7mMmh0uF0X_GYZZ1VPDgDc8.EBBSGNSH4FZ 73sK_SluByQ50ogSj7vL3IOEQlSQDK5vbtaI3q_xE8PnBRhpgMSea7wgbzscZM6kmqzL0a9HclZo HP6lEuPbwv15P.KUx89kD7yiFq6euLu5AxIGtKc4ERdNlc1iM7Ka8vtvZIAfAZ9Os4it1Z3mGipG qo732Bke9TgE1CFv2T_9SvLOLwFfMTMGmhuPMAZemzp4DX5brGEC7_zXl1KvA3XOfcxdrJiQt_Gw yqPxQ96KdH1NO1UwJsoC7iiNz6Kiru2ZPfBjSQKLPJA51SX7cs.jeAXpno3QQ1R3Tx.1va95XEdd AIn1FOyRnjyspaZLrEzU.5bQLJQV4debIfoIZQQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Thu, 13 Feb 2020 21:32:22 +0000 Received: by smtp429.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 7ea6cd443890b99373bd50ed764b6244; Thu, 13 Feb 2020 21:32:18 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: A investigative hack that makes (for example) head -r356529 boot and operate normally an RPi4B (finally!): protect all armstub8-gic.bin's loaded content from replacement by the kernel From: Mark Millard In-Reply-To: <256E923D-AD9A-4DB3-84F7-7BDD55E75691@googlemail.com> Date: Thu, 13 Feb 2020 13:32:18 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <7E7605DC-021D-448A-8459-8EC26BA9836D.ref@yahoo.com> <7E7605DC-021D-448A-8459-8EC26BA9836D@yahoo.com> <256E923D-AD9A-4DB3-84F7-7BDD55E75691@googlemail.com> To: =?utf-8?Q?Klaus_K=C3=BCchemann?= X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48JV8m05Yhz4c6P X-Spamd-Bar: - X-Spamd-Result: default: False [-1.99 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; DKIM_TRACE(0.00)[yahoo.com:+]; SUBJECT_HAS_EXCLAIM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FREEMAIL_TO(0.00)[googlemail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; SH_EMAIL_ZRD(0.00)[0.0.0.2,0.0.0.1,0.0.0.0,0.0.0.3]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.60)[-0.602,0]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.0,0.0.0.1,0.0.0.2,0.0.0.3]; NEURAL_HAM_LONG(-0.89)[-0.886,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (4.75), ipnet: 98.137.64.0/21(0.82), asn: 36647(0.66), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[148.68.137.98.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2020 21:32:25 -0000 On 2020-Feb-13, at 12:51, Klaus K=C3=BCchemann wrote: >=20 >> Am 13.02.2020 um 17:50 schrieb Mark Millard via freebsd-arm = : >>=20 >> There is the cpu-rlease-addr information that seems >> to refer to some 1st memory page content: >>=20 >> cpus { >> #address-cells =3D <0x00000001>; >> #size-cells =3D <0x00000000>; >> enable-method =3D "brcm,bcm2836-smp"; >> phandle =3D <0x000000be>; >> cpu@0 { >> device_type =3D "cpu"; >> compatible =3D "arm,cortex-a72"; >> reg =3D <0x00000000>; >> enable-method =3D "spin-table"; >> cpu-release-addr =3D <0x00000000 0x000000d8>; >> phandle =3D <0x0000001d>; >> }; >> cpu@1 { >> device_type =3D "cpu"; >> compatible =3D "arm,cortex-a72"; >> reg =3D <0x00000001>; >> enable-method =3D "spin-table"; >> cpu-release-addr =3D <0x00000000 0x000000e0>; >> phandle =3D <0x0000001e>; >> }; >> cpu@2 { >> device_type =3D "cpu"; >> compatible =3D "arm,cortex-a72"; >> reg =3D <0x00000002>; >> enable-method =3D "spin-table"; >> cpu-release-addr =3D <0x00000000 0x000000e8>; >> phandle =3D <0x0000001f>; >> }; >> cpu@3 { >> device_type =3D "cpu"; >> compatible =3D "arm,cortex-a72"; >> reg =3D <0x00000003>; >> enable-method =3D "spin-table"; >> cpu-release-addr =3D <0x00000000 0x000000f0>; >> phandle =3D <0x00000020>; >> }; >> }; >>=20 >>=20 >=20 >=20 > Although I didn=E2=80=99t have yet time to step into debugging just a = sidenote : > , the above table shown from you is for bcm2836=20 > Where for bcm-2711 dtsi : Do not confuse the .dtsi with the live DTB reported by the RPi4B u-boot itself (the address as reported during a prior boot sequence). I show more extraction context this time: U-Boot> fdt addr 0x7ef2000=20 U-Boot> fdt print / { . . . cpus { #address-cells =3D <0x00000001>; #size-cells =3D <0x00000000>; enable-method =3D "brcm,bcm2836-smp"; phandle =3D <0x000000be>; cpu@0 { device_type =3D "cpu"; compatible =3D "arm,cortex-a72"; reg =3D <0x00000000>; enable-method =3D "spin-table"; cpu-release-addr =3D <0x00000000 0x000000d8>; phandle =3D <0x0000001d>; }; cpu@1 { device_type =3D "cpu"; compatible =3D "arm,cortex-a72"; reg =3D <0x00000001>; enable-method =3D "spin-table"; cpu-release-addr =3D <0x00000000 0x000000e0>; phandle =3D <0x0000001e>; }; cpu@2 { device_type =3D "cpu"; compatible =3D "arm,cortex-a72"; reg =3D <0x00000002>; enable-method =3D "spin-table"; cpu-release-addr =3D <0x00000000 0x000000e8>; phandle =3D <0x0000001f>; }; cpu@3 { device_type =3D "cpu"; compatible =3D "arm,cortex-a72"; reg =3D <0x00000003>; enable-method =3D "spin-table"; cpu-release-addr =3D <0x00000000 0x000000f0>; phandle =3D <0x00000020>; }; }; . . . Yes, the live RPi4B u-boot reports: brcm,bcm2836-smp I've no clue if this is a problem. >=20 > cpu0: cpu@0 { > device_type =3D "cpu"; > compatible =3D "arm,cortex-a72"; > reg =3D <0>; > enable-method =3D "spin-table"; > cpu-release-addr =3D <0x0 0x000000d8>; > }; >=20 > cpu1: cpu@1 { > device_type =3D "cpu"; > compatible =3D "arm,cortex-a72"; > reg =3D <1>; > enable-method =3D "spin-table"; > cpu-release-addr =3D <0x0 0x000000e0>; > }; >=20 > cpu2: cpu@2 { > device_type =3D "cpu"; > compatible =3D "arm,cortex-a72"; > reg =3D <2>; > enable-method =3D "spin-table"; > cpu-release-addr =3D <0x0 0x000000e8>; > }; >=20 > cpu3: cpu@3 { > device_type =3D "cpu"; > compatible =3D "arm,cortex-a72"; > reg =3D <3>; > enable-method =3D "spin-table"; > cpu-release-addr =3D <0x0 0x000000f0>; > }; > }; This source code seems to be irrelevant to what I reported about the live DTB in use. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)