From owner-freebsd-arm@freebsd.org Sat Oct 3 22:20:45 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 D8A893F1DA6 for ; Sat, 3 Oct 2020 22:20:45 +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 4C3hC03bPbz3dT1 for ; Sat, 3 Oct 2020 22:20:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: tXAvh1oVM1l190kpUPHAy8jJWvLRpwqyN4kx9zXYD31Te9w13MN4uVQ7299ZMQE r3V6J_TOOax6XcPhQ_x3bEw8slKSgXTdsLGemdfmDgVRITSflvpuEhhJoI0YGzLAinfWEyEE9SeB GLx1_T6HIORLH.Tc5Nt2DR4hedLY4vhOg3VzFlL8HZhqquUXYkL0lS_.mlJK.Mlcqp7hch.uOam2 k9SopdItGv7EhOvoFWtsNPqlaDiGGEkRb6QKk3BNbnwELw48T2oRDNIlrgbEhvE3igUQKE8DpfV. o5pXml.Y4Mw7muzTuALeKugceitHKAB8Ic3YFMrdze90Q1L1X6SA6117.KxQbV0ttGIpa41mKYOc vT2YNU9QyWrkCoVPoY8CExbdjlDtzsRL35e6jZVoko7axlqAdmfU6jgmK9hBvA_NNdCGavKI50eC Pn4v9xU3CXaCgWMCYI4kkK10h9OvwAH1ShHAvgNp2cd4zNoHuRx12.gN.cQKChQKip_HfZXULxvu 1fxdThmWAgRR2j2oUd9XKwbrvWP9o7XpqYbTaAusDhXJXYwQzyrLf8Gpxt0xj5WF0XN8BU05LLgZ pYpB.IvSPje2AKVcqOwEB358I0h3RpoAeJ_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000 Received: by smtp412.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0adeea8854ac835ddb137f94387c48ff; Sat, 03 Oct 2020 22:20:38 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: rpi4 FreeBSD vs. ubuntu u-boot fdt print / memereserve difference (lack of reserve in FreeBSD context), 0x3b400000 vs. DMA_HIGH_LIMIT being 0x3c000000 Message-Id: <1A13F7B5-F8C3-4022-939C-2992E53D1DF1@yahoo.com> Date: Sat, 3 Oct 2020 15:20:37 -0700 To: Robert Crowston , freebsd-arm X-Mailer: Apple Mail (2.3608.120.23.2.1) References: <1A13F7B5-F8C3-4022-939C-2992E53D1DF1.ref@yahoo.com> X-Rspamd-Queue-Id: 4C3hC03bPbz3dT1 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.29 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.70)[-0.703]; FREEMAIL_TO(0.00)[protonmail.com,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]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.05)[-1.045]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.0.0:email]; NEURAL_HAM_LONG(-1.04)[-1.040]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DBL_PROHIBIT(0.00)[0.0.0.0:email]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.148:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.148: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: Sat, 03 Oct 2020 22:20:45 -0000 Another FreeBSD vs. ubuntu context difference, this time in the fdt print / output . . . The ubuntu u-boot has (fdt print / output): memreserve =3D <0x3b400000 0x04c00000>; . . . (Note: 0x3b400000+0x04c00000 =3D=3D 0x40000000) . . . =20 #address-cells =3D <0x00000002>; #size-cells =3D <0x00000001>; . . . axi { vc_mem { reg =3D <0x3ec00000 0x40000000 0xc0000000>; }; Note: "vc_mem is solely used as a mechanism for passing a couple of parameters through from the firmware to vcdbg" End note }; . . . ( boot args has: vc_mem.mem_base=3D0x3ec00000 = vc_mem.mem_size=3D0x40000000 ) . . . reserved-memory { #address-cells =3D <0x00000002>; #size-cells =3D <0x00000001>; ranges; phandle =3D <0x0000003d>; linux,cma { compatible =3D "shared-dma-pool"; size =3D <0x04000000>; reusable; linux,cma-default; alloc-ranges =3D <0x00000000 0x00000000 = 0x30000000>; phandle =3D <0x0000003e>; }; }; . . . (I split the reg into lines below) . . . memory@0 { device_type =3D "memory"; reg =3D <0x00000000 0x00000000 0x3b400000 0x00000000 0x40000000 0xbc000000 0x00000001 0x00000000 0x80000000 0x00000001 0x80000000 0x80000000>; }; . . . (Note: 0x40000000+0xbc000000 =3D=3D 0xFC000000) . . . (I've ignored gpiomem above and below.) It appears to be that the memreserve may be important to have. The above may also suggest that FreeBSD's: #define DMA_HIGH_LIMIT 0x3c000000 may be a little too large (< or <=3D 0x3b400000 ?). FreeBSD u-boot reports just: /memreserve/ 0x0 0x1000; . . . memory@0 { =20 device_type =3D "memory"; reg =3D <0x0 0x0 0x0>; }; And so does not indicate anything special for either of (showing begin/end points): 0x3b400000..0x3FFFFFFF (in use by the vc?) 0xFC000000..0xFFFFFFFF (I/O peripheral area and such?) The context is an 8 GiByte RPi4 in both examples. Various details would vary on 1 GiByte and 2 GiByte RPi4Bs and some in memory@0 on the 4 GiBYTe RPi4B. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)