From owner-freebsd-arm@freebsd.org Mon Oct 12 07:41:14 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 4931542F0B5 for ; Mon, 12 Oct 2020 07:41:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-8.consmr.mail.gq1.yahoo.com (sonic315-8.consmr.mail.gq1.yahoo.com [98.137.65.32]) (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 4C8rG05WvLz3YDr for ; Mon, 12 Oct 2020 07:41:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: zVN90MwVM1ke8smAaRECQ0C_.TVZmIHalZyMrVGgz75SHUYYiprk5NTyc_9k7hv kMbpjhO9ekOIseXHXAHLIsebzecZ7BTSsVBaGBYpcJIJqMt8p7aT.yxtpsYiql0.X5bo_RqD2ZSx U7T4sbD4Tv6HNZ93tYyLVZj5SrM2Qi9vsnkN35gyQ9b.dlk80n3Oo2YCJJN9LU7Agw0AWylPU73C 7Sc0fSeAmhYXXpNdZz94dEBw1S3lpS4Ubt2WLJMSWCMATgHWWKZH2mDw0df0fn5m0N_074LKMpcg oaKpuM7fnJm.Ns8NbtzHd00j1cTUbYNWj4DTtKVT2JBpd1HOEiOBrIubLL1SNfWsrzu1UK8TKZVn _E56HYfdk2x_ZehfdzlLYs2xCmyaXchlSjEJHkLCZJfSl8qQLL5sQij9xJ6QaifBNE50u3GYB0XI G5tPzD4KGSft3WvBnvc6QkWE9_ZRdZWtErnqbNP8ldZaqZ_ni75LVfMWLvMG7YEqyR1DLDESouNK 3UHrw0vtYPVNCpOB9Vk2on69budHgqwKQ_rskdD4lwFVLrn1INhtnWvJ30LWZCaR7FwRpviCgw5W FPHlTV0HXRDhfULcua242LzDco0XV.G3BwwBHoXFfUVIm9VNCch34XfKbSPmQTOJARMkNdL9bd8T YHKXgQqHV534x72Z0YP5TWraP7.OXkjLc_hnCsdfq9TZydUyFT_aXKn46DGEUF7z1Bah82eD7BfO sgxu0az66ZVFjHJdQK5AACKxb6mg_UkBQKWUOfrfWcKTqBo.PgMhStyFU7M71dEemqnO6vfGINq5 iOt3jnThH31cZpWCRhS4MGITR8ZqdnbKNe6TXFSqCjA5XH_vaN61JPQcnc6eQ8O79Bxne_GCfE17 cZGYSaALUGcfLtFPSlwB5OmchNe2k4pPVL_nb9WsVFGYIb3KT144R7cSb_BEoPFUQ34WTcFsBSNN wj_5_QWB1UIRO5ua0jegSTwW_iHGYPRfiD07S2RLiyQ.ExZAN_JzPwBCay_8c3tsOCXw25GfNgQd PIzNwJS7UCK3iNuytTAhk5bntosFtxYAnrqeDr06838Q4.p.cG7gttehytsHnqQpn8HYVoRT_nKr QracE.SJAC1Qf_wucUKosL_mX43OkNifSsAN_ZGO8IGh7.HjW0x08DOR2nuEtYcY7VH9eN0KEM7m 71elBNzo0exJPuY9te114PdPgqgqdbdoyDeH_JJey6ELQ3.V3y0I0ehpEh4eBkQGeEeLBD9hcVGF Fh1Qkfc1SN3mnhqo5lMap.pYBvuzQiGyzV9LxjGCvMD9.jT5FhacMYIbJ04UImYW5XGj2szK4laT EjHFrNS9CL4idFFjcrcFcRewEgsNG6ZuSjkJb38Q.qNwvO6dHjMmRFJ68bCoah28nlPdVVqv5l6j 3hMSLj.gvjQyaBTR3fv4cLr9JWfQWqXuKM.ARmJsoCXyJ9RthcBoxbCoK8EHYPN8VjVyGYemLknd 2O6V_p0rPtfUxJYD_Sn0SDQ_yl_oqWmLr_vJVL2lnrirXkBI3ut7kSJ5ailK_ilTd16xrm_kRnQ9 1IhHutJQRecP0UmF5hwtZA9pTJ8iE8Ao- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Mon, 12 Oct 2020 07:41:10 +0000 Received: by smtp411.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0222eacc2652a97a84c784e64089e9df; Mon, 12 Oct 2020 07:41:06 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: RPi4B: u-boot printenv shows: fdt_addr=4000 (input to u-boot) vs. fdt_addr_r=0x02600000 (output from u-boot): 4000 is used by FreeBSD? Message-Id: <09E20B0B-3D90-409B-9994-02A56F86FF5E@yahoo.com> Date: Mon, 12 Oct 2020 00:41:04 -0700 To: Robert Crowston , Oleksandr Tymoshenko , Kyle Evans , freebsd-arm X-Mailer: Apple Mail (2.3608.120.23.2.1) References: <09E20B0B-3D90-409B-9994-02A56F86FF5E.ref@yahoo.com> X-Rspamd-Queue-Id: 4C8rG05WvLz3YDr X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.43 / 15.00]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.95)[-0.947]; FREEMAIL_TO(0.00)[protonmail.com,freebsd.org,FreeBSD.org]; 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/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.03)[-1.031]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.95)[-0.952]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.32:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.32:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2020 07:41:14 -0000 The fdt_addr=4000 is from: MESS:00:00:06.171732:0: dtb_file 'bcm2711-rpi-4-b.dtb' MESS:00:00:06.173753:0: Trying Device Tree file 'bcm2711-rpi-4-b.dtb' MESS:00:00:06.186642:0: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb The fdt_addr_r=0x02600000 is from u-boot doing its own modifications to a copy it makes. But that is not what the debug output indicates is being used after u-boot produces its "output" fdt: MESS:00:00:09.631802:0: brfs: File read: /mfs/sd/armstub8-gic.bin MESS:00:00:09.634830:0: Loading 'armstub8-gic.bin' to 0x0 size 0x1700 MESS:00:00:09.641023:0: brfs: File read: 5888 bytes MESS:00:00:09.762872:0: brfs: File read: /mfs/sd/u-boot.bin MESS:00:00:09.765376:0: Loading 'u-boot.bin' to 0x80000 size 0x8b9c0 MESS:00:00:09.771462:0: Device tree loaded to 0x4000 (size 0xbe0c) The following points out that the reporting 0x4000 just above is odd. Other contexts are reporting addresses closer to what fdt_addr_r has above (0x02600000) after u-boot.bin load (and based on the default 0x100 for the input to u-boot). For operating systems contexts where device_tree_address is not forced (and no armstub8*.bin is in use), I've noted that the debug messages track this sort of staging and use the u-boot output: MESS:00:00:08.861956:0: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb MESS:00:00:08.865197:0: Loading 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xb99c . . . MESS:00:00:10.443307:0: Loading 'rpi4-u-boot.bin' to 0x80000 size 0x8bb60 MESS:00:00:10.449832:0: Device tree loaded to 0x2eff4000 (size 0xbf18) That example is from the Fedora 33 branch, recently enough to be using u-boot 2020.10 . RaspiOS64 (debian variant) does the same sort of thing: MESS:00:00:06.029224:0: brfs: File read: /mfs/sd/bcm2711-rpi-4-b.dtb MESS:00:00:06.032473:0: Loading 'bcm2711-rpi-4-b.dtb' to 0x100 size 0xb99c . . . MESS:00:00:08.552427:0: brfs: File read: /mfs/sd/kernel8.img MESS:00:00:08.554979:0: Loading 'kernel8.img' to 0x80000 size 0xee6200 MESS:00:00:08.561240:0: Device tree loaded to 0x2eff4100 (size 0xbea2) (Note the lack of an explicit u-boot. This might be a u-boot "Falcon-Mode" context for all I know.) Ubuntu 2020.04.1 LTS is older and uses an older u-boot and older firmware but also reports an address similar to the prior two examples: ## Flattened Device Tree blob at 02600000 Booting using the fdt blob at 0x2600000 Using Device Tree in place at 0000000002600000, end 000000000260ea4f (The older firmware does not have the same debug output.) FreeBSD seems to be the odd one out for what fdt address it is likely given. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)