From nobody Sat May 6 20:42:16 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDKHF2pPtz496C2 for ; Sat, 6 May 2023 20:42:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDKHD478tz40wF for ; Sat, 6 May 2023 20:42:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683405736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M+36sT4y0kWOSDJOkk64BJ1JdfPRbsjRmIBl+IsGWTI=; b=fnqZwi+ogfpjUDGi348+6Fi4g+0nzPNHm6YPekd1aaaQ9ApcudqtoIyAfHL4ubswJKfYDw qcdvdOUtf+T50LmGIp1NEjW9dT5L5Dmf+paahv3st8bo7lZCpejQm5BEZaxvbEz/gwT1hd SEFIlYGR1oOX+jOlf3GWA2aZIJM+AP7evRQZS30Xy4noFbfXEhFmSyV/KELQQGAIydeuHW dEc+8aGTEokwnaKyxdIAR3nN/94RuPWkP2IVuZ2Pt1TVoI1aXOOpTaMgvWn1dtA8ri8PjG NP7d2s1qe0cSieAjTEe5SFCeXbxPwFaZN+eL8GV5x/T79PZP656whPJYqu/12w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683405736; a=rsa-sha256; cv=none; b=aqQsiI6ksUvrkGcNiU3IEmO2+J5cAy9+Id1wKRBFu57kjc1yuMNcsUZYWSnJ+LBI6hbmaJ SsU42WC2WwtCpSzw8ctK83V06paZ0lIBXVij2JUPw1dswh2iRWVnr/fPsDLO4yFtd9P4fI ezQyvBznOzizEck27XmF+iau2VPOsFlqEs41SbQKGfKJZx61hv+WUfvF9ldFYqo4G7EVfT R8CJB/f1u9Ll+tlO7QSqjXz/FioES2M4HRdhEM1g7q1+xkCFR+Y9UP9V6rsqrtf3nwmy2I 82sjXwaOmbrVRCmPfRjJHxe+IcQzspfZnJTSRWErbb2hx7zGbhAM6gbBoC4pMA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDKHD3DYDzrLM for ; Sat, 6 May 2023 20:42:16 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 346KgGFg088448 for ; Sat, 6 May 2023 20:42:16 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 346KgG8k088447 for freebsd-arm@FreeBSD.org; Sat, 6 May 2023 20:42:16 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 271288] FreeBSD 13.2; Alignment Fault ; network related Date: Sat, 06 May 2023 20:42:16 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: martin@bxlr.sk X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271288 Bug ID: 271288 Summary: FreeBSD 13.2; Alignment Fault ; network related Product: Base System Version: 13.2-RELEASE Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: martin@bxlr.sk In qemu, using FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img image, with out without virtio network system fails to boot and crashes on data alignment fault. With virtio VM started as: qemu-system-arm -M virt -m 2048 -nic tap -bios u-boot.bin -hda FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img -s \ -device virtio-net-pci,netdev=3Dnetwork0 -netdev tap,id=3Dnetwork0,br=3Dbr0 Crashes the system during network initialization: DHCPDISCOVER on vtnet0 to 255.255.255.255 port 67 interval 7 Fatal kernel mode data abort: 'Alignment Fault' on read trapframe: 0xd5ec5a60 FSR=3D00000001, FAR=3Dd8e4f01a, spsr=3D20000013 r0 =3D00000000, r1 =3D00000001, r2 =3D00000001, r3 =3Dd5ec5b4c r4 =3D00000014, r5 =3Dd8dd4300, r6 =3Dd8e4f02e, r7 =3D00000134 r8 =3D00000000, r9 =3D00000134, r10=3Dd8e4f01a, r11=3Dd5ec5b90 r12=3D4400ffff, ssp=3Dd5ec5af0, slr=3Dc04a9728, pc =3Dc04a9750 panic: Fatal abort cpuid =3D 0 time =3D 1680843368 KDB: stack backtrace: #0 0xc035786c at kdb_backtrace+0x48 #1 0xc02fdd20 at vpanic+0x140 #2 0xc02fdbe0 at vpanic+0 #3 0xc06304ac at abort_align+0 #4 0xc063052c at abort_align+0x80 #5 0xc063017c at abort_handler+0x480 #6 0xc060f480 at exception_exit+0 #7 0xc04a9750 at udp_input+0x288 #8 0xc0473f54 at ip_input+0x1e0 #9 0xc04447c0 at netisr_dispatch_src+0xf8 #10 0xc043bf2c at ether_demux+0x1a4 #11 0xc043d5e4 at ether_nh_input+0x480 #12 0xc04447c0 at netisr_dispatch_src+0xf8 #13 0xc043c404 at ether_input+0x50 #14 0xc01c0838 at vtnet_rx_vq_process+0x880 #15 0xc01b70d0 at vtpci_intx_intr+0xac #16 0xc02b87f0 at ithread_loop+0x2ec #17 0xc02b465c at fork_exit+0xc0 Uptime: 49s Quick check with gdb reveals: Breakpoint 2, udp_input (mp=3D, offp=3D, prot= o=3D17) at /usr/src/sys/netinet/udp_usrreq.c:504 504 in /usr/src/sys/netinet/udp_usrreq.c =3D> 0xc04a9750 : 03 00 9a e8 ldm r10, {r0, r1} 0xc04a9754 : 00 20 a0 e3 mov r2, #0 0xc04a9758 : 08 30 da e5 ldrb r3, [r10, #8] (gdb) i r $r10 $cpsr r10 0xd8ebc01a -655638502 cpsr 0x20000013 536870931 (gdb) I simplified the setup and removed the tap interface from the qemu setup. Machine boots but crashes while I try to SSH to it: login: Fatal kernel mode data abort: 'Alignment Fault' on read trapframe: 0xd5ecea18 FSR=3D00000001, FAR=3De1141032, spsr=3D60000013 r0 =3D00000014, r1 =3D0000003c, r2 =3D00000010, r3 =3D00000010 r4 =3De114102e, r5 =3Dd8e84200, r6 =3D00000028, r7 =3D00000000 r8 =3D00000014, r9 =3D00000000, r10=3D00000028, r11=3Dd5eceb88 r12=3Dd8e84200, ssp=3Dd5eceaa8, slr=3Dc04847c8, pc =3Dc0482e58 panic: Fatal abort cpuid =3D 0 time =3D 1680843499 KDB: stack backtrace: #0 0xc035786c at kdb_backtrace+0x48 #1 0xc02fdd20 at vpanic+0x140 #2 0xc02fdbe0 at vpanic+0 #3 0xc06304ac at abort_align+0 #4 0xc063052c at abort_align+0x80 #5 0xc063017c at abort_handler+0x480 #6 0xc060f480 at exception_exit+0 #7 0xc0482e58 at tcp_input_with_port+0x4c4 #8 0xc04847c8 at tcp_input+0x10 #9 0xc0473f54 at ip_input+0x1e0 #10 0xc04447c0 at netisr_dispatch_src+0xf8 #11 0xc043bf2c at ether_demux+0x1a4 #12 0xc043d5e4 at ether_nh_input+0x480 #13 0xc04447c0 at netisr_dispatch_src+0xf8 #14 0xc043c404 at ether_input+0x50 #15 0xc01c0838 at vtnet_rx_vq_process+0x880 #16 0xc01b70d0 at vtpci_intx_intr+0xac #17 0xc02b87f0 at ithread_loop+0x2ec Uptime: 1m17s Breakpoint 3, tcp_fields_to_host (th=3D0xe114402e) at /usr/src/sys/netinet/tcp_var.h:1126 1126 /usr/src/sys/netinet/tcp_var.h: No such file or directory. =3D> 0xc0482e58 : 03 00 94 e9 ldmib r= 4, {r0, r1} (gdb) i r $r4 $cpsr r4 0xe114402e -518766546 cpsr 0x60000013 1610612755 (gdb) It seems data structures are not aligned to their native boundaries. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Sun May 7 11:27:19 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDhwj4fVKz4B4Qg for ; Sun, 7 May 2023 11:27:33 +0000 (UTC) (envelope-from joerg.ruppe.tanner@gmail.com) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDhwh5jGKz4Nq3 for ; Sun, 7 May 2023 11:27:32 +0000 (UTC) (envelope-from joerg.ruppe.tanner@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=Ypx4auJo; spf=pass (mx1.freebsd.org: domain of joerg.ruppe.tanner@gmail.com designates 2a00:1450:4864:20::62a as permitted sender) smtp.mailfrom=joerg.ruppe.tanner@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-94f4b911570so537884666b.0 for ; Sun, 07 May 2023 04:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683458851; x=1686050851; h=to:cc:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=II5kxDVLS3DYnQEeXlw5WOku0Oki7MZ93AVeisrX180=; b=Ypx4auJoajIGiOBAujfHVA6QD3NHw4b7JUpIseEC3FYa+APjiI1mqAULsnLuguRCgj oNNYeD9XeQ2huBIw9YcFbcmcxki/KpVeaLiN/EW2be2Lb3zIrqu51NQSkIDB8HP9BkIj SMwomY4u/deYYj2aPBL69hXuPb8LV94PpY1aKuSGpYOn6vpeCWKqoW3S/rOkWfHmpKeZ Tlspc1oHJjKVK3loOLHpG1vkYJCyh51iyejyhodSuMqPv4ii0ZGerifHrmWwvZCk6eE0 vy8tiYbjns0ZXqyfM/njmfjdte6wq4b5A48N+38DL9krUWgIc4sYsIyeaSSzLkUQMG0O wsQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683458851; x=1686050851; h=to:cc:date:message-id:subject:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=II5kxDVLS3DYnQEeXlw5WOku0Oki7MZ93AVeisrX180=; b=HaafV92ol0wITGTgWQ8zhiK12yJ3ZD1u4ywxz3PS7rMDDScF067Dl+V+JfUjW3uAPX y9vTP4L/3MRlrbhd8Shqj05oL8jeudnAM7FEbUklI+F8Qrscq4m6ALueh9tR/+c7UShF STLMXBns7+PiSDa/WzdlVRgUX+oQBqU+Oet8+6HwoEj7bPLJfRcmsrehI3vfBxp1fQny Z5XTJlYwxg2kE85qtDcW8ft8J4f59mHEpNc8Q1VwbcL7+cqNfjXHqRzRgLm1IJbHmrG0 i3FOk2+lpExQhYwJj4/uEs+v0dnsqm9LwhGaTmyRwB/JMoK2cV2/Yh9jaDa0QHLO/tsC 8y+g== X-Gm-Message-State: AC+VfDzXQtem9kNJduPYRa4KO9OvWGdM2WAcMiEKcBV5BCMTzePo8jrs KJQLZu3Qd8RbK40Ya8tYHzsxKh/FLPTXlg== X-Google-Smtp-Source: ACHHUZ5iIHpJ7+eCXhLbkmdslYmhxtZWpgyDpX71wiggKTsv5VzcHLGewHDyx2ZaUH17/8QnR7omzA== X-Received: by 2002:a17:906:58d1:b0:94e:eb42:2a7c with SMTP id e17-20020a17090658d100b0094eeb422a7cmr7156780ejs.25.1683458851047; Sun, 07 May 2023 04:27:31 -0700 (PDT) Received: from smtpclient.apple ([213.144.146.67]) by smtp.gmail.com with ESMTPSA id fh8-20020a1709073a8800b0095ef7268ba9sm3529326ejc.41.2023.05.07.04.27.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 May 2023 04:27:30 -0700 (PDT) From: =?utf-8?Q?J=C3=B6rg_Ruppe-Tanner?= Content-Type: multipart/alternative; boundary="Apple-Mail=_3B8FC805-BD5E-4B87-A48C-984AB5164E7E" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Kernel vm_vault during starting connection to Internet Provider PPPoE using PPP or MPD5 on RPI4 FreeBSD 14 Message-Id: Date: Sun, 7 May 2023 13:27:19 +0200 Cc: joerg.ruppe.tanner@gmail.com To: freebsd-arm@freebsd.org X-Mailer: Apple Mail (2.3731.500.231) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::62a:from]; ARC_NA(0.00)[]; BLOCKLISTDE_FAIL(0.00)[2a00:1450:4864:20::62a:server fail,213.144.146.67:server fail]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; TO_DN_NONE(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_CC(0.00)[gmail.com] X-Rspamd-Queue-Id: 4QDhwh5jGKz4Nq3 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_3B8FC805-BD5E-4B87-A48C-984AB5164E7E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi I am trying to move the PPPoE from a Zyxel router to FreeBSD = 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu Apr 6 11:36:21 UTC 2023 The reason is a better IPv6 implementation especially in routing=20 Unfortunally the Kernel Crashes during the negotiation . I tried PPP Dump header from device: /dev/label/growfs_swap Architecture: aarch64 Architecture Version: 1 Dump Length: 341123072 Blocksize: 512 Compression: none Dumptime: 2023-05-05 07:44:26 +0200 Hostname: rpi-io Magic: FreeBSD Kernel Dump Version String: FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu = Apr 6 11:36:21 UTC 2023 = root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC Panic String: vm_fault failed: ffff0000008940f8 error 1 Dump Parity: 3130209551 Bounds: 0 Dump Status: good rpi-io dumped core - see /var/crash/vmcore.0 Fri May 5 06:58:30 CEST 2023 FreeBSD rpi-io 14.0-CURRENT FreeBSD 14.0-CURRENT #0 = main-n262010-f21faa67ab6b: Thu Apr 6 11:36:21 UTC 2023 = root@releng1.nyi.freebsd.or g:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 panic: vm_fault failed: ffff0000008940f8 error 1 GNU gdb (GDB) 13.1 [GDB v13.1 for FreeBSD] Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later = This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-portbld-freebsd14.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /boot/kernel/kernel... Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug... Unread portion of the kernel message buffer: Fatal data abort: x0: ffffa00094e872b2 x1: 0 x2: ffff0000c1f73008 (_DYNAMIC + c0a4ac78) x3: 1 x4: ffffa00094e87fd8 x5: 2 x6: 8080ffff x7: 0 x8: 1 x9: 0 x10: 8864 x11: ffffa000b20d0994 x12: 12 x13: 12 x14: 12 x15: ffffa000b20d09a6 x16: 10000 x17: ffff00000058c12c (ether_output_frame + 0) x18: ffff0000c1f73030 (_DYNAMIC + c0a4aca0) x19: ffff0000b4f2a030 (_DYNAMIC + b3a01ca0) x20: ffff0000b4f2a000 (_DYNAMIC + b3a01c70) x21: ffffa00094e87200 x22: 0 x23: ffffa00000db0000 x24: ffffa00094d88e80 x25: 0 x26: 0 x27: 0 x28: 0 x29: ffff0000c1f731a0 (_DYNAMIC + c0a4ae10) sp: ffff0000c1f73030 lr: ffff000000893f78 (gen_start_locked + 144) elr: ffff0000008940f8 (gen_start_locked + 2c4) spsr: 60000045 far: 10 esr: 0000000096000004 panic: vm_fault failed: ffff0000008940f8 error 1 cpuid =3D 0 time =3D 1683265466 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x13c panic() at panic+0x44 data_abort() at data_abort+0x32c handle_el1h_sync() at handle_el1h_sync+0x10 --- exception, esr 0xffffa0000191e6bc (null)() at 0 KDB: enter: panic Uptime: 56m23s Dumping 325 out of 8027 MB:..2%..12% 0x0000000000000000 in ?? () (kgdb) #0 0x0000000000000000 in ?? () #1 in ?? () Backtrace stopped: not enough registers or memory available to unwind = further (kgdb) ------------------------------------------------------------------------ Mpd5 Dump header from device: /dev/label/growfs_swap Architecture: aarch64 Architecture Version: 1 Dump Length: 607428608 Blocksize: 512 Compression: none Dumptime: 2023-04-30 07:05:41 +0200 Hostname: rpi-io Magic: FreeBSD Kernel Dump Version String: FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu = Apr 6 11:36:21 UTC 2023 = root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC Panic String: vm_fault failed: ffff0000008940f8 error 1 Dump Parity: 636693519 Bounds: 1 Dump Status: good Sun Apr 30 07:07:43 CEST 2023 FreeBSD rpi-io 14.0-CURRENT FreeBSD 14.0-CURRENT #0 = main-n262010-f21faa67ab6b: Thu Apr 6 11:36:21 UTC 2023 = root@releng1.nyi.freebsd.or g:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 panic: vm_fault failed: ffff0000008940f8 error 1 GNU gdb (GDB) 13.1 [GDB v13.1 for FreeBSD] Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later = This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "aarch64-portbld-freebsd14.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /boot/kernel/kernel... Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug... Unread portion of the kernel message buffer: Fatal data abort: x0: ffffa00184e0c7b2 x1: 0 x2: ffff0000fe33edd8 (_DYNAMIC + fce16a48) x3: 1 x4: ffffa00184e0cfd8 x5: 7 x6: ff x7: 0 x8: 1 x9: 0 x10: 8864 x11: ffffa00184ef5a96 x12: 12 x13: 12 x14: 12 x15: ffffa00184ef5aa8 x16: 10000 x17: ffff00000058c12c (ether_output_frame + 0) x18: ffff0000fe33ee00 (_DYNAMIC + fce16a70) x19: ffff0000b4f2a030 (_DYNAMIC + b3a01ca0) x20: ffff0000b4f2a000 (_DYNAMIC + b3a01c70) x21: ffffa00184e0c700 x22: 0 x23: ffffa00000db0000 x24: ffffa00094a0ac00 x25: ffff0000fed100a0 (__stop_set_sysinit_set + 2129c8) x26: 0 x27: 0 x28: 0 x29: ffff0000fe33ef70 (_DYNAMIC + fce16be0) sp: ffff0000fe33ee00 lr: ffff000000893f78 (gen_start_locked + 144) elr: ffff0000008940f8 (gen_start_locked + 2c4) spsr: 60000045 far: 10 esr: 0000000096000004 panic: vm_fault failed: ffff0000008940f8 error 1 cpuid =3D 2 time =3D 1682831141 KDB: stack backtrace: db_trace_self() at db_trace_self db_trace_self_wrapper() at db_trace_self_wrapper+0x30 vpanic() at vpanic+0x13c panic() at panic+0x44 data_abort() at data_abort+0x32c handle_el1h_sync() at handle_el1h_sync+0x10 --- exception, esr 0 __stop_set_sysinit_set() at 0xffff0000fec6c760 KDB: enter: panic Uptime: 6h24m48s Dumping 579 out of 8027 MB:..1%..11%..21% 0x0000000000000000 in ?? () (kgdb) #0 0x0000000000000000 in ?? () #1 in ?? () Backtrace stopped: not enough registers or memory available to unwind = further (kgdb) ------------------------------------------------------------------------ If you need further Information please let me know. For both cases I = have full vmcore core.txt file=20 In the moment I make a fall back to the zyxel Router :( If there any good ideas / hints available. Please let me know . Kind Regards=20 J=C3=B6rg --Apple-Mail=_3B8FC805-BD5E-4B87-A48C-984AB5164E7E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi

I am trying to move the PPPoE = from a Zyxel router to FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu = Apr  = 6 11:36:21 = UTC 2023
The reason is a better IPv6 implementation especially in = routing 
Unfortunally the Kernel Crashes during the = negotiation .

I tried = PPP

Dump header from device: = /dev/label/growfs_swap

  = Architecture: aarch64

  = Architecture Version: 1

  Dump = Length: 341123072

  Blocksize: = 512

  = Compression: none

  Dumptime: = 2023-05-05 07:44:26 +0200

  Hostname: = rpi-io

  Magic: = FreeBSD Kernel Dump

  Version = String: FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu Apr  = 6 11:36:21 UTC 2023

    = root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC

  Panic = String: vm_fault failed: ffff0000008940f8 error 1

  Dump = Parity: 3130209551

  Bounds: = 0

  Dump = Status: good

rpi-io dumped core - see = /var/crash/vmcore.0


Fri May  5 = 06:58:30 CEST 2023


FreeBSD rpi-io = 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu = Apr  6 11:36:21 UTC 2023     = root@releng1.nyi.freebsd.or

g:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  = arm64


panic: vm_fault = failed: ffff0000008940f8 error 1


GNU gdb (GDB) 13.1 = [GDB v13.1 for FreeBSD]

Copyright (C) 2023 Free Software Foundation, = Inc.

License GPLv3+: GNU GPL version 3 or later = <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and = redistribute it.

There is NO WARRANTY, to the extent permitted by = law.

Type "show copying" and "show warranty" for = details.

This GDB was configured as = "aarch64-portbld-freebsd14.0".

Type "show configuration" for configuration = details.

For bug reporting instructions, please = see:

<https://www.gnu.org/software/gdb/bugs/>.

Find the GDB = manual and other documentation resources online at:

    = <http://www.gnu.org/software/gdb/documentation/>.


For help, type "help".

Type "apropos word" to search for commands related = to "word"...

Reading symbols from = /boot/kernel/kernel...

Reading symbols from = /usr/lib/debug//boot/kernel/kernel.debug...


Unread portion of = the kernel message buffer:

Fatal data abort:

  x0: ffffa00094e872b2

  x1:  =               0

  x2: = ffff0000c1f73008 (_DYNAMIC + c0a4ac78)

  x3:            =     1

  x4: ffffa00094e87fd8

  x5:  =               2

  x6:   =       8080ffff

  x7:            =     0

  x8:            =     1

  x9:            =     0

 x10:           =   8864

 x11: ffffa000b20d0994

 x12:   =             12

 x13:           =     12

 x14:           =     12

 x15: ffffa000b20d09a6

 x16:  =           10000

 x17: ffff00000058c12c (ether_output_frame + = 0)

 x18: ffff0000c1f73030 (_DYNAMIC + = c0a4aca0)

 x19: ffff0000b4f2a030 (_DYNAMIC + = b3a01ca0)

 x20: ffff0000b4f2a000 (_DYNAMIC + = b3a01c70)

 x21: ffffa00094e87200

 x22:  =               0

 x23: = ffffa00000db0000

 x24: ffffa00094d88e80

 x25:  =               0

 x26:  =               0

 x27:  =               0

 x28:  =               0

 x29: = ffff0000c1f731a0 (_DYNAMIC + c0a4ae10)

  sp: ffff0000c1f73030

  lr: = ffff000000893f78 (gen_start_locked + 144)

 elr: ffff0000008940f8 (gen_start_locked + = 2c4)

spsr:         = 60000045

 far:           =     10

 esr: 0000000096000004

panic: vm_fault = failed: ffff0000008940f8 error 1

cpuid =3D 0

time =3D 1683265466

KDB: stack backtrace:

db_trace_self() at db_trace_self

db_trace_self_wrapper() at = db_trace_self_wrapper+0x30

vpanic() at vpanic+0x13c

panic() at = panic+0x44

data_abort() at data_abort+0x32c

handle_el1h_sync() = at handle_el1h_sync+0x10

--- exception, esr 0xffffa0000191e6bc

(null)() at = 0

KDB: enter: panic

Uptime: 56m23s

Dumping 325 out of 8027 MB:..2%..12%


0x0000000000000000 in ?? ()

(kgdb) #0  = 0x0000000000000000 in ?? ()

#1  <unavailable> in ?? ()

Backtrace stopped: = not enough registers or memory available to unwind further

(kgdb)


-----------------------------------------------------= -------------------




Mpd5

Dump header from device: = /dev/label/growfs_swap

  = Architecture: aarch64

  = Architecture Version: 1

  Dump = Length: 607428608

  Blocksize: = 512

  = Compression: none

  Dumptime: = 2023-04-30 07:05:41 +0200

  Hostname: = rpi-io

  Magic: = FreeBSD Kernel Dump

  Version = String: FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu Apr  = 6 11:36:21 UTC 2023

    = root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC

  Panic = String: vm_fault failed: ffff0000008940f8 error 1

  Dump = Parity: 636693519

  Bounds: = 1

  Dump = Status: good



Sun Apr 30 = 07:07:43 CEST 2023


FreeBSD rpi-io = 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n262010-f21faa67ab6b: Thu = Apr  6 11:36:21 UTC 2023     = root@releng1.nyi.freebsd.or

g:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  = arm64


panic: vm_fault = failed: ffff0000008940f8 error 1


GNU gdb (GDB) 13.1 = [GDB v13.1 for FreeBSD]

Copyright (C) 2023 = Free Software Foundation, Inc.

License GPLv3+: = GNU GPL version 3 or later = <http://gnu.org/licenses/gpl.html>

This is free = software: you are free to change and redistribute it.

There is NO = WARRANTY, to the extent permitted by law.

Type "show = copying" and "show warranty" for details.

This GDB was = configured as "aarch64-portbld-freebsd14.0".

Type "show = configuration" for configuration details.

For bug reporting = instructions, please see:

<https://www.gnu.org/software/gdb/bugs/>.

Find the GDB = manual and other documentation resources online at:

    = <http://www.gnu.org/software/gdb/documentation/>.


For help, type = "help".

Type "apropos = word" to search for commands related to "word"...

Reading symbols = from /boot/kernel/kernel...

Reading symbols = from /usr/lib/debug//boot/kernel/kernel.debug...


Unread portion of = the kernel message buffer:

Fatal data = abort:

  x0: = ffffa00184e0c7b2

  x1:  =               0

  x2: = ffff0000fe33edd8 (_DYNAMIC + fce16a48)

  x3:  =               1

  x4: = ffffa00184e0cfd8

  x5:  =               7

  x6:   =             ff

  x7:  =               0

  x8:  =               1

  x9:  =               0

 x10:   =           8864

 x11: = ffffa00184ef5a96

 x12:   =             12

 x13:   =             12

 x14:   =             12

 x15: = ffffa00184ef5aa8

 x16:  =           10000

 x17: = ffff00000058c12c (ether_output_frame + 0)

 x18: = ffff0000fe33ee00 (_DYNAMIC + fce16a70)

 x19: = ffff0000b4f2a030 (_DYNAMIC + b3a01ca0)

 x20: = ffff0000b4f2a000 (_DYNAMIC + b3a01c70)

 x21: = ffffa00184e0c700

 x22:  =               0

 x23: = ffffa00000db0000

 x24: = ffffa00094a0ac00

 x25: = ffff0000fed100a0 (__stop_set_sysinit_set + 2129c8)

 x26:  =               0

 x27:  =               0

 x28:  =               0

 x29: = ffff0000fe33ef70 (_DYNAMIC + fce16be0)

  sp: = ffff0000fe33ee00

  lr: = ffff000000893f78 (gen_start_locked + 144)

 elr: = ffff0000008940f8 (gen_start_locked + 2c4)

spsr:   =       60000045

 far:   =             10

 esr: = 0000000096000004

panic: vm_fault = failed: ffff0000008940f8 error 1

cpuid =3D = 2

time =3D = 1682831141

KDB: stack = backtrace:

db_trace_self() at = db_trace_self

db_trace_self_wrapper() at = db_trace_self_wrapper+0x30

vpanic() at = vpanic+0x13c

panic() at = panic+0x44

data_abort() at = data_abort+0x32c

handle_el1h_sync() = at handle_el1h_sync+0x10

--- exception, esr = 0

__stop_set_sysinit_set() at = 0xffff0000fec6c760

KDB: enter: = panic

Uptime: = 6h24m48s

Dumping 579 out of = 8027 MB:..1%..11%..21%


0x0000000000000000 = in ?? ()

(kgdb) #0  = 0x0000000000000000 in ?? ()

#1  = <unavailable> in ?? ()

Backtrace stopped: = not enough registers or memory available to unwind further

(kgdb)


-----------------------------------------------------= -------------------


If you need = further Information please let me know. For both cases I have full = vmcore core.txt  file 
In the moment I = make a fall back to the zyxel Router  :(
If there = any good ideas / hints available. Please let me know = .

Kind = Regards 

J=C3=B6rg

=
= --Apple-Mail=_3B8FC805-BD5E-4B87-A48C-984AB5164E7E-- From nobody Sun May 7 21:00:51 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDxfF1BgYz49WH4 for ; Sun, 7 May 2023 21:00:53 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDxfD6V9sz3DyJ for ; Sun, 7 May 2023 21:00:52 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683493252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/q3LfiiIhYoLIxKkLJ70nLhC4E7wRnXqe/Z1XbsJsj0=; b=XrA330sIQFxJ8ErnlNl6QoXj+bSE2vogdZN8FoskDpA8/OSxp5gsKNikqohllqNll0Yomt hieLUrS2GPHTjrCm4W0R9Ho6E0HXLCuxvm4RVPzGFkMjLogjXaoJiqmohldTC+RnCc6Xfi 2LP2+NGWVmhLpbtq8U/wIdkvNYdwU1miCG2XNuTfaHWFL2G8J4x2HClqw1k14bUmVouzsf Pi0luRBspvJdrYS6JIKKviPkjErrpBpAW9xCLp1DNB6nT4VfOkDipZHw/ntWb1Dx9YHgJc ujr7xqFObMbAkZAJOi4r9V4cJ7x1lE9QsSOsy3DWk8565B7uwHwDiyESxZeCmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683493252; a=rsa-sha256; cv=none; b=KiyaccndUsU8MNffQu22kZMnfcPkjWh7l+yBkMYfmVYy+G9UXdHzn/TLO1BTNmmpTa+qTr mEsZmzUbjrzANFZXXb3r5rgqeiQBL4qeG/ay42S69eW3SaehazvXFKjZ7xkMGfifTDbN7+ 1Ap/h+3OreUExyJxcamYI/PLLSddsgO+7Zdic8d/epvFRMsi0VUaLvjaESAZat9rIGJ+I3 d7yYs5EHVeDr5Hljp4DY7FKW5xKEgJghr4st3sA7FlbS/ADqPjuj5WWL5gBkQ/c86toioO QnI9yTDxOSfHg4PT7zabIjO1+q5vi4ZTQ6XI5Xr9D6bPLE5alIyF6EXAV4BrQg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDxfC0yPDzYYg for ; Sun, 7 May 2023 21:00:51 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 347L0pWW014656 for ; Sun, 7 May 2023 21:00:51 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 347L0p0N014655 for freebsd-arm@FreeBSD.org; Sun, 7 May 2023 21:00:51 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <202305072100.347L0p0N014655@kenobi.freebsd.org> X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@FreeBSD.org using -f From: bugzilla-noreply@FreeBSD.org To: freebsd-arm@FreeBSD.org Subject: Problem reports for freebsd-arm@FreeBSD.org that need special attention Date: Sun, 7 May 2023 21:00:51 +0000 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="16834932510.3881B.10209" Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N --16834932510.3881B.10209 Date: Sun, 7 May 2023 21:00:51 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 238576 | Raspberry Pi 3B+ "shutdown -p" does not shut off Open | 257670 | mpr(4): SAS3008 PCI-Express Fusion-MPT SAS-3: Fat 2 problems total for which you should take action. --16834932510.3881B.10209 Date: Sun, 7 May 2023 21:00:51 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
The following is a listing of current problems submitted by FreeBSD users,
which need special attention. These represent problem reports covering
all versions including experimental development code and obsolete releases.

Status      |    Bug Id | Description
------------+-----------+---------------------------------------------------
Open        |    238576 | Raspberry Pi 3B+ "shutdown -p" does not shut off 
Open        |    257670 | mpr(4): SAS3008 PCI-Express Fusion-MPT SAS-3: Fat

2 problems total for which you should take action.
--16834932510.3881B.10209-- From nobody Wed May 10 02:19:53 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QGJdm1mN2z49t9N for ; Wed, 10 May 2023 02:20:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-21.consmr.mail.gq1.yahoo.com (sonic317-21.consmr.mail.gq1.yahoo.com [98.137.66.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QGJdk6wKzz3wHg for ; Wed, 10 May 2023 02:20:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="W/NcUpvT"; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683685209; bh=T6Q/dZz3+7tFuwg6RF9oa1vYmEwOuipUop8KmWvWag0=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=W/NcUpvTjauz3JyjXI+IRf8QA/nDoslWFfYuAOuESo7BagEl8iqgHSI9ZJfpwAb2ADNiIgT9Njj3yz7HO/FzkFov35RLMKVbt867N3u/XyJjK+GiVQCXEx1qpvNAbzlAqBW0NGh++yM0PFqup7dppnSPq6w7j4qci+QqsuEEqmqR7IQh/xcm7S7j6Y4fdIHsQX1GSuNeV4h0K3xDDtVa1mkdTGpH0Y+XS3j1ddpFBO1jbpeQS02sJeOacwKyYQdBL3RWpKhqDlpY24l34sKuJhx2XhxlLEuTfsHdgB30MQaBENVJqLkez0vPUNzaVjt7Qxt5ir+XAJzG+uhBIpUi3A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683685209; bh=0wd8l08E6tYCaMsqYmvW6jv1X/N1IfLGYLjRtfIcsWj=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=WyEBW1XPS8pR83WWA5576JlzWQk+zJq4IpMR5qoeK/iDYjDr5q3RVg21ic6sb9pExEpww+hCbj3yR/5WsQiJ9EebGDctZvpf1DSPSElzE9/Iiji1/iY2t8XAR6T3uwf8hB/W2W1yUsXOm2famLa4+xzCWpS3gVHwWs03VSBgq+aVBxTZaBA7zoDB2eQF2Cu5kuRG5uXL+TXjjolCyiFAGjL9crv9onaNGetjM6fsQ/kCbbeJDRGkqeAUd5Q180bCXz9qurk29dHgJGFu34uZhc7a+ipIP0AaqX7Sd3rtnj3WXFwLbDY/DRsA0vgvwf3ovKxvclcpivy00HSVbH8xjw== X-YMail-OSG: Ul_kO7MVM1k94bcGjwN7lomcYEAdzH861dYVyYwAruUy4s0e5myun5kFJbjjsb. udTve4XA9Q8ywB8.1FUZM.IKlFO97K63CNLWWUY1_RZ8ByFc.MAMm88_gXwyxqQKW0oGT0VXlypF j5isEoz.JBABVJInQbZ6oDXUqMihHAW9.PncQfsVH7b1tu..ohXfsQ2JVcV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: X-Sonic-ID: 6d5e244f-be5b-4a30-abf9-0fb16981bca9 Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Wed, 10 May 2023 02:20:09 +0000 Received: by hermes--production-bf1-5f9df5c5c4-5d8pl (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 4fb6de71de49ceb5d6cfe8b7952df3db; Wed, 10 May 2023 02:20:05 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Cores of different performance vs. time spent creating threads: Windows Dev Kit 2023 example Message-Id: <11EBAA22-6E0F-4B27-9799-7786E149D9B1@yahoo.com> Date: Tue, 9 May 2023 19:19:53 -0700 Cc: freebsd-arm To: FreeBSD Hackers X-Mailer: Apple Mail (2.3731.400.51.1.1) References: <11EBAA22-6E0F-4B27-9799-7786E149D9B1.ref@yahoo.com> X-Spamd-Result: default: False [-1.82 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; NEURAL_SPAM_SHORT(0.68)[0.682]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.147:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.147:from] X-Rspamd-Queue-Id: 4QGJdk6wKzz3wHg X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N First some context that reaches an oddity that seems to be involved in the time to create threads . . . The Windows Dev Kit 2023 (WDK23 abbrevation here) boot reports: CPUs (cores) 0..3: cortex-a78c (the slower cores) CPUs (cores) 4..7: cortex-x1c (the faster cores) Building a kernel explicitly via involving -mcpu= use gets the following oddity relative to cpu numbering when the kernel is used: -mcpu=cortex-x1c or -mcpu=cortex-a78c: Benchmarking tracks that number/performance pairing. -mcpu=cortex-a72: The slower vs. faster gets swapped number blocks. So, for -mcpu=cortex-a72 , 0..3 are the faster cores. This sets up for the following . . . But I also observe (a relative comparison of contexts via some benchmark-like activity): -mcpu=cortex-x1c or -mcpu=cortex-a78c based kernel: threads take more time to create -mcpu=cortex-a72 based kernel: threads take less time to create The difference is not trivial for the activity involved for this WDK23 context. If there is a bias as to which core(s) are involved in part of thread creation generally, it would appear to be important that the bias to be to the more performant cores (for what the activity involves). The above suggests that such is possibly not necessarily the case for FreeBSD as is. BIG/little (and analogous?) cause this to become more relevant. Does this hypothesis about what type of thing is going on fit with how FreeBSD actually works? As stands, I'm going to experiment with the WDK23 using a cortex-a72 targeted kernel but a cortex-x1c/cortex-a78c targeted world for my general operation of the WDK23. Note: While the benchmark results allow seeing in plots what traces back to thread creation time contributions, the benchmark itself does not directly measure that time. It is more like, the average work rate for a time changes based on the fraction of the time involved in the thread creations for each given problem size. The actual definition of work here involves a mathematical quantity for a mathematical problem (that need not be limited to computers doing the work). The benchmark results are more useful for discovering that there is something to potentially investigate than to actually do an investigation with. === Mark Millard marklmi at yahoo.com From nobody Thu May 11 04:05:19 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QGywb5nzsz49cP4 for ; Thu, 11 May 2023 04:05:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QGywb331dz47xT for ; Thu, 11 May 2023 04:05:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683777919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N19oYBhEcLRakTb0HOfylrLm3BT4XRgUq4cI+ZUCG1A=; b=JsuOhpjAj2YsZ50g5z70mTv1h+VI1WMyHJFqdbFwLJgixItDiYgQOdzCQn6VJoN4p5Dslg BrJu+FuEMNyMkNJZTF0ttFaQxzLzroG435NuDkvfvDpUMvwMBRx/MkIBgOWelZVIvSW3cd LLvG0xY3U2xXII4TGBKiJuUp9BK4tBmHfk5f5bBzeiH9BNnlucU6Xq7ICtEuLFBIt4CfiC raw4DEjXqJhI1/xZjuY+TtmJhOyBm1PRQB97LtdsfM8c3qP9mepZQxhiSPkPBJOuAhTswS i7EwaHmcbmx4vbwFoBhcKmVP5+C3G0NQ/bx4qLlCrD7XsaxfsmwDPKdKhH6a+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683777919; a=rsa-sha256; cv=none; b=YkrE2Z2KFUDDzLL/+XDcfdIUzldispWotNcZT26cP8/tCPWjqM4uLQCD4AfTHPGsm610Py LqXWwrmFDkF+r0y+KarNdv0lCokpxzHcFsABzzz7EEPVRBhQB6QZiJ28sATs8ClWtT+Vtf ZwOuXT9GBcL7HyKUlSGe/rXwbN7me8mu/ujNAZMhkolETzeyqEzGUyMph4YJc/w1SRNAmI fis6Sc1srpN4yBG9YY5nR6NECndB+lpxfBNDqR4kR3YHavLqGKlrx85focOGwNELO6ay6s YIdkx9iSOORwxYQfTFtWk3GkPtgFWGj8T/Llc3PRGf8RSUDk/+yisTqu76Hv0w== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QGywb25ZHzctc for ; Thu, 11 May 2023 04:05:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 34B45Jb5067912 for ; Thu, 11 May 2023 04:05:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34B45Jos067911 for freebsd-arm@FreeBSD.org; Thu, 11 May 2023 04:05:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 271359] RPi4: reset after shutdown -h doesn't work. Date: Thu, 11 May 2023 04:05:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: t_uemura@macome.co.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271359 Bug ID: 271359 Summary: RPi4: reset after shutdown -h doesn't work. Product: Base System Version: 13.2-STABLE Hardware: arm64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: t_uemura@macome.co.jp Created attachment 242116 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D242116&action= =3Dedit Ugly but reliable way of workaround. On RPi4B running 13.2-RELEASE official image (or home-brew 13.2-STABLE with more recent u-boot and firmware), reset after shutdown -h by pressing a key= to "The operating system has halted.\nPlease press any key to reboot." prompt never works as expected. It simply freezes just after "Rebooting..." messag= e, and a power cycle is required to restart the operating system. Precisely, reset after shutdown -h is handled by sys/kern/kern_shutdown.c:shutdown_reset() but there are two hardware specif= ic issues here.=20 The one is that mtx_lock_spin(&smp_ipi_mtx) never returns. I don't know how important this lock is and tried to see by commenting it out, and faced ano= ther issue. If I omitted the lock, then psci_call(PSCI_FNID_SYSTEM_RESET) was subsequen= tly called from cpu_lock() and it never successfully reset the board. Just stop. Screen was still on and "Rebooting..." was intact. I don't know whether this psci_call() failure is caused by the skipped lock. To workaround, a watchdog firing is good alternative, as did in sys/arm/broadcom/bcm2835/bcm2835_wdog.c:bcmwd_reboot_system(). I was very reluctant to add machine-dependent code to the file under sys/ke= rn, but I couldn't think of any other way to get around the lock other than what was did in the attached patch. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Thu May 11 06:26:57 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QH24N05sxz49nG8 for ; Thu, 11 May 2023 06:27:16 +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.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QH24L60Nyz3CYt for ; Thu, 11 May 2023 06:27:14 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=cBF2LhFg; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683786432; bh=Kz3VUpywOB4xhCWtk+/ujw0gSf6BTbQK10mBMmE/KtM=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=cBF2LhFgtVYUwUzwH4uQzSksAwALlfipwlQ93Yc8PYR5P2txkJMOf5xGVgZfYuVMHtMDspVMjkWkqiqpXfKU10E03jE8oREIV/k0DqLRxx5SuMSdh6pLo4WFYZ7FQ/YKUUEpkcO3fnqvoc9dj8JOb4P9cJ4QsxJFoupu/AVaEo0bsCg91TBlK83fhd6RRZx3LZfIXKLVMlRaIguIWO+54YKAj4wFZ8cE9/e35dK3qM3FtMW4E46Pl5CZgtNiwIsdemTQPYYAJzsDRQkv7kuPRSBMLYyNKxFRB36P2zElSWQziv0Ptg/fKj04XNoPx/RK8nc/CyQ17+8G1vj2LwfRKw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683786432; bh=s3QTiDXpDX0avo9RGOU8hhvyvN19KQAQCC/AHCx4zGW=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=PgQ/HaGgbor2KitcLyrVMgxUJljVFEWUnyfsQytLAYlxFcHGqRNaH+ozb09OCJ8a2zAb78uwIBRPYOtz73WMROGxGAt0/By1qDy/AJLMAsE2yGC7M8xCRrZQhtt/5s2USIbCpe6xPRY9CuCXX3y0Qcn7T5hW6VReC01VNahhdmorsszbmp22/XGnfRgaoATkGLT1rNjzaQYnTL/zuU6rUPQiAcSYj6DI7M90j6FpZxi6lyktP7Kl0+KGmmIbnlPGSaNiHmazWDJovwgw2xe6vXDot5TnrB5gAxfGZTJPSYzT9ZUX/IgUncI9a4EB8ekSc98I0qJOOfodgfzRAABb5g== X-YMail-OSG: 6poC3QMVM1kVNtoPpThbNsxo1.GXsbsXfkepBqpvSEiDW2088X5dMAlRbU_Eeqc qMx7Mf8hIIBwTZ0_jy335vUmyNOd70TKoQzWsM5hmbkGnXCOLPowV8IF5bS9v_946vdYEQNpPtVO TdTsxHvV48WZiaTEbf0lfU_Ar6a7uiiynFbcXnU6bvOL8I1w9I_i3wHUCcrWIXxvcrLVk9SyQQVr JSlG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-4105-bd6c-661a74dc8625 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Thu, 11 May 2023 06:27:12 +0000 Received: by hermes--production-bf1-54475bbfff-lfx8r (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID dcebe33f363ce6391e9479788e857dda; Thu, 11 May 2023 06:27:09 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: stable/13 missing 2 Windows Dev Kit 2023 related updates that main [so: 14] has Message-Id: <6B3AAEAA-8596-41B5-9F8C-982F049EEF02@yahoo.com> Date: Wed, 10 May 2023 23:26:57 -0700 To: FreeBSD-STABLE Mailing List , freebsd-arm X-Mailer: Apple Mail (2.3731.400.51.1.1) References: <6B3AAEAA-8596-41B5-9F8C-982F049EEF02.ref@yahoo.com> X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.985]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.32:from]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.32:from] X-Rspamd-Queue-Id: 4QH24L60Nyz3CYt X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N I had to substitute a FreeBSD EFI loader from main [so: 14] to boot the Windows Dev Kit 2023 via USB3 and a dd'd: = http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/13.2/FreeBSD-13.2= -STABLE-arm64-aarch64-ROCK64-20230504-7dea7445ba44-255298.img.xz When I looked as a resut, the following that mention the Windows Dev Kit 2023 were not in stable/13 : Commit message (Expand) Author Age Files Lines * arm64: Disable PAC when booting on a Windows Dev Kit 2023 = Mark Johnston 2023-04-23 1 -1/+30 * Add the fixed memory type to the pci ecam driver Andrew = Turner 2023-01-18 1 -3/+20 By contrast, I did find: Commit message (Expand) Author Age Files Lines * loader.efi: make sure kernel image is executable Robert = Clausecker 2023-01-23 1 -4/+4 * Add Windows Dev Kit 2023 support to if_ure Andrew Turner = 2023-01-23 2 -0/+2 * Check for more XHCI ACPI IDs Andrew Turner 2023-01-23 = 1 -4/+7 in stable/13 . (I have not checked the correspondance of what I found missing vs. the status of the loader. There could be more involved than what I've found --and some or all of what I found missing may not be involved in the EFI loader issue.) =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu May 11 23:28:48 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHSl50F10z4BBX1 for ; Thu, 11 May 2023 23:28:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHSl45bxcz3MGw for ; Thu, 11 May 2023 23:28:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683847728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D07Oo9/xuf7OLjhc1o70IQj9iZE7jnYKH4yx5PLU/wk=; b=mdIT7PJqB4kplG8GS+aq3bwP+gh90iQG1XMFGMPNwkuwdrRKhGzl8B46eGU0k5Br47p/9M TuXCw1imRWdobSUoCOkOsn3HvrZXe6jvKv2VaFHbsxYs2+53ax7bPjiE4ODjgnxNUBMMk4 nU0jgjVUjlV59d6elOHdLxxx/xlImc2G4pp3VZMV/GzsbMWtrZLgOzeqn5wxGdcIKYs3Np on0aUJXfToH31jW+M6lMJbGYyp7i+1AiM3iQDnQO44/PdCraKDNjsvf30hxnMTpSInz0Rf Gp19ZGm7eh3WSJH53iKaPZqSdAjaDeicStH1GAFuMOs2k7Jis59xBNnQFmc6oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683847728; a=rsa-sha256; cv=none; b=ITIoOhy8Y3pXvqCCQ7PqqhEcpgMx3A9SzL4QvWwfDSIp/ZkyJp3q8gW5h2h7ZG14AgEJVc WDdYDCr5HjrQF53qbzaOrRmR32RKzrjkadfS+IHqTIfAJtIE4UO9w4KCWdsSWNuaBh4APf Ul1toxpJerngxzJz8t62bEaRZEAWhnEQziK3TM5dscH6sSh0XkcCQ7w3DjbP2fwaArUjC2 RMMCnwy+Xit2sZ2Emma+8AKfsPBUMfFtQSJvPdmMXctyeIXesWl/9UEeRZBRJiXekeuMdN 7quxeQ9X1gUy/Sp1yju/qdNVWz1zaH7dUOz42Rl3YS95Om5Iinsh3asUXYw+FQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QHSl44hbpz1Brl for ; Thu, 11 May 2023 23:28:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 34BNSmhL040269 for ; Thu, 11 May 2023 23:28:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34BNSmib040268 for freebsd-arm@FreeBSD.org; Thu, 11 May 2023 23:28:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 264727] freebsd-update: Fails to upgrade arm64 13.0-p11 to 13.1-RELEASE: ld-elf.so.1: /lib/libc.so.7: Cannot set relro protection to 0x1: Permission denied Date: Thu, 11 May 2023 23:28:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Overcome By Events X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264727 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Open |Closed Resolution|--- |Overcome By Events --- Comment #4 from Ed Maste --- Believed related to issues in older releases, not related to 13.1 or 13.2. Please reopen if this occurs again. --=20 You are receiving this mail because: You are the assignee for the bug.= From nobody Fri May 12 15:43:55 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHtNW3SSYz4B8qg for ; Fri, 12 May 2023 15:44:11 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHtNR0w13z4D6J for ; Fri, 12 May 2023 15:44:07 +0000 (UTC) (envelope-from dfr@rabson.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=rabson-org.20221208.gappssmtp.com header.s=20221208 header.b=WX22lAQG; spf=pass (mx1.freebsd.org: domain of dfr@rabson.org designates 2607:f8b0:4864:20::b32 as permitted sender) smtp.mailfrom=dfr@rabson.org; dmarc=none Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-b9a6eec8611so47413333276.0 for ; Fri, 12 May 2023 08:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabson-org.20221208.gappssmtp.com; s=20221208; t=1683906246; x=1686498246; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=xdUnJ+EYkpxq/k7Pdv9iDhbeo9TbQlV8x8bObhXxmes=; b=WX22lAQGa44jN+U+Alkvz2oss9Ukeb2JSlfKICg7C5qBRyVpdPJOGYZwyczVcT4HMo PVk5LipFC5PrWDQwFgWhcJqAdHDqZu+xC8BKPappAXBd+lgXhS7eNCGFY7suS/jGLc5n hsY+hOfUPjLSYjNqCMDPtO6OsDQX8flwFW3Gyv6ai5FHr7ekZhnEnIWid7PmYRJoes84 7MxuyLhvC0VmyKiAp/tf/rLEpJPQc1+lQIUrg69xltXPWjiZT5etqTpT2lGe6fKPdcb6 QZjBZNhYi/3prYRoKWVVnxMAbUPg9BV3c/HsiRpAmlpRAUg0kcwaN0QHuRJ9jLmYjFbB GOuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683906246; x=1686498246; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=xdUnJ+EYkpxq/k7Pdv9iDhbeo9TbQlV8x8bObhXxmes=; b=SfkA6Iby+wxqSfw1g+M53FiIw4jPo6yajYw+ukmsK7UXD5SfcWPLtjuvIxFLKvM0Ge 1pXMX6dJ80KTvyAe84xM3RtD6c80tTUg7bFgvXgY00dFIGl8drtNSXygnN8xTLMDZl/Q V32tEhwx/AFuu70sG814sDvzk3TrqkM1MiiTYdHOnapgNS4UHPIWE1nRjgcHm8rwdb3b Er/RosnV3jxuaXOu9sqXOvrREK9l5CaSLdcKAVr8oBnxRQ4oW8u9HXXAddMYBEmY2VPb gdG+2g0orKxqX9KCmhMH2iT6PllNsFBVfczaVzIOpKBw92wgtiisNfanvaaIELeIwYtx 3f4Q== X-Gm-Message-State: AC+VfDwozz3FgLE/3/Ra9iMu2i3DnHgzgPTwHakKb8nRQddw70fQLt5F NQWH6ZeEXJHXJKM4JAP5g4mi0qVY90TtOgFJFFCCXSGgGtZtTDGoWfLS7g== X-Google-Smtp-Source: ACHHUZ5TeAxu8w8KeB/yd/MQzZR2TGKLtBhS6NpHEBvMR1/ObtGYIMf0X7Ndwm11JFIQ284OYshMGZ8QzvxwUuTFA+U= X-Received: by 2002:a81:5795:0:b0:55f:5d6a:97fb with SMTP id l143-20020a815795000000b0055f5d6a97fbmr12954448ywb.9.1683906246001; Fri, 12 May 2023 08:44:06 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 From: Doug Rabson Date: Fri, 12 May 2023 16:43:55 +0100 Message-ID: Subject: Raspberry Pi POE+ hat overlay To: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a0dbd105fb80f981" X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[rabson-org.20221208.gappssmtp.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b32:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[rabson-org.20221208.gappssmtp.com:+]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[dfr]; DMARC_NA(0.00)[rabson.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QHtNR0w13z4D6J X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --000000000000a0dbd105fb80f981 Content-Type: text/plain; charset="UTF-8" I have a pi4 with the official POE+ hat which I want to run FreeBSD on. One thing I noticed is that the fan doesn't run in FreeBSD so I decided to try and write a little driver for it. First step seems to be to load the corresponding devicetree overlay by adding something like this to /boot/msdos/config.txt: dtoverlay=rpi-poe-plus dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 Unfortunately this is where I'm stuck - the overlay is not present in the final DTB given to the kernel so there isn't anything to hook a driver to. Are dtoverlays supposed to work on FreeBSD? --000000000000a0dbd105fb80f981 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have a pi4 with the official POE+ hat which I want to ru= n FreeBSD on. One thing I noticed is that the fan doesn't run in FreeBS= D so I decided to try and write a little driver for it. First step seems to= be to load the corresponding devicetree overlay by adding something like t= his to /boot/msdos/config.txt:

dtoverlay=3Drpi-poe-plus<= br>dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000
d= tparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000
dtpar= am=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000
dtparam= =3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000
=
Unfortunately this is where I'm stuck - the overlay is n= ot present in the final DTB given to the kernel so there isn't anything= to hook a driver to. Are dtoverlays=C2=A0supposed to work on FreeBSD?

--000000000000a0dbd105fb80f981-- From nobody Fri May 12 16:09:49 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHtyK3DM5z4BBJd for ; Fri, 12 May 2023 16:10:01 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHtyK0B3rz4GkT for ; Fri, 12 May 2023 16:10:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1683907792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DCCso44OqvcJGsmIzK4u8RHMO6vele/u1MAGIORELpw=; b=oQPzo5JEps904iWVgGKb1FtbTu8xgTrL2/dvfejryGB2eGwwx+QAWJ03+nvOZRc2K2m3wf M4qp/0026FRnOkuUMDEu2mK4U3lqyihJMyt8wwMC5+qZQuy2JdudCa/ZHB+OOLoSpLi0NX n45JBmLjb6cmMk6Rg9ddB4YH+xh6QiI= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id c96bf55e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 12 May 2023 16:09:52 +0000 (UTC) Date: Fri, 12 May 2023 18:09:49 +0200 From: Emmanuel Vadot To: Doug Rabson Cc: freebsd-arm@freebsd.org Subject: Re: Raspberry Pi POE+ hat overlay Message-Id: <20230512180949.5ea314b166e0b9975eeb0535@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QHtyK0B3rz4GkT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, 12 May 2023 16:43:55 +0100 Doug Rabson wrote: > I have a pi4 with the official POE+ hat which I want to run FreeBSD on. One > thing I noticed is that the fan doesn't run in FreeBSD so I decided to try > and write a little driver for it. First step seems to be to load the > corresponding devicetree overlay by adding something like this to > /boot/msdos/config.txt: > > dtoverlay=rpi-poe-plus > dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 > dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 > dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 > dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 > > Unfortunately this is where I'm stuck - the overlay is not present in the > final DTB given to the kernel so there isn't anything to hook a driver to. > Are dtoverlays supposed to work on FreeBSD? DT Overlays works fine, the process of them on RPI is: - Firmware loads the DTB - Parse the config.txt and load/apply the overlays - The DTB is passed to u-boot which in turn pass it to loader/kernel Stupid question but did you copy the rpi-poe-plus.dtbo on the fat partition ? -- Emmanuel Vadot From nobody Fri May 12 16:18:53 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHv8p0pFdz4BBwc for ; Fri, 12 May 2023 16:19:06 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from mail-yb1-xb2d.google.com (mail-yb1-xb2d.google.com [IPv6:2607:f8b0:4864:20::b2d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHv8n0QZTz4JWD for ; Fri, 12 May 2023 16:19:05 +0000 (UTC) (envelope-from dfr@rabson.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2d.google.com with SMTP id 3f1490d57ef6-b99489836aaso8734318276.0 for ; Fri, 12 May 2023 09:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabson-org.20221208.gappssmtp.com; s=20221208; t=1683908344; x=1686500344; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=v/4aNwvwUjHJSkgo6K7QY34ZsBQujNqEapt3bR0tVgE=; b=w3JLWd+BNhpdhjKU+kaIlBeaPWgSz3q4Bj7ejVNAlSwJTNHp5U7awlm0DA7kaZNt74 IKwyWgqg34/V8sHJs9zvrWJV4aKE7fLj12GbGrYJfLLqjwZuJuke2Ox8a7KZLhY8n6JV 0GkRZY3cbwpOLO1g3tAkEH6eKefT/qyf0ZxMlS+pElX5QcuYsA3fgoRAbpkJ4yaIIRAG HVzIqjOuIU31SSKtf247vt8LOeBYhcW0Ba88K/W+UOJqKBRe071yqo+10bouY+evzQ/c +s3/gyx/67wjH5FUx9aBVKnunVbboS0boXWFr09jgHoQkqpCUbQJVL8r8YYZq/yC4qnT 6KZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683908344; x=1686500344; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v/4aNwvwUjHJSkgo6K7QY34ZsBQujNqEapt3bR0tVgE=; b=ikageZL/D/VrbBUji0WotPRLMI+p0blNw4pW88I+IBg8sUvVOdLzH2+7Mwh5pRzDPA UBzPq4fzTCW1FDGokZv/OtvbYTPJ01PCj/Fa2+nvXbugH6+8Q1BnDAGU3QQmd/pv4ZY7 ma4uUu5NLkv0iHSN3mJHbqFVw5ulLTcodZU4sxyt6/oESUGyCfsU8fMUPqn14yv+5Szv W+XbLQQ4hGzrzYV+YeXR+A5Q7df9MoqT8UrWe/vBvZGGb665Z7jiZNzQ7sHkNR/bOpKG t4Eh00JQxL6RO0wBt26stumL1LDrlTT0IVanDLnxgrx/e7tqSP/SiCKPLJX7Nvf8zdIb YQDg== X-Gm-Message-State: AC+VfDysm5OmHnMYCh9+pq69ljHlW7QPLggbirx5D20EJLfxPcFi0Zpg BSsyrQtt1ETM1CSsYrRZ53FLj9deN072OwBKAX6GzRfrkJfDBkGWVkwl6w== X-Google-Smtp-Source: ACHHUZ5VOkD4amR2QPtSl/LHcQlRcI1hyQJHF11DVQ46KXLNffPxkuRvSEgHKpkxPEzoi2hnQjn6Fb41eZb4nNTFVZU= X-Received: by 2002:a25:7394:0:b0:ba7:1a2d:7749 with SMTP id o142-20020a257394000000b00ba71a2d7749mr1530306ybc.51.1683908344164; Fri, 12 May 2023 09:19:04 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <20230512180949.5ea314b166e0b9975eeb0535@bidouilliste.com> In-Reply-To: <20230512180949.5ea314b166e0b9975eeb0535@bidouilliste.com> From: Doug Rabson Date: Fri, 12 May 2023 17:18:53 +0100 Message-ID: Subject: Re: Raspberry Pi POE+ hat overlay To: Emmanuel Vadot Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b04e2705fb8176c2" X-Rspamd-Queue-Id: 4QHv8n0QZTz4JWD X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000b04e2705fb8176c2 Content-Type: text/plain; charset="UTF-8" Yes - I copied it from a random Linux distro I had lying around: $ ls /boot/msdos/overlays disable-bt.dtbo mmc.dtbo pwm.dtbo rpi-poe-plus.dtbo I'm wondering if it's something to so with the compatible settings on the overlay. Disassembling it with dtc looks like this: /dts-v1/; / { compatible = "brcm,bcm2835"; fragment@0 { target-path = "/"; __overlay__ { pwm-fan { compatible = "pwm-fan"; cooling-levels = <0x0 0x20 0x40 0x80 0xff>; #cooling-cells = <0x2>; pwms = <0x1 0x0 0x13880>; phandle = <0x3>; }; }; }; ... On Fri, 12 May 2023 at 17:09, Emmanuel Vadot wrote: > On Fri, 12 May 2023 16:43:55 +0100 > Doug Rabson wrote: > > > I have a pi4 with the official POE+ hat which I want to run FreeBSD on. > One > > thing I noticed is that the fan doesn't run in FreeBSD so I decided to > try > > and write a little driver for it. First step seems to be to load the > > corresponding devicetree overlay by adding something like this to > > /boot/msdos/config.txt: > > > > dtoverlay=rpi-poe-plus > > dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 > > dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 > > dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 > > dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 > > > > Unfortunately this is where I'm stuck - the overlay is not present in the > > final DTB given to the kernel so there isn't anything to hook a driver > to. > > Are dtoverlays supposed to work on FreeBSD? > > DT Overlays works fine, the process of them on RPI is: > > - Firmware loads the DTB > - Parse the config.txt and load/apply the overlays > - The DTB is passed to u-boot which in turn pass it to loader/kernel > > Stupid question but did you copy the rpi-poe-plus.dtbo on the fat > partition ? > > -- > Emmanuel Vadot > --000000000000b04e2705fb8176c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes - I copied it from a random Linux distro I had lying a= round:

$ ls /boot/msdos/overlays
disable-bt.dtbo =C2= =A0 mmc.dtbo =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pwm.dtbo =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0rpi-poe-plus.dtbo

I'm won= dering if it's something to so with the compatible settings on the over= lay. Disassembling it with dtc looks like this:

/d= ts-v1/;

/ =C2=A0{

=C2=A0 =C2=A0 =C2=A0 =C2=A0 compatible =3D = "brcm,bcm2835";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 fragment@0 {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 target-path =3D &= quot;/";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 __= overlay__ {

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 pwm-fan {

=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 =C2=A0 =C2= =A0 =C2=A0 compatible =3D "pwm-fan";
=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 =C2=A0 = =C2=A0 =C2=A0 cooling-levels =3D <0x0 0x20 0x40 0x80 0xff>;
=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 =C2=A0 =C2=A0 =C2=A0 #cooling-cells =3D <0x2>;
=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 =C2=A0 =C2=A0 =C2=A0 pwms =3D <0x1 0x0 0x13880>;
=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 =C2=A0 =C2=A0 =C2=A0 phandle =3D <0x3>;
=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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 };
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 };
...

On Fri, 12 May 2023 at 17:09, E= mmanuel Vadot <manu@bidouillist= e.com> wrote:
On Fri, 12 May 2023 16:43:55= +0100
Doug Rabson <dfr@rab= son.org> wrote:

> I have a pi4 with the official POE+ hat which I want to run FreeBSD on= . One
> thing I noticed is that the fan doesn't run in FreeBSD so I decide= d to try
> and write a little driver for it. First step seems to be to load the > corresponding devicetree overlay by adding something like this to
> /boot/msdos/config.txt:
>
> dtoverlay=3Drpi-poe-plus
> dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 > dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 > dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 > dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 >
> Unfortunately this is where I'm stuck - the overlay is not present= in the
> final DTB given to the kernel so there isn't anything to hook a dr= iver to.
> Are dtoverlays supposed to work on FreeBSD?

DT Overlays works fine, the process of them on RPI is:

=C2=A0- Firmware loads the DTB
=C2=A0- Parse the config.txt and load/apply the overlays
=C2=A0- The DTB is passed to u-boot which in turn pass it to loader/kernel<= br>
=C2=A0Stupid question but did you copy the rpi-poe-plus.dtbo on the fat
partition ?

--
Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>
--000000000000b04e2705fb8176c2-- From nobody Fri May 12 16:23:10 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHvFY6nr9z4BC9b for ; Fri, 12 May 2023 16:23:13 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHvFY4FN5z4KN8 for ; Fri, 12 May 2023 16:23:13 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1683908592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0KM1v6BH0lyakLqFNi+SpsRtzVOAKpxYiPu9KeonnMc=; b=eQ7GDUGzudMWq3iT2/fc5K3iFlblAczc4L5iQuiDAQN06ARHK/0bsBZ0z61VL08BcBerIM rvW6jUC+gVf9S4gUn136Vk6ChE+XdjuLmxCTrJKIasURtuIm7jfHjjQUzMZtEwnEm56ltZ Af7RNTLBxdRF1FP9ID1WR90fdGmpy4s= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id ee59c2ed (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 12 May 2023 16:23:11 +0000 (UTC) Date: Fri, 12 May 2023 18:23:10 +0200 From: Emmanuel Vadot To: Doug Rabson Cc: freebsd-arm@freebsd.org Subject: Re: Raspberry Pi POE+ hat overlay Message-Id: <20230512182310.56fb513ac2271ef78c5ac1d3@bidouilliste.com> In-Reply-To: References: <20230512180949.5ea314b166e0b9975eeb0535@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QHvFY4FN5z4KN8 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, 12 May 2023 17:18:53 +0100 Doug Rabson wrote: > Yes - I copied it from a random Linux distro I had lying around: > > $ ls /boot/msdos/overlays > disable-bt.dtbo mmc.dtbo pwm.dtbo rpi-poe-plus.dtbo > > I'm wondering if it's something to so with the compatible settings on the > overlay. Disassembling it with dtc looks like this: > > /dts-v1/; > > / { > > compatible = "brcm,bcm2835"; No idea how the rpi firmware checks things but this seems to be for the first RPI and if the firmware is doing the right thing this will not be applied. You can check in u-boot if the DTB is correctly patched btw using the 'fdt' command. > fragment@0 { > > target-path = "/"; > __overlay__ { > > pwm-fan { > > compatible = "pwm-fan"; > cooling-levels = <0x0 0x20 0x40 0x80 0xff>; > #cooling-cells = <0x2>; > pwms = <0x1 0x0 0x13880>; > phandle = <0x3>; > }; > }; > }; > ... > > On Fri, 12 May 2023 at 17:09, Emmanuel Vadot wrote: > > > On Fri, 12 May 2023 16:43:55 +0100 > > Doug Rabson wrote: > > > > > I have a pi4 with the official POE+ hat which I want to run FreeBSD on. > > One > > > thing I noticed is that the fan doesn't run in FreeBSD so I decided to > > try > > > and write a little driver for it. First step seems to be to load the > > > corresponding devicetree overlay by adding something like this to > > > /boot/msdos/config.txt: > > > > > > dtoverlay=rpi-poe-plus > > > dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 > > > dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 > > > dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 > > > dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 > > > > > > Unfortunately this is where I'm stuck - the overlay is not present in the > > > final DTB given to the kernel so there isn't anything to hook a driver > > to. > > > Are dtoverlays supposed to work on FreeBSD? > > > > DT Overlays works fine, the process of them on RPI is: > > > > - Firmware loads the DTB > > - Parse the config.txt and load/apply the overlays > > - The DTB is passed to u-boot which in turn pass it to loader/kernel > > > > Stupid question but did you copy the rpi-poe-plus.dtbo on the fat > > partition ? > > > > -- > > Emmanuel Vadot > > -- Emmanuel Vadot From nobody Fri May 12 16:27:41 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHvM31mG3z4BCF3 for ; Fri, 12 May 2023 16:27:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-55.consmr.mail.gq1.yahoo.com (sonic308-55.consmr.mail.gq1.yahoo.com [98.137.68.31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHvM25pc7z4Km9 for ; Fri, 12 May 2023 16:27:58 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683908876; bh=gyl2h4tb0YP3o7zWJdv7BDBN1e/cPDHU/yZEah1myyc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=Kjgl3qxQpRBzvzF8o1s9HvyP/0Fxhv4FVabpkjQsWX89C8b56LJcc/PBUZLorOq5M6Lj7urhVK25xlYMgm42eFihjQjEdpv6tWK4ttjJSFRfWG9dDZ1jllp+zShYh6FXKTPii75gg7/DXXv7C4DDbG4Qewj7iRlwOmndKQEYjqg8TcgrmlZPo4F+UclXer6ZHSgIjO3PZHKqLl5ZWzX3LL8/s4ZvpaM0XdLnashcBy+8vV7zGCKfs1KDmsILHjhoZpwmfAK64yZQyVuN+456aDL9oFKJ7FvwndgaSsBI7wTiwZnIeX09T3cg8BDRANqryXtWtEoArlMCKJCuuNwSuA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683908876; bh=rUU9YX8n3L8WcdtYI4zkRKW4GamXdrmB36kCrkL++be=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=g8gt6RwE6PLWdb6/HTokMJ/J2ZH1caPLB5s2BzcieAJ3eHj4o7ytADbdTls7cxUkNQyTtjGYuBtWkKqZJeXwff8uZPq1HYtGgx8RukjSkaZQBU+DK26L83fcIzDdjt1Ix2QajkMVTwF2F/tfu8hx2ooqrFDn/Vx5UsEFa+gAfCw6dSZ0OHnXJ8tMfS+NdDRLRpSnQhxwMhp4BthkTGouf1q8J+D/uNAE+vGavX+jH3yr6NkYiBmVMRI0k+7QsFc3GX6vMXIjaatGzq26BbWx+eEmQaMFn2iSUBuqUx4ElfWIws1LYcUx2sjBMotUW+iuz7QW8Sej6t3zb6rF9Q1S4w== X-YMail-OSG: OfZknQgVM1n_jEnj4v7MqhSrzcIbcOAN9ZtLCbyfPXx02BBPjRv52yXARsucPSl t20vXWAD9M9gzOnlts817mV2yA4IyMKs8br.kW7e3b6U14etto9232S49VxhNs_jqYzOBXyR1IgW uOtLDambpa_SPNZyFJPaMdpOhpqy.qvHXZ4LxMHiwqJXjnlpC.ndfJ73MFjHykCzxs69LykkCDX5 wM1SLHIxUiQj2E7CYQcpHyg7h9wggc7zMBfBBRMjexwt0HnruLRxCbdYcEawvAoZObRnBI36JtV_ alnAFH5hNiLpxZiF9LEqr9VyWWfiybc6GWnBrU_Q02bt4U66P.EkIrTot9cyANjQ.IEC2QoRTz3t Dn.1EJaLwzXX_2VV.RumueceepTlOF_i8pjecWKB8ed_QIDpnXdIO4BJFOFbFNcN_gifykGxep.r 1ZlX2phZomeMcUD5Z0mllS7rL6N2c9ooiXKlrujz0q.ukWQ_b2URZdAxq5KlqW6fJ0kU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iRuDTQo0KmJ V3sMHclrrvQTU_pplE9pGwPBSZDNZkFK.lr68ii3yz70puhtnaSx9xSvJtnmdui.hT2LCZbiqVGK B1.0M.jTDyBrBnHKhlYMbFtMmVFcA58Ay2QXgsLY.Z6gH9Da58jyf9.nu_GkmYiNNwPPZqY6cY9k or0QO58DBW5kIQVrm4A1e.s0SFPdBMpwis.bxDcFVqlCFUVXNpOsVq4R2uLDqMdeXYPEVMqIJqlP zg1_lUEPQ36HGPZOxblscYU4re_Oe5lSyHFG3bjysn4Skf96oEnB9xSusxFfu9V27ZhTRGm5zPmS MKnLtg2pRmB4u7bJAujRXVm3AAFNrOQ8Mqh673a6.etYf4iAfi5b6ZWvn71T6OCCTfMmYqYM6zry 3SiC25Q0ay05BktImjLvuHQmmJXftkB8OrnJCx7OYUj9mvbUbANXCapeVRB_CSsqaTKDQuSai9_v FGy3KVVxiaSX8.CQzkIrHRh2VaQDUDmeyG0qeS7EP4pBP_ZbLMC_se1jbTfkCvpcYyLCFC6rH2Rs zb3dmJycZANqhqEcC1XQy.pKAb52P2MKtgCrTnD9Le1QicQ_l82QXarJd2pJK3XnE34UxTlSMhSY K_K2dytmgJyjQPmcY.l5du5lPiHkeBGsm.0zXvdr.ub7yiSyCTgK0a0l9klwSiHVcFTahjfNWcwX MxPfCSlWivoeD.ndyfGvwGU.dp.oRnV9PTK0vP9baiT_.F7grOwMdlOeAzHKRpRWCKPfVzDeOtbk - X-Sonic-MF: X-Sonic-ID: 0a0510a0-0e5f-48e2-9a4c-7be512e595bd Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Fri, 12 May 2023 16:27:56 +0000 Received: by hermes--production-gq1-6db989bfb-js4gb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d2ab93eb8dd315530ac945311f466db6; Fri, 12 May 2023 16:27:51 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: Raspberry Pi POE+ hat overlay From: Mark Millard In-Reply-To: Date: Fri, 12 May 2023 09:27:41 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Doug Rabson X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Rspamd-Queue-Id: 4QHvM25pc7z4Km9 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On May 12, 2023, at 08:43, Doug Rabson wrote: > I have a pi4 with the official POE+ hat which I want to run FreeBSD = on. One thing I noticed is that the fan doesn't run in FreeBSD so I = decided to try and write a little driver for it. First step seems to be = to load the corresponding devicetree overlay by adding something like = this to /boot/msdos/config.txt: >=20 > dtoverlay=3Drpi-poe-plus > dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 > dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 > dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 > dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 >=20 > Unfortunately this is where I'm stuck - the overlay is not present in = the final DTB given to the kernel so there isn't anything to hook a = driver to. Are dtoverlays supposed to work on FreeBSD? The RPi* firwmare version that FreeBSD has in ports and uses in making snapshots and other images does not have that overlay: # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo . You also do not mention what version of FreeBSD you are using on the RPi4B. The output of the command: # uname -apKU would indicate the branch and version of the kernel in use and some more. This can be relevant to what sort of experimental (unsupported) RPi* firmware configurations can be used. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Fri May 12 16:38:30 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHvbQ0BbPz4BCls for ; Fri, 12 May 2023 16:38:42 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from mail-yb1-xb33.google.com (mail-yb1-xb33.google.com [IPv6:2607:f8b0:4864:20::b33]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHvbP5P9Zz4Llt for ; Fri, 12 May 2023 16:38:41 +0000 (UTC) (envelope-from dfr@rabson.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-ba6fffc5524so1707441276.3 for ; Fri, 12 May 2023 09:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabson-org.20221208.gappssmtp.com; s=20221208; t=1683909521; x=1686501521; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2z/SuMw/mEs1ie5Hr/ZwVfgP1INfnosAS5XHLLZDT3w=; b=iyXhHgUYVd3W22TBFsjs3OMo75/IxD8kxtzwbTClZJsXPA/BdUOO5uaoODp8JrODLy A4jkKicAk+FdmClNhwCT9fP5kJEgX2QG2Rkd8Q4HPa9FqjPMYfFto1tiaiNI/7stiXjc U/i5zYfctiARvIZK7KLHd5ZqbSmzzRcMSSVl7ZkJs9HgEzZ4WSajuaCgwzhj6JyVaQR4 UN8uBam32Ko996/NIzLJSiRN3pmQ+gxoQtS+JeADjjs54gcn5o4QjjyfGWUTRHEpFXbs QDuiDflFsWc0FN58OYNDZEO9+QjJVPIRipTKdACFG59IJ52JCgmoximCA50R8Z+ieZKv Gt5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683909521; x=1686501521; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2z/SuMw/mEs1ie5Hr/ZwVfgP1INfnosAS5XHLLZDT3w=; b=hYOwQf7QcHy//kKK087TZnCeHyvZRk9kKzmDupVoAJ5tCUM4+NxQgPNTfBR0k6shyf 0QDWjyy9+pv4dYImmL8yQKaVc5ve/Xu1ipZSZ7RwbRTpJaFsAi+FHGFFF/f1oGE4jiZv DdRvFZXK6TTeaUm7HG+ETHiOt9/I/1PsQpYwRsIooLgNZBDPDiILTAwZgXzXhPGT6qxy QRBHfXS6VmkA5mHpaItRGCwsKv5ctthxsUKKVXDG3CL/Bd3iEgUkG/ycCwbGYxE8Pcz/ G4MbuFuZYyMRAuHHLaeqPtVHZZrYskA3DGmMDd87X9yv7fALu2HAo7bsM4x94pUpIcxL I5RA== X-Gm-Message-State: AC+VfDxpWJ3dSKpptByOUz5w6JZqltuYAE4Q4gCtp8zqSCCnbeT8mRCq EWubqFFtoeYlcTU5PSTm0WAdDmJ2sziAOz7kLZWdlLGWRTWp1U6bpds= X-Google-Smtp-Source: ACHHUZ59r3ntjvu9hMKgwmQ09DbFzGLZB4ZJIvP5KsvmTdITjDKwPQb6bBFVxAl08P1pmCWLxYNJYY/gbop3q0l5EEc= X-Received: by 2002:a25:54b:0:b0:ba7:4693:b07 with SMTP id 72-20020a25054b000000b00ba746930b07mr413090ybf.62.1683909520885; Fri, 12 May 2023 09:38:40 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Doug Rabson Date: Fri, 12 May 2023 17:38:30 +0100 Message-ID: Subject: Re: Raspberry Pi POE+ hat overlay To: Mark Millard Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000d3a67205fb81bc04" X-Rspamd-Queue-Id: 4QHvbP5P9Zz4Llt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000d3a67205fb81bc04 Content-Type: text/plain; charset="UTF-8" On Fri, 12 May 2023 at 17:27, Mark Millard wrote: > On May 12, 2023, at 08:43, Doug Rabson wrote: > > > I have a pi4 with the official POE+ hat which I want to run FreeBSD on. > One thing I noticed is that the fan doesn't run in FreeBSD so I decided to > try and write a little driver for it. First step seems to be to load the > corresponding devicetree overlay by adding something like this to > /boot/msdos/config.txt: > > > > dtoverlay=rpi-poe-plus > > dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 > > dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 > > dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 > > dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 > > > > Unfortunately this is where I'm stuck - the overlay is not present in > the final DTB given to the kernel so there isn't anything to hook a driver > to. Are dtoverlays supposed to work on FreeBSD? > > The RPi* firwmare version that FreeBSD has in ports and uses > in making snapshots and other images does not have that overlay: > > # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* > -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo > -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo > -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo > -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo > -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo > -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo > -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo > -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo > -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo > -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo > > You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo . > I copied the file from a rasbian install I had for another project. Perhaps I should find the corresponding source for it and build it with the device tree source from FreeBSD. > > You also do not mention what version of FreeBSD you are using > on the RPi4B. The output of the command: > I'm running 13.2-RELEASE-p0 --000000000000d3a67205fb81bc04 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, 12 May 2023 at 17:27, Mark Mi= llard <marklmi@yahoo.com> wr= ote:
On May 12, 2023, at 08:43, Doug Rabson <<= a href=3D"mailto:dfr@rabson.org" target=3D"_blank">dfr@rabson.org> w= rote:

> I have a pi4 with the official POE+ hat which I want to run FreeBSD on= . One thing I noticed is that the fan doesn't run in FreeBSD so I decid= ed to try and write a little driver for it. First step seems to be to load = the corresponding devicetree overlay by adding something like this to /boot= /msdos/config.txt:
>
> dtoverlay=3Drpi-poe-plus
> dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 > dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 > dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 > dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 >
> Unfortunately this is where I'm stuck - the overlay is not present= in the final DTB given to the kernel so there isn't anything to hook a= driver to. Are dtoverlays supposed to work on FreeBSD?

The RPi* firwmare version that FreeBSD has in ports and uses
in making snapshots and other images does not have that overlay:

# ls -Tld /usr/local/share/rpi-firmware/overlays/rpi*
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0489 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 4081 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0643 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2574 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpi-display.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0842 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2937 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpi-poe.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0771 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0893 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0567 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 1226 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo

You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo .
<= /blockquote>

I copied the file from a rasbian=C2=A0insta= ll I had for another project. Perhaps I should find the corresponding sourc= e for it and build it with the device tree source from FreeBSD.
= =C2=A0

You also do not mention what version of FreeBSD you are using
on the RPi4B. The output of the command:

I'm running 13.2-RELEASE-p0
=C2=A0
--000000000000d3a67205fb81bc04-- From nobody Fri May 12 16:49:22 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHvqz52zLz4BDKc for ; Fri, 12 May 2023 16:49:35 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHvqy2qgRz4QM4 for ; Fri, 12 May 2023 16:49:34 +0000 (UTC) (envelope-from dfr@rabson.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=rabson-org.20221208.gappssmtp.com header.s=20221208 header.b=c4RQNAGn; spf=pass (mx1.freebsd.org: domain of dfr@rabson.org designates 2607:f8b0:4864:20::b30 as permitted sender) smtp.mailfrom=dfr@rabson.org; dmarc=none Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-b9a6f17f2b6so47677040276.1 for ; Fri, 12 May 2023 09:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabson-org.20221208.gappssmtp.com; s=20221208; t=1683910173; x=1686502173; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zYehUQbIvzZO+9zG6X7u0M7IuGigjBLXG2zK27q+0TM=; b=c4RQNAGn+jK9tP/92yFBV6EmT5D/vmzcYL9FXg21RfhoL5LkdGS51ShUT/S14gOpgN hEYQopEbv5Rebn12Y7vhGNpmvbj4XWc4smpjjsx9ChfbqvCIDkfz6/peiWVFcN1vx4gL pZQNkKeC+2RF0Tj6iIXrKbrXfOzu89X767xu7ZMy4GNlodU8ii7ihKdyO/joYCn5mX2v IOjMxS55VdmolKkjMW2mVrg8Fh4XQSixb8S5s78pzFmN3mRRixHuHMldRCoavaYVjURS zX/jdFCqj0brmNj7XPPgo/d75hy8Ku/3cwj6iBGfFQgXHzttOLlw7cCo+WdUz/tcnHbo rIOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683910173; x=1686502173; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zYehUQbIvzZO+9zG6X7u0M7IuGigjBLXG2zK27q+0TM=; b=DAKqsfDBlXmh2sHIPQlgeaj/pH9kyugWTNpSHCq/faZPucWrYvpW/nvn4rF7g6OEsP UNSBGLeGtWgmxzc9+hHhumxaV/juSxXQm7yyfaPZcbfpqXhaHEAwntgVQmerkadGxGbv YPTSEFOQ7BEyOzUf+TNDqjZhNU1ex+kyAm+yNgcjOWccZ7oN7Qdfe/9K+C1rSN45q6EV FY0MK1wWvlZKKwIw6OOxnp+nVfTSWrMpat9rVy2/548l3AD6eumJtI9fKMCaX/jJeiB0 m+3MpHss+m5iNE2H5H2r9PVTnmM/Aqnu555B4euPIf601UdJNuMfgQE/tS20+RGnNT+p 2LGg== X-Gm-Message-State: AC+VfDwZRUUx/YMk8oQPu8D/huTUBMtRKPhDWvFPnDQrngpBIykQVAC9 VztBw5bpNxGz+zdKXg5Iscg9/3Lgkh213gGZSwe9IA== X-Google-Smtp-Source: ACHHUZ680u3Np0pHQNB0gwmLvkWHvPvoh5neTNrCiM/9KT0Ktbn4kUocLbaLyPmSFZU6iSCeyAmkS/7oxgJgP7ZcS64= X-Received: by 2002:a25:4884:0:b0:b9d:88a7:dbf with SMTP id v126-20020a254884000000b00b9d88a70dbfmr25276651yba.4.1683910173193; Fri, 12 May 2023 09:49:33 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Doug Rabson Date: Fri, 12 May 2023 17:49:22 +0100 Message-ID: Subject: Re: Raspberry Pi POE+ hat overlay To: Mark Millard Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000b50f7e05fb81e395" X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[rabson-org.20221208.gappssmtp.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; FREEMAIL_TO(0.00)[yahoo.com]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b30:from]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[dfr]; DKIM_TRACE(0.00)[rabson-org.20221208.gappssmtp.com:+]; TO_DN_SOME(0.00)[]; DMARC_NA(0.00)[rabson.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QHvqy2qgRz4QM4 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --000000000000b50f7e05fb81e395 Content-Type: text/plain; charset="UTF-8" On Fri, 12 May 2023 at 17:38, Doug Rabson wrote: > > > On Fri, 12 May 2023 at 17:27, Mark Millard wrote: > >> On May 12, 2023, at 08:43, Doug Rabson wrote: >> >> > I have a pi4 with the official POE+ hat which I want to run FreeBSD on. >> One thing I noticed is that the fan doesn't run in FreeBSD so I decided to >> try and write a little driver for it. First step seems to be to load the >> corresponding devicetree overlay by adding something like this to >> /boot/msdos/config.txt: >> > >> > dtoverlay=rpi-poe-plus >> > dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 >> > dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 >> > dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 >> > dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 >> > >> > Unfortunately this is where I'm stuck - the overlay is not present in >> the final DTB given to the kernel so there isn't anything to hook a driver >> to. Are dtoverlays supposed to work on FreeBSD? >> >> The RPi* firwmare version that FreeBSD has in ports and uses >> in making snapshots and other images does not have that overlay: >> >> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* >> -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo >> -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo >> -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo >> -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo >> -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo >> -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo >> -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo >> -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo >> -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo >> -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 >> /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo >> >> You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo . >> > > I copied the file from a rasbian install I had for another project. > Perhaps I should find the corresponding source for it and build it with the > device tree source from FreeBSD. > > >> >> You also do not mention what version of FreeBSD you are using >> on the RPi4B. The output of the command: >> > > I'm running 13.2-RELEASE-p0 > Ok, if I add the rpi-poe.dtbo file and change to using 'dtoverlay=rpi-poe', then I do see the overlay in the booted system - thanks for all the pointers. Looks like I need to figure out how to add rpi-poe-plus to the rpi-firmware port first. > --000000000000b50f7e05fb81e395 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, 12 May 2023 at 17:38, Doug Ra= bson <dfr@rabson.org> wrote:


On Fri, 12 Ma= y 2023 at 17:27, Mark Millard <marklmi@yahoo.com> wrote:
= On May 12, 2023, at 08:43, Doug Rabson <dfr@rabson.org> wrote:

> I have a pi4 with the official POE+ hat which I want to run FreeBSD on= . One thing I noticed is that the fan doesn't run in FreeBSD so I decid= ed to try and write a little driver for it. First step seems to be to load = the corresponding devicetree overlay by adding something like this to /boot= /msdos/config.txt:
>
> dtoverlay=3Drpi-poe-plus
> dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 > dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 > dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 > dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 >
> Unfortunately this is where I'm stuck - the overlay is not present= in the final DTB given to the kernel so there isn't anything to hook a= driver to. Are dtoverlays supposed to work on FreeBSD?

The RPi* firwmare version that FreeBSD has in ports and uses
in making snapshots and other images does not have that overlay:

# ls -Tld /usr/local/share/rpi-firmware/overlays/rpi*
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0489 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 4081 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0643 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2574 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpi-display.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0842 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2937 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpi-poe.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0771 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0893 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0567 Mar=C2=A0 3 05:29:57 20= 21 /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo
-rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 1226 Mar=C2=A0 3 05:29:57 2021 /u= sr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo

You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo .
<= /blockquote>

I copied the file from a rasbian=C2=A0insta= ll I had for another project. Perhaps I should find the corresponding sourc= e for it and build it with the device tree source from FreeBSD.
= =C2=A0

You also do not mention what version of FreeBSD you are using
on the RPi4B. The output of the command:

I'm running 13.2-RELEASE-p0

Ok, if I add the rpi-poe.dtbo file and change to using 'dtover= lay=3Drpi-poe', then I do see the overlay in the booted system - thanks= for all the pointers. Looks like I need to figure out how to add rpi-poe-p= lus to the rpi-firmware port first.
=C2=A0
--000000000000b50f7e05fb81e395-- From nobody Fri May 12 17:11:06 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHwK85ksZz4BFny for ; Fri, 12 May 2023 17:11:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-54.consmr.mail.gq1.yahoo.com (sonic315-54.consmr.mail.gq1.yahoo.com [98.137.65.30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHwK81bfdz4V7N for ; Fri, 12 May 2023 17:11:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683911481; bh=hvCn/1QEExlFXA8J4inWgFIe1hQ/hy96yKlRWLIvtaw=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=MJ8bHRsh5STxAJH3smLs3yhVN953NFB6fpux8z6+bhAZDapwfsKBA1t9Hf/nfZTtVyajVVZnRP6hUtxeK61I0W+Bhri6cus8WJ57HwG+od96Uf0b1qoBC8doFxVrFbgbpGMgfr9LIzoHtCzn9M0ngzddebAI3QUyd1/R2JAiBbi01oPQInpyvKTjjr4p3RTmaLFrZFZWbnxLOMtyrDn+7tFO0xVSENQNeX6kZPeCIS6vLWxTc1mjp2ZYIvtTcVhaXeOUNjKy4eQ21gKhdMuEQNnuE2GtVEf2SNGBR+rwChkbieen1uVs5ZEvuqha/4jybeYrUSMRLXjW84yfkLvk6w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683911481; bh=15eByCUkMDC9i000+OoGvSGxiaF2r7mqQ4oTjxo/K72=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=ktq/KhTVF5a24eBE14nebDjr84iRqFADgBHeuXzaHbyDOsoMTmDzCA6jpsYRT6w2ubPGAuT3qjWfQUZvyGRPoZshrPKPeDQmiSVG1SvOkoKLRqVojLxGycJtu6/+z7GQhHsUDZgDiLmC1uQV4k0sQa1v3Q3XaKER2J1uhygbmenT8knZqMU8XDebTiknYhLS8qVEy+m1usg+qU0ScaYDkQnzEWxp9iFBuYhNm8plVkWOhLTigw4QhWV50rB/7fzERmYeXWCfx2k/8Ep28SwXQDudtr5TxN3Y9Y23B/LpSnpR2TIqtRIQo6Ob5fFuupLFTiQS6cOiVAi6GX//JPZCSA== X-YMail-OSG: 05xM1tEVM1lJU2PsvDDK6oy_iXPYVnSuSIDsL6RW7ZtMecGaYm8c5TL1gpm_tpl IltvxSawu05TLex7hI27C5ELqtlkUBNZOy9b9huGZNUZB1yhOSOvLxzOdsqUyduwpUq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2jwnLNcj._Iujm.cl_jszL8GWrP.cKs51Urv.pKnqHYUSgu1kDYyloVvr j2LEc X-Sonic-MF: X-Sonic-ID: 15220643-c8d8-49b7-a5ee-684921b8d907 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Fri, 12 May 2023 17:11:21 +0000 Received: by hermes--production-bf1-54475bbfff-xvhwr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 391f468d62347dac59308d93a8efc449; Fri, 12 May 2023 17:11:19 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: Raspberry Pi POE+ hat overlay From: Mark Millard In-Reply-To: Date: Fri, 12 May 2023 10:11:06 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Doug Rabson X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Rspamd-Queue-Id: 4QHwK81bfdz4V7N X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On May 12, 2023, at 09:38, Doug Rabson wrote: > On Fri, 12 May 2023 at 17:27, Mark Millard wrote: > On May 12, 2023, at 08:43, Doug Rabson wrote: >=20 > > I have a pi4 with the official POE+ hat which I want to run FreeBSD = on. One thing I noticed is that the fan doesn't run in FreeBSD so I = decided to try and write a little driver for it. First step seems to be = to load the corresponding devicetree overlay by adding something like = this to /boot/msdos/config.txt: > >=20 > > dtoverlay=3Drpi-poe-plus > > dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 > > dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 > > dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 > > dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 > >=20 > > Unfortunately this is where I'm stuck - the overlay is not present = in the final DTB given to the kernel so there isn't anything to hook a = driver to. Are dtoverlays supposed to work on FreeBSD? >=20 > The RPi* firwmare version that FreeBSD has in ports and uses > in making snapshots and other images does not have that overlay: >=20 > # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* > -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo > -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo > -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo > -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo > -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo > -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo > -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo > -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo > -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo > -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo >=20 > You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo . >=20 > I copied the file from a rasbian install I had for another project. = Perhaps I should find the corresponding source for it and build it with = the device tree source from FreeBSD. > =20 > You also do not mention what version of FreeBSD you are using > on the RPi4B. The output of the command: >=20 > I'm running 13.2-RELEASE-p0 That limits the range of firmware you can experiment with but the following tagged vintages should be compatible and also have an overlays/rpi-poe-plus.dtbo present: 1.20210527/boot/overlays/rpi-poe-plus.dtbo 1.20210727/boot/overlays/rpi-poe-plus.dtbo 1.20210805/boot/overlays/rpi-poe-plus.dtbo So extracting a consistent/full set of firmware and trying it is a possibility. The first 3 tags links on: https://github.com/raspberrypi/linux/tags?after=3D1.20210831 are for the above 3 firmware versions. Anything newer will lead to a FreeBSD kernel crash for 13.2-RELEASE-p0 due to mishandling the .dtb file that would be used. As an example of what is in . . ./boot/ from one of those 3: # ls -Tld firmware-1.20210805/boot/* -rw-rw-r-- 1 root wheel 18693 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/COPYING.linux -rw-rw-r-- 1 root wheel 1594 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/LICENCE.broadcom -rw-rw-r-- 1 root wheel 26401 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb -rw-rw-r-- 1 root wheel 25749 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb -rw-rw-r-- 1 root wheel 26138 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b.dtb -rw-rw-r-- 1 root wheel 26060 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-cm.dtb -rw-rw-r-- 1 root wheel 27076 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb -rw-rw-r-- 1 root wheel 25883 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-zero.dtb -rw-rw-r-- 1 root wheel 27276 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb -rw-rw-r-- 1 root wheel 27425 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb -rw-rw-r-- 1 root wheel 29542 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb -rw-rw-r-- 1 root wheel 28923 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb -rw-rw-r-- 1 root wheel 27421 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb -rw-rw-r-- 1 root wheel 49825 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb -rw-rw-r-- 1 root wheel 49821 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-400.dtb -rw-rw-r-- 1 root wheel 50499 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb -rw-rw-r-- 1 root wheel 52456 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bootcode.bin -rw-rw-r-- 1 root wheel 7278 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup.dat -rw-rw-r-- 1 root wheel 5407 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4.dat -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4cd.dat -rw-rw-r-- 1 root wheel 8416 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4db.dat -rw-rw-r-- 1 root wheel 8418 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4x.dat -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_cd.dat -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_db.dat -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_x.dat drwxrwxr-x 2 root wheel 236 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/overlays -rw-rw-r-- 1 root wheel 2959904 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start.elf -rw-rw-r-- 1 root wheel 2235712 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4.elf -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4cd.elf -rw-rw-r-- 1 root wheel 3731528 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4db.elf -rw-rw-r-- 1 root wheel 2987720 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4x.elf -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_cd.elf -rw-rw-r-- 1 root wheel 4803496 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_db.elf -rw-rw-r-- 1 root wheel 3711432 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_x.elf (I'll not list the overlays/* .) I've no clue to the consequences of mixing and matching materials from different vintages of the firmware. It does appear that: 1.20210727/boot/overlays/rpi-poe-plus.dtbo 1.20210805/boot/overlays/rpi-poe-plus.dtbo (the newer 2 of th3 3) are the same by content but that: 1.20210527/boot/overlays/rpi-poe-plus.dtbo is distinct in its older content. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Fri May 12 17:19:32 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHwVt49z1z4BGDc for ; Fri, 12 May 2023 17:19:50 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-24.consmr.mail.gq1.yahoo.com (sonic311-24.consmr.mail.gq1.yahoo.com [98.137.65.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHwVs2fXDz4WBd for ; Fri, 12 May 2023 17:19:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=iDniEFO+; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683911987; bh=7TQ6oKTQfgsk9MB6P2ZYia/qBnD/lgS51W7FI/vAYuA=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=iDniEFO+TqSH7JLRoe9R7lC3PEcb5na1Yh9ifoVKCX0Zel8dlWnvksISqP3JVUYU13PdM9yVEJH2jUPLpx/JtlQZ1hfDIZsFi5dE/uLFA3OrAys1ZKLgPEd2SNxzjLcwIn0Mnq9qARu7bFw9XsVKTa7iBzMGFgy+VUWo+m7koiMqdU4rr32zJBMpomnuv+UfWSHuMwF9lv8E8BHPlWpiY58GUjMSQ6B9s2j8uAiTJfBrLnQTs8N4W3gruT9d71U2gNc5K0rKHZ2bxiFPzYEY6NZOEd9LC98Y5nTW3m0PkIK3D7q+VKMyTmmfnglninbr9xRllPYUynLZDOG4prdeQg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683911987; bh=sIuTHJ9gQWyijx/pAnYIVFyoy0aAHKJPXAOQ1TVxPJ3=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=DA6io0bORmN/6etPKMr6tvmvNU0b1WhP/CFdeccaO/JooiEwLB2R8M8dVOqRd3s2Wiz0laDqko4JcPWGn0VgY+8d4q9TDAlVSdxOb6WRED2l/dFwjEbWFoCSs501u558OxMFoKwE0XxNkostMtvl8RpM+1c5+SwHFZlWZQw0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r.qK6NkmFJA6JtirPv2GtSu2KH3ClwV _Yk.Qwq4yYUcIZ0CdTxr8iTDjX9iNaL2chtgn9_ZTir2gyUp0LkzhG7boa7moqrfNky0urVmaw19 90rTDpS5hXsF6v.LIlhmdUoQ.38Tyv5HtxtsPhM2Ta_3NldrwW2npG_uQ3Dtg0m1N2ytE8iOeXv6 kha.9RaU0U7Y2S_3O26vMd8AtQ6sbOOjGhc78yPJLbsNCCWyDIkeJkqAHNYrQ7wbNa_0z6TvzhOH L_70dTRyXMxhrXISfWvTLOorTBH3rYvniKNW_lJKR2fV9Q8P8Dd2_8Zjnc8OOOdh_16IhsZ0YjOF 4.pxLh4TGRJT0NzLOS5scJD47b8OSyMPZaWoLhHkSpWeO_pNT6sIlwU4Um4n6xdCy.XLYlVPqelI bDA-- X-Sonic-MF: X-Sonic-ID: df2fd966-9eb0-4ced-9d90-3245f67c00f7 Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Fri, 12 May 2023 17:19:47 +0000 Received: by hermes--production-gq1-6db989bfb-7p67n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 81a73e6264eb1d1636dab32d93d4ffb2; Fri, 12 May 2023 17:19:43 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: Raspberry Pi POE+ hat overlay From: Mark Millard In-Reply-To: Date: Fri, 12 May 2023 10:19:32 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <77CD0716-3BC8-47EB-8743-F2BD9CA43D31@yahoo.com> References: To: Doug Rabson X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; BLOCKLISTDE_FAIL(0.00)[98.137.65.205:server fail]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.205:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4QHwVs2fXDz4WBd X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On May 12, 2023, at 10:11, Mark Millard wrote: > On May 12, 2023, at 09:38, Doug Rabson wrote: >=20 >> On Fri, 12 May 2023 at 17:27, Mark Millard wrote: >> On May 12, 2023, at 08:43, Doug Rabson wrote: >>=20 >>> I have a pi4 with the official POE+ hat which I want to run FreeBSD = on. One thing I noticed is that the fan doesn't run in FreeBSD so I = decided to try and write a little driver for it. First step seems to be = to load the corresponding devicetree overlay by adding something like = this to /boot/msdos/config.txt: >>>=20 >>> dtoverlay=3Drpi-poe-plus >>> dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 >>> dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 >>> dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 >>> dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 >>>=20 >>> Unfortunately this is where I'm stuck - the overlay is not present = in the final DTB given to the kernel so there isn't anything to hook a = driver to. Are dtoverlays supposed to work on FreeBSD? >>=20 >> The RPi* firwmare version that FreeBSD has in ports and uses >> in making snapshots and other images does not have that overlay: >>=20 >> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* >> -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo >> -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo >> -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo >> -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo >> -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo >> -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo >> -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo >> -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo >> -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo >> -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo >>=20 >> You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo = . >>=20 >> I copied the file from a rasbian install I had for another project. = Perhaps I should find the corresponding source for it and build it with = the device tree source from FreeBSD. >>=20 >> You also do not mention what version of FreeBSD you are using >> on the RPi4B. The output of the command: >>=20 >> I'm running 13.2-RELEASE-p0 >=20 > That limits the range of firmware you can experiment with > but the following tagged vintages should be compatible and > also have an overlays/rpi-poe-plus.dtbo present: >=20 > 1.20210527/boot/overlays/rpi-poe-plus.dtbo > 1.20210727/boot/overlays/rpi-poe-plus.dtbo > 1.20210805/boot/overlays/rpi-poe-plus.dtbo >=20 > So extracting a consistent/full set of firmware and trying > it is a possibility. >=20 > The first 3 tags links on: >=20 > https://github.com/raspberrypi/linux/tags?after=3D1.20210831 >=20 > are for the above 3 firmware versions. >=20 > Anything newer will lead to a FreeBSD kernel crash for > 13.2-RELEASE-p0 due to mishandling the .dtb file that > would be used. >=20 > As an example of what is in . . ./boot/ from one of those 3: >=20 > # ls -Tld firmware-1.20210805/boot/* > -rw-rw-r-- 1 root wheel 18693 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/COPYING.linux > -rw-rw-r-- 1 root wheel 1594 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/LICENCE.broadcom > -rw-rw-r-- 1 root wheel 26401 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb > -rw-rw-r-- 1 root wheel 25749 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb > -rw-rw-r-- 1 root wheel 26138 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b.dtb > -rw-rw-r-- 1 root wheel 26060 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-cm.dtb > -rw-rw-r-- 1 root wheel 27076 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb > -rw-rw-r-- 1 root wheel 25883 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-zero.dtb > -rw-rw-r-- 1 root wheel 27276 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb > -rw-rw-r-- 1 root wheel 27425 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb > -rw-rw-r-- 1 root wheel 29542 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb > -rw-rw-r-- 1 root wheel 28923 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb > -rw-rw-r-- 1 root wheel 27421 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb > -rw-rw-r-- 1 root wheel 49825 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb > -rw-rw-r-- 1 root wheel 49821 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-400.dtb > -rw-rw-r-- 1 root wheel 50499 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb > -rw-rw-r-- 1 root wheel 52456 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bootcode.bin > -rw-rw-r-- 1 root wheel 7278 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup.dat > -rw-rw-r-- 1 root wheel 5407 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4.dat > -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4cd.dat > -rw-rw-r-- 1 root wheel 8416 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4db.dat > -rw-rw-r-- 1 root wheel 8418 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4x.dat > -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_cd.dat > -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_db.dat > -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_x.dat > drwxrwxr-x 2 root wheel 236 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/overlays > -rw-rw-r-- 1 root wheel 2959904 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start.elf > -rw-rw-r-- 1 root wheel 2235712 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4.elf > -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4cd.elf > -rw-rw-r-- 1 root wheel 3731528 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4db.elf > -rw-rw-r-- 1 root wheel 2987720 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4x.elf > -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_cd.elf > -rw-rw-r-- 1 root wheel 4803496 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_db.elf > -rw-rw-r-- 1 root wheel 3711432 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_x.elf Note the lack of config.txt , armstub8-gic.bin , and armstub8.bin . > (I'll not list the overlays/* .) >=20 > I've no clue to the consequences of mixing and matching > materials from different vintages of the firmware. It > does appear that: >=20 > 1.20210727/boot/overlays/rpi-poe-plus.dtbo > 1.20210805/boot/overlays/rpi-poe-plus.dtbo >=20 > (the newer 2 of th3 3) are the same by content but that: >=20 > 1.20210527/boot/overlays/rpi-poe-plus.dtbo >=20 > is distinct in its older content. Be warned that the sys-utils/rpi-firmware port installs a couple of files that are not based on https://github.com/raspberrypi/ materials: # ls -Tld /boot/efi/armstub8* -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 = /boot/efi/armstub8-gic.bin -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 = /boot/efi/armstub8.bin Be sure to keep those 2 files in place (for at least armstub8-gic.bin ). A similar point goes for your config.txt . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Fri May 12 17:41:03 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHwzf0t3Lz4BHLj for ; Fri, 12 May 2023 17:41:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic310-21.consmr.mail.gq1.yahoo.com (sonic310-21.consmr.mail.gq1.yahoo.com [98.137.69.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHwzd1315z4ZD0 for ; Fri, 12 May 2023 17:41:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=JScj5+Rl; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683913275; bh=jrmoGrSHOjjxm7LA+HqF0FPZ+4MxHPoOexqK1C855CY=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=JScj5+Rlv3WmaTV966G/J9wuxibIgd92W3WKiJO8/YEx4P60vEuUoojLgn4vOOaTRyU8q8a9gXPPLn9GINRICtp0Q9OaX6Jj6PdvwtlpLVUOTvUoYzCnSGBysyJ1ftcVDRao8Ma1yCmr6ljd9VZ+Jr+3SL/12+Sz5CtYQ1t1PrA3xkHavESQwCU13tiJkIgXCoDrtWO+YK1vgVD+3kBMm90ix5bAWJ0eTE5k3EG/WSg5yOPLxKzi6mrTtYb7+shYptthOuZ0C+Y/0KcooC0vvP2UvLCTCK9NvvDvC6qamvmJuJvDxz8LLeTBdMCrsKD8w27WVQ5YFRe+3Z5aBfwCYg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683913275; bh=xoxzn9vFVK5P+jedtl1DoiQDyhEDKtIN/g7PZh1Ce68=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=WhwFL1QxwRNNoBql78HLIztU1q4rmkR4GEiGEPyTzW9wQhAnG+0KUdyRTmMt6zLPTUCmzbI9ThDs0pN6OOvcM0Mg3xKSm91rJKDVrB5d8czaJUFvK8os4/zt8dP80ALHX2iprB6RRZ1JBVxARs9TI3f6SsbyHAJ9SomBSONAocDzbCeHJOii6zFio++mWlWFrQ678RIJo76rsdVO37RnRHdEmh0mlSJlY3+s6R/4Zr8fhcIzs8B//MSY2g5Uhkmug8HLNidS96l2Jo5niMI0u4+QHMUgSgecGer91Jd208+K786bVv7YvwRKKNlmunYga6Zy+ugf82yt2g787FCFwA== X-YMail-OSG: _A.IktIVM1nX1euZNPlXubdHHmjXl_1GDAlzNZOBD1CjhUiAnYDZqCo7ATwztKQ UHwlXzX6WcFNykR2uyS6XfUlpYx5Z5qTesAWmKBt8d4g_XBMZJTXF4BYF4PyIdmqrBsrpSg_E9Fq pDsK18NZC2nGxdLztL9Hkdc3ryD.VhuWQHNBK7hmvFGlkyNVJPfv8klvzyCcbyJhNgty0nnJsfi_ lsi6iko9BoI84JflVj52rSANOL2ae4ow1oEJWgeVqXmEFUQuUi1RmAZA7vhUVDr7YRYdoTSCL80P sT38EmVDY41wghEr2t1fGuCrXOm1UMyVZRiyxpvJ0zqb.sHg0CGt3aspn53X28_Ykl.igTk3bUBE 9O3RDnOVsu5SNWDyWWxtoPP49ZzZIwmzOu2gqTt7GAr9yBd8wO2eSnqyEd8sVY2AK3VluFzeqt7X KH4Jdk7.Ejtl_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xGNT2Xvfce_pMrRXdcZ4MdobbLLbMvZFTMVfKKwT9 GOCAzSczkzIlDSoF02LweYtei_GmZVWgHL2q8YqL2ugMiMQzGiQjl_5LRBmV1BHh4DP_O0Am.nk2 iWA_Zc_B2EiqoqbrCey3htOTVI3nFZQrUhqt4m40sx5X3fKDBHFEYgSRU1CguEJwuAp5MUhbTDNE 3cMLDMTmG3PIKQLS6kAsJW0DXIKkcHTUXsaYUM5K0YroDABxiMhqhth8Jt3.k9lguao8VMnN1IP2 tNUVbe1d321OBO9_6E0p4DHTAepveYaCNiV7v4TgAZbTvn_cz7kfrTaFf2Uq9X3DUIxsK60H4HIW fmAu82wqfq7nKbRlc73KMhZ4_aLaq_v7BxHnStzH0s6tR_oAFF25NPERzFuU.7YyU4LF10PKIKhb rqK1egO7tJUxQKVXPmXKW0UF.6nN3POw6lF7KZLztwTCy38D_U3.ocjhP413UWTGDabprhS1EsWK 9C_ShcA8K5zChVnS_J5LVmWL49qek_uiaz1FRl1DPg5e8NcGS8_JU9S8w8Qc_NfGq379ed1abTS2 aj8yuUT4JfDz8kjTJgfBONtwzYpWGpXUIfznTzxcuLGURkCb2SuHiszlEvdNnzGkDutAowINabT3 a4ZidDriitAxaEm3UTzsZMTusXGnStkfV4Kbm4zMCbTEw4XrVlSbMhL__cRu0KgojSELTNRZWvQv iy41lP_F4JFz3f278uaqyMVYHmkGbczHg1EBmtCkYnRI2xG3Dk_dcIU5qn4vFlEWbcfGEkNeHw6h X X-Sonic-MF: X-Sonic-ID: 67da03bc-75d1-4df3-be71-c982861a82ae Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.gq1.yahoo.com with HTTP; Fri, 12 May 2023 17:41:15 +0000 Received: by hermes--production-gq1-6db989bfb-c6sbx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 44707b4cc8f4a2f66ecf50e3e7c80c22; Fri, 12 May 2023 17:41:14 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: Raspberry Pi POE+ hat overlay From: Mark Millard In-Reply-To: <77CD0716-3BC8-47EB-8743-F2BD9CA43D31@yahoo.com> Date: Fri, 12 May 2023 10:41:03 -0700 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <432A1A16-9FE5-4339-AB38-8F3E03A5D4EF@yahoo.com> References: <77CD0716-3BC8-47EB-8743-F2BD9CA43D31@yahoo.com> To: Doug Rabson X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.147:from]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4QHwzd1315z4ZD0 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On May 12, 2023, at 10:19, Mark Millard wrote: > On May 12, 2023, at 10:11, Mark Millard wrote: >=20 >> On May 12, 2023, at 09:38, Doug Rabson wrote: >>=20 >>> On Fri, 12 May 2023 at 17:27, Mark Millard = wrote: >>> On May 12, 2023, at 08:43, Doug Rabson wrote: >>>=20 >>>> I have a pi4 with the official POE+ hat which I want to run FreeBSD = on. One thing I noticed is that the fan doesn't run in FreeBSD so I = decided to try and write a little driver for it. First step seems to be = to load the corresponding devicetree overlay by adding something like = this to /boot/msdos/config.txt: >>>>=20 >>>> dtoverlay=3Drpi-poe-plus >>>> dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hyst=3D3000 >>>> dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hyst=3D3000 >>>> dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hyst=3D4000 >>>> dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hyst=3D5000 >>>>=20 >>>> Unfortunately this is where I'm stuck - the overlay is not present = in the final DTB given to the kernel so there isn't anything to hook a = driver to. Are dtoverlays supposed to work on FreeBSD? >>>=20 >>> The RPi* firwmare version that FreeBSD has in ports and uses >>> in making snapshots and other images does not have that overlay: >>>=20 >>> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* >>> -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo >>> -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo >>> -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo >>> -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo >>> -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo >>> -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo >>> -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo >>> -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo >>> -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo >>> -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 = /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo >>>=20 >>> You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo = . >>>=20 >>> I copied the file from a rasbian install I had for another project. = Perhaps I should find the corresponding source for it and build it with = the device tree source from FreeBSD. >>>=20 >>> You also do not mention what version of FreeBSD you are using >>> on the RPi4B. The output of the command: >>>=20 >>> I'm running 13.2-RELEASE-p0 >>=20 >> That limits the range of firmware you can experiment with >> but the following tagged vintages should be compatible and >> also have an overlays/rpi-poe-plus.dtbo present: >>=20 >> 1.20210527/boot/overlays/rpi-poe-plus.dtbo >> 1.20210727/boot/overlays/rpi-poe-plus.dtbo >> 1.20210805/boot/overlays/rpi-poe-plus.dtbo >>=20 >> So extracting a consistent/full set of firmware and trying >> it is a possibility. >>=20 >> The first 3 tags links on: >>=20 >> https://github.com/raspberrypi/linux/tags?after=3D1.20210831 That was likely a wasteful reference for me to supply. Trying again: https://github.com/raspberrypi/firmware/tags?after=3D1.20210831 likely avoids ending up with a full set of linux materials to go along with the firmware (smaller download with a smaller expansion). >> are for the above 3 firmware versions. >>=20 >> Anything newer will lead to a FreeBSD kernel crash for >> 13.2-RELEASE-p0 due to mishandling the .dtb file that >> would be used. >>=20 >> As an example of what is in . . ./boot/ from one of those 3: >>=20 >> # ls -Tld firmware-1.20210805/boot/* >> -rw-rw-r-- 1 root wheel 18693 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/COPYING.linux >> -rw-rw-r-- 1 root wheel 1594 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/LICENCE.broadcom >> -rw-rw-r-- 1 root wheel 26401 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb >> -rw-rw-r-- 1 root wheel 25749 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb >> -rw-rw-r-- 1 root wheel 26138 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-b.dtb >> -rw-rw-r-- 1 root wheel 26060 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-cm.dtb >> -rw-rw-r-- 1 root wheel 27076 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb >> -rw-rw-r-- 1 root wheel 25883 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2708-rpi-zero.dtb >> -rw-rw-r-- 1 root wheel 27276 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb >> -rw-rw-r-- 1 root wheel 27425 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb >> -rw-rw-r-- 1 root wheel 29542 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb >> -rw-rw-r-- 1 root wheel 28923 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb >> -rw-rw-r-- 1 root wheel 27421 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb >> -rw-rw-r-- 1 root wheel 49825 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb >> -rw-rw-r-- 1 root wheel 49821 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-400.dtb >> -rw-rw-r-- 1 root wheel 50499 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb >> -rw-rw-r-- 1 root wheel 52456 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/bootcode.bin >> -rw-rw-r-- 1 root wheel 7278 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup.dat >> -rw-rw-r-- 1 root wheel 5407 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4.dat >> -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4cd.dat >> -rw-rw-r-- 1 root wheel 8416 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4db.dat >> -rw-rw-r-- 1 root wheel 8418 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup4x.dat >> -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_cd.dat >> -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_db.dat >> -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/fixup_x.dat >> drwxrwxr-x 2 root wheel 236 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/overlays >> -rw-rw-r-- 1 root wheel 2959904 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start.elf >> -rw-rw-r-- 1 root wheel 2235712 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4.elf >> -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4cd.elf >> -rw-rw-r-- 1 root wheel 3731528 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4db.elf >> -rw-rw-r-- 1 root wheel 2987720 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start4x.elf >> -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_cd.elf >> -rw-rw-r-- 1 root wheel 4803496 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_db.elf >> -rw-rw-r-- 1 root wheel 3711432 Aug 5 04:11:18 2021 = firmware-1.20210805/boot/start_x.elf >=20 > Note the lack of config.txt , armstub8-gic.bin , and > armstub8.bin . >=20 >> (I'll not list the overlays/* .) >>=20 >> I've no clue to the consequences of mixing and matching >> materials from different vintages of the firmware. It >> does appear that: >>=20 >> 1.20210727/boot/overlays/rpi-poe-plus.dtbo >> 1.20210805/boot/overlays/rpi-poe-plus.dtbo >>=20 >> (the newer 2 of th3 3) are the same by content but that: >>=20 >> 1.20210527/boot/overlays/rpi-poe-plus.dtbo >>=20 >> is distinct in its older content. >=20 > Be warned that the sys-utils/rpi-firmware port installs a > couple of files that are not based on > https://github.com/raspberrypi/ materials: >=20 > # ls -Tld /boot/efi/armstub8* > -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 = /boot/efi/armstub8-gic.bin > -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 = /boot/efi/armstub8.bin >=20 > Be sure to keep those 2 files in place (for at least > armstub8-gic.bin ). A similar point goes for your > config.txt . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sat May 13 02:58:14 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJ9Lf6yRBz4Bmgl for ; Sat, 13 May 2023 02:58:34 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Received: from vmse03.mailcluster.com.au (vmse03.mailcluster.com.au [IPv6:2401:fc00:0:14::11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QJ9Lb0mx7z4CgB for ; Sat, 13 May 2023 02:58:30 +0000 (UTC) (envelope-from bscott@bunyatech.com.au) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bunyatech.com.au header.s=default header.b=hu7ZLChR; spf=pass (mx1.freebsd.org: domain of bscott@bunyatech.com.au designates 2401:fc00:0:14::11 as permitted sender) smtp.mailfrom=bscott@bunyatech.com.au; dmarc=none Received: from vmcp43.digitalpacific.com.au ([101.0.119.58]) by vmse03.mailcluster.com.au with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1pxfSb-0006Vf-GV for freebsd-arm@freebsd.org; Sat, 13 May 2023 12:58:23 +1000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bunyatech.com.au; s=default; h=In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Content-Type:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=P2NYVYXlN5fHbgesSxr0vCF7Y4eTXtoMnDJS902/24s=; b=hu7ZLChRrzDcuMndHFn+4hcpGq jvmKRZ8xhTf6t61Dps0kxR2NgXRuV+0sJ6byWMr8G92akyQncCn5fMJgN/aYH5hM2dJk1t9945wDX PSGFboUmmvxUJf0bT6fF8PVjLM4/AdB3t8+HcY81Aj76Xj5uBHV9cpG+ng5/MLj60h9w+Ds6BSwlu z/MzDlVfJa2SnXjoU3xQ/+HTwoAMAY6c6F3hS0/hW7n3O0gbn6/0JDmMa9eV+21ULX7nJGhMmlusW 06Fyw8os71JubKo1B0A+EbbLRzc3xDvjoqm7zM2j5cbtm/97ghCB8GlE4elBtrGchq1YfJ55A/y4b pepHE5NA==; Received: from ppp221-139.static.internode.on.net ([150.101.221.139]:45397 helo=[10.0.1.197]) by vmcp43.digitalpacific.com.au with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1pxfSZ-009LMp-1H for freebsd-arm@freebsd.org; Sat, 13 May 2023 12:58:15 +1000 Content-Type: multipart/alternative; boundary="------------tgznBgeoe1oP6togsuOi0lFv" Message-ID: Date: Sat, 13 May 2023 12:58:14 +1000 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: Raspberry Pi POE+ hat overlay To: freebsd-arm@freebsd.org References: <77CD0716-3BC8-47EB-8743-F2BD9CA43D31@yahoo.com> <432A1A16-9FE5-4339-AB38-8F3E03A5D4EF@yahoo.com> From: Brian Scott In-Reply-To: <432A1A16-9FE5-4339-AB38-8F3E03A5D4EF@yahoo.com> X-Authenticated-User: bscott@bunyatech.com.au X-Authenticator: dovecot_plain X-Originating-IP: 101.0.119.58 X-SpamExperts-Domain: digipac-sh-outbound4.mailcluster.com.au X-SpamExperts-Username: 101.0.119.58 X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.01) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT9g/w5wPCocGuxcdDqJPMg5PUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5wOvGg18h18lTsuUGH1KgAagLCWYuPCxwJEfxKP87A95+fH zJ6mVE7ewsipSVIfs4biUsQ8K1YIB5+wMA+S19kBABHVTw1lV42ob3hDgXVUNfMYOaf2k/5ge9xY pFnK4mEZANNbnYFKmAzb4T8ZHiCK+gaXrHkgRC7/tI3CjXmVyopDDA7s27T1ptzB417+I1gp8Gnm YnDDwZLHsvD3pj+LvuKTBmuOVTCmQ/b22sw+yoj/3DdQ0wDV188+gffZv/QAKQlQdTfwbSciar+2 JCMst0dEunmtVTQWqR0MJGYnYGBIZS4rRgm1GD0QN7Psq7kMoOLjGsRz/MUE6aIZoCcUNXR4aVG4 tVHU1Zldyy+zfdeiXSYiLTYFU2inszSuEYHdlUkt/DWy8vGLtXVYC5E2Ixfs2qKc0fhF4YMd0lwH wOXyY7DGIntSiB4r6Kj1fsj0vv0lYcA3KUCZ1xbWKiooCEhtIlNufemFbU3yy1ZWIMOHTNjJsV8U ZvUGC4qEZBLXzXmHaN80JC+nfH561Te/6BtpbmdpMLvM58ZB4GVvZfvg7iEFLP+SSY+Av5+AiC64 m+k59xMAqz9bfz2u3IufXgzJJmjXk7fyp6dRgNba53gXfHH8ghB3TJhRhCEqvojF4DEPUxAkEvKE S3Dwga/K50QJEfuYSa1oqImpgX99qcen5bW2mj7gpl+Nel82aV6t85jdQ1W7xM52M4KvSDibnd+2 AEC7XXwrqk2mM9pO7yAC7PGX5cs6w1Q8AODFgbv5QexkYW9lGrw8C7YdqgAuV5Om7ryjiSwbRKL6 mPH7a1z1pRXWhjh9fdbl44I0Df0hM4dsD4bDwITFGCwK76hQ6vxPb3kvW+FOj8dHBAEnPnyse24r Z04BTGPuKCWPMdaEOqqgRFGeEt6xotIlx57hKeDIpVo9Y8swg9vllynHi7u2NJscbLjsBWgbQir3 s7IISG0iU2596YVtTfLLVlYg24YpMwV2Qj6zr+H1W4fdfycpg/800vALz8mnE6wA706qGokY7okO g7HJIt1nJKmB0MxOKVrDfQzDgqFDumjx9w03a6SLNhJ6Q12/4jZa7jE= X-Report-Abuse-To: spam@vmse01.mailcluster.com.au X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_DKIM_ALLOW(-0.20)[bunyatech.com.au:s=default]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_NONE(0.00)[2401:fc00:0:14::11:from]; DKIM_TRACE(0.00)[bunyatech.com.au:+]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; BLOCKLISTDE_FAIL(0.00)[2401:fc00:0:14::11:server fail,150.101.221.139:server fail,101.0.119.58:server fail]; ASN(0.00)[asn:55803, ipnet:2401:fc00::/32, country:AU]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_XOIP(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[bunyatech.com.au]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4QJ9Lb0mx7z4CgB X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------tgznBgeoe1oP6togsuOi0lFv Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit > [Note: The copy I got in E-mail does not show your message as having > been sent to the list. Not knowing why, I am just directly replying > instead of putting your content on the list. If you do send to the > list, feel free to include any of my content additions.] [Apologies, finally got covid and my brain is running on fumes in the tank and feels like somebody has snuck a basketball in with it.] On May 12, 2023, at 18:13, Brian Scott wrote: > On 13/5/2023 3:41 am, Mark Millard wrote: >> On May 12, 2023, at 10:19, Mark Millard wrote: >> >>> On May 12, 2023, at 10:11, Mark Millard wrote: >>> >>>> On May 12, 2023, at 09:38, Doug Rabson wrote: >>>> >>>>> On Fri, 12 May 2023 at 17:27, Mark Millard wrote: >>>>> On May 12, 2023, at 08:43, Doug Rabson wrote: >>>>> >>>>>> I have a pi4 with the official POE+ hat which I want to run FreeBSD on. One thing I noticed is that the fan doesn't run in FreeBSD so I decided to try and write a little driver for it. First step seems to be to load the corresponding devicetree overlay by adding something like this to /boot/msdos/config.txt: >>>>>> >>>>>> dtoverlay=rpi-poe-plus >>>>>> dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 >>>>>> dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 >>>>>> dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 >>>>>> dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 >>>>>> >>>>>> Unfortunately this is where I'm stuck - the overlay is not present in the final DTB given to the kernel so there isn't anything to hook a driver to. Are dtoverlays supposed to work on FreeBSD? >>>>> The RPi* firwmare version that FreeBSD has in ports and uses >>>>> in making snapshots and other images does not have that overlay: >>>>> >>>>> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* >>>>> -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo >>>>> -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo >>>>> -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo >>>>> -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo >>>>> -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo >>>>> -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo >>>>> -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo >>>>> -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo >>>>> -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo >>>>> -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo >>>>> >>>>> You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo . >>>>> >>>>> I copied the file from a rasbian install I had for another project. Perhaps I should find the corresponding source for it and build it with the device tree source from FreeBSD. >>>>> >>>>> You also do not mention what version of FreeBSD you are using >>>>> on the RPi4B. The output of the command: > I had a quick look at this a few months ago but seemed too hard for me. > > I now have the fan directly connected to the 5V lines and running full time. Not a bad idea in the Australian summer for a box that was sitting outside. I've even installed a second fan to keep the temperatures around 60C. All of that is my problems not yours. > > I just checked and I do have the overlay enabled (dtoverlay=rpi-poe) on a "13.2-STABLE stable/13-n255298-7dea7445ba44" system (built a week ago). > I'll note that recent enough stable/13 (going back a ways but not all the > way back to releng/13.2 being branched) has the kernel fix that avoids > crashing for more modern RPi* firmware, allowing potential experiments with > such. > > releng/14.0 should be the first RELEASE to have the fix. Later releng/13.3 > would be created and pick up the fix. Excellent. 14.0 also has the ds3231 etc fix. > The overlay is from the rpi-firmware port (rpi-firmware-1.20210303.g20210303). I see that I am not using the 'plus' version (my hat is a +) but also that my rpi-firmware package is quite ancient compared to those Mark was quoting. > 1.20210527/boot/overlays/rpi-poe-plus.dtbo > 1.20210727/boot/overlays/rpi-poe-plus.dtbo > 1.20210805/boot/overlays/rpi-poe-plus.dtbo > > are all from 2021 (May-27, Jul-27, Aug-05). They are the > first 3 officially tagged releases after the 1.20210303 > (2021-Mar-03) RPi* firmware that FreeBSD bundles in > RPi* snapshots and releases as things are. > > (The 2021-Jul-27 and 2021-Aug-05 being so close in time > suggests that 1.20210727 was a bad release.) > > For releng/13.2 , 1.20210805 may be the best option that > officially has an overlays/rpi-poe-plus.dtbo . I'll try updating (after a backup). I thought I had recently, see initial comment. > In devinfo -v I see: > > unknown pnpinfo name=rpi-poe-fan@0 compat=raspberrypi,rpi-poe-fan > > I can't find my old emails quickly but seem to recall a lack of documentation at the time for the chip in the POE+ device. There were a bunch of mystery registers tucked in after the storage area that were in an area that vendors could use for their own purposes. I.e. nothing documented. > > Good luck! > > Brian >>>>> I'm running 13.2-RELEASE-p0 >>>> That limits the range of firmware you can experiment with >>>> but the following tagged vintages should be compatible and >>>> also have an overlays/rpi-poe-plus.dtbo present: >>>> >>>> 1.20210527/boot/overlays/rpi-poe-plus.dtbo >>>> 1.20210727/boot/overlays/rpi-poe-plus.dtbo >>>> 1.20210805/boot/overlays/rpi-poe-plus.dtbo >>>> >>>> So extracting a consistent/full set of firmware and trying >>>> it is a possibility. >>>> >>>> The first 3 tags links on: >>>> >>>> https://github.com/raspberrypi/linux/tags?after=1.20210831 >> That was likely a wasteful reference for me to supply. Trying >> again: >> >> https://github.com/raspberrypi/firmware/tags?after=1.20210831 >> >> likely avoids ending up with a full set of linux materials >> to go along with the firmware (smaller download with a smaller >> expansion). >> >>>> are for the above 3 firmware versions. >>>> >>>> Anything newer will lead to a FreeBSD kernel crash for >>>> 13.2-RELEASE-p0 due to mishandling the .dtb file that >>>> would be used. >>>> >>>> As an example of what is in . . ./boot/ from one of those 3: >>>> >>>> # ls -Tld firmware-1.20210805/boot/* >>>> -rw-rw-r-- 1 root wheel 18693 Aug 5 04:11:18 2021 firmware-1.20210805/boot/COPYING.linux >>>> -rw-rw-r-- 1 root wheel 1594 Aug 5 04:11:18 2021 firmware-1.20210805/boot/LICENCE.broadcom >>>> -rw-rw-r-- 1 root wheel 26401 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb >>>> -rw-rw-r-- 1 root wheel 25749 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb >>>> -rw-rw-r-- 1 root wheel 26138 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b.dtb >>>> -rw-rw-r-- 1 root wheel 26060 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-cm.dtb >>>> -rw-rw-r-- 1 root wheel 27076 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb >>>> -rw-rw-r-- 1 root wheel 25883 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-zero.dtb >>>> -rw-rw-r-- 1 root wheel 27276 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb >>>> -rw-rw-r-- 1 root wheel 27425 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb >>>> -rw-rw-r-- 1 root wheel 29542 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb >>>> -rw-rw-r-- 1 root wheel 28923 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb >>>> -rw-rw-r-- 1 root wheel 27421 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb >>>> -rw-rw-r-- 1 root wheel 49825 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb >>>> -rw-rw-r-- 1 root wheel 49821 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-400.dtb >>>> -rw-rw-r-- 1 root wheel 50499 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb >>>> -rw-rw-r-- 1 root wheel 52456 Aug 5 04:11:18 2021 firmware-1.20210805/boot/bootcode.bin >>>> -rw-rw-r-- 1 root wheel 7278 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup.dat >>>> -rw-rw-r-- 1 root wheel 5407 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup4.dat >>>> -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup4cd.dat >>>> -rw-rw-r-- 1 root wheel 8416 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup4db.dat >>>> -rw-rw-r-- 1 root wheel 8418 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup4x.dat >>>> -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup_cd.dat >>>> -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup_db.dat >>>> -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 firmware-1.20210805/boot/fixup_x.dat >>>> drwxrwxr-x 2 root wheel 236 Aug 5 04:11:18 2021 firmware-1.20210805/boot/overlays >>>> -rw-rw-r-- 1 root wheel 2959904 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start.elf >>>> -rw-rw-r-- 1 root wheel 2235712 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start4.elf >>>> -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start4cd.elf >>>> -rw-rw-r-- 1 root wheel 3731528 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start4db.elf >>>> -rw-rw-r-- 1 root wheel 2987720 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start4x.elf >>>> -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start_cd.elf >>>> -rw-rw-r-- 1 root wheel 4803496 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start_db.elf >>>> -rw-rw-r-- 1 root wheel 3711432 Aug 5 04:11:18 2021 firmware-1.20210805/boot/start_x.elf >>> Note the lack of config.txt , armstub8-gic.bin , and >>> armstub8.bin . >>> >>>> (I'll not list the overlays/* .) >>>> >>>> I've no clue to the consequences of mixing and matching >>>> materials from different vintages of the firmware. It >>>> does appear that: >>>> >>>> 1.20210727/boot/overlays/rpi-poe-plus.dtbo >>>> 1.20210805/boot/overlays/rpi-poe-plus.dtbo >>>> >>>> (the newer 2 of th3 3) are the same by content but that: >>>> >>>> 1.20210527/boot/overlays/rpi-poe-plus.dtbo >>>> >>>> is distinct in its older content. >>> Be warned that the sys-utils/rpi-firmware port installs a >>> couple of files that are not based on >>> https://github.com/raspberrypi/ materials: >>> >>> # ls -Tld /boot/efi/armstub8* >>> -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 /boot/efi/armstub8-gic.bin >>> -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 /boot/efi/armstub8.bin (I was only showing the file naming. I used a more modern context to do that, which may have been confusing. Ignore the dates for those 2 files and that I used a mount point for where they are placed for live use.) >>> Be sure to keep those 2 files in place (for at least >>> armstub8-gic.bin ). A similar point goes for your >>> config.txt . === Mark Millard marklmi at yahoo.com --------------tgznBgeoe1oP6togsuOi0lFv Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
[Note: The copy I got in E-mail does not show your message as having
been sent to the list. Not knowing why, I am just directly replying
instead of putting your content on the list. If you do send to the
list, feel free to include any of my content additions.]
[Apologies, finally got covid and my brain is running on fumes in the tank and feels like somebody has snuck a basketball in with it.] On May 12, 2023, at 18:13, Brian Scott <bscott@bunyatech.com.au> wrote:
On 13/5/2023 3:41 am, Mark Millard wrote:
On May 12, 2023, at 10:19, Mark Millard <marklmi@yahoo.com> wrote:

On May 12, 2023, at 10:11, Mark Millard <marklmi@yahoo.com> wrote:

On May 12, 2023, at 09:38, Doug Rabson <dfr@rabson.org> wrote:

On Fri, 12 May 2023 at 17:27, Mark Millard <marklmi@yahoo.com> wrote:
On May 12, 2023, at 08:43, Doug Rabson <dfr@rabson.org> wrote:

I have a pi4 with the official POE+ hat which I want to run FreeBSD on. One thing I noticed is that the fan doesn't run in FreeBSD so I decided to try and write a little driver for it. First step seems to be to load the corresponding devicetree overlay by adding something like this to /boot/msdos/config.txt:

dtoverlay=rpi-poe-plus
dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000
dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000
dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000
dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000

Unfortunately this is where I'm stuck - the overlay is not present in the final DTB given to the kernel so there isn't anything to hook a driver to. Are dtoverlays supposed to work on FreeBSD?
The RPi* firwmare version that FreeBSD has in ports and uses
in making snapshots and other images does not have that overlay:

# ls -Tld /usr/local/share/rpi-firmware/overlays/rpi*
-rw-r--r--  1 root  wheel   489 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo
-rw-r--r--  1 root  wheel  4081 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo
-rw-r--r--  1 root  wheel   643 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo
-rw-r--r--  1 root  wheel  2574 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo
-rw-r--r--  1 root  wheel   842 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo
-rw-r--r--  1 root  wheel  2937 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo
-rw-r--r--  1 root  wheel   771 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo
-rw-r--r--  1 root  wheel   893 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo
-rw-r--r--  1 root  wheel   567 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo
-rw-r--r--  1 root  wheel  1226 Mar  3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo

You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo .

I copied the file from a rasbian install I had for another project. Perhaps I should find the corresponding source for it and build it with the device tree source from FreeBSD.

You also do not mention what version of FreeBSD you are using
on the RPi4B. The output of the command:
I had a quick look at this a few months ago but seemed too hard for me.

I now have the fan directly connected to the 5V lines and running full time. Not a bad idea in the Australian summer for a box that was sitting outside. I've even installed a second fan to keep the temperatures around 60C. All of that is my problems not yours.

I just checked and I do have the overlay enabled (dtoverlay=rpi-poe) on a "13.2-STABLE stable/13-n255298-7dea7445ba44" system (built a week ago).
I'll note that recent enough stable/13 (going back a ways but not all the
way back to releng/13.2 being branched) has the kernel fix that avoids
crashing for more modern RPi* firmware, allowing potential experiments with
such.

releng/14.0 should be the first RELEASE to have the fix. Later releng/13.3
would be created and pick up the fix.
Excellent. 14.0 also has the ds3231 etc fix.
The overlay is from the rpi-firmware port (rpi-firmware-1.20210303.g20210303). I see that I am not using the 'plus' version (my hat is a +) but also that my rpi-firmware package is quite ancient compared to those Mark was quoting.
1.20210527/boot/overlays/rpi-poe-plus.dtbo
1.20210727/boot/overlays/rpi-poe-plus.dtbo
1.20210805/boot/overlays/rpi-poe-plus.dtbo

are all from 2021 (May-27, Jul-27, Aug-05). They are the
first 3 officially tagged releases after the 1.20210303
(2021-Mar-03) RPi* firmware that FreeBSD bundles in
RPi* snapshots and releases as things are.

(The 2021-Jul-27 and 2021-Aug-05 being so close in time
suggests that 1.20210727 was a bad release.)

For releng/13.2 , 1.20210805 may be the best option that
officially has an overlays/rpi-poe-plus.dtbo .
I'll try updating (after a backup). I thought I had recently, see initial comment.
In devinfo -v I see:

unknown pnpinfo name=rpi-poe-fan@0 compat=raspberrypi,rpi-poe-fan

I can't find my old emails quickly but seem to recall a lack of documentation at the time for the chip in the POE+ device. There were a bunch of mystery registers tucked in after the storage area that were in an area that vendors could use for their own purposes. I.e. nothing documented.

Good luck!

Brian
I'm running 13.2-RELEASE-p0
That limits the range of firmware you can experiment with
but the following tagged vintages should be compatible and
also have an overlays/rpi-poe-plus.dtbo present:

1.20210527/boot/overlays/rpi-poe-plus.dtbo
1.20210727/boot/overlays/rpi-poe-plus.dtbo
1.20210805/boot/overlays/rpi-poe-plus.dtbo

So extracting a consistent/full set of firmware and trying
it is a possibility.

The first 3 tags links on:

https://github.com/raspberrypi/linux/tags?after=1.20210831
That was likely a wasteful reference for me to supply. Trying
again:

https://github.com/raspberrypi/firmware/tags?after=1.20210831

likely avoids ending up with a full set of linux materials
to go along with the firmware (smaller download with a smaller
expansion).

are for the above 3 firmware versions.

Anything newer will lead to a FreeBSD kernel crash for
13.2-RELEASE-p0 due to mishandling the .dtb file that
would be used.

As an example of what is in . . ./boot/ from one of those 3:

# ls -Tld firmware-1.20210805/boot/*
-rw-rw-r--  1 root  wheel    18693 Aug  5 04:11:18 2021 firmware-1.20210805/boot/COPYING.linux
-rw-rw-r--  1 root  wheel     1594 Aug  5 04:11:18 2021 firmware-1.20210805/boot/LICENCE.broadcom
-rw-rw-r--  1 root  wheel    26401 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb
-rw-rw-r--  1 root  wheel    25749 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb
-rw-rw-r--  1 root  wheel    26138 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b.dtb
-rw-rw-r--  1 root  wheel    26060 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-cm.dtb
-rw-rw-r--  1 root  wheel    27076 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb
-rw-rw-r--  1 root  wheel    25883 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-zero.dtb
-rw-rw-r--  1 root  wheel    27276 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb
-rw-rw-r--  1 root  wheel    27425 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb
-rw-rw-r--  1 root  wheel    29542 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb
-rw-rw-r--  1 root  wheel    28923 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb
-rw-rw-r--  1 root  wheel    27421 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb
-rw-rw-r--  1 root  wheel    49825 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb
-rw-rw-r--  1 root  wheel    49821 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-400.dtb
-rw-rw-r--  1 root  wheel    50499 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb
-rw-rw-r--  1 root  wheel    52456 Aug  5 04:11:18 2021 firmware-1.20210805/boot/bootcode.bin
-rw-rw-r--  1 root  wheel     7278 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup.dat
-rw-rw-r--  1 root  wheel     5407 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup4.dat
-rw-rw-r--  1 root  wheel     3211 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup4cd.dat
-rw-rw-r--  1 root  wheel     8416 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup4db.dat
-rw-rw-r--  1 root  wheel     8418 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup4x.dat
-rw-rw-r--  1 root  wheel     3211 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup_cd.dat
-rw-rw-r--  1 root  wheel    10262 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup_db.dat
-rw-rw-r--  1 root  wheel    10262 Aug  5 04:11:18 2021 firmware-1.20210805/boot/fixup_x.dat
drwxrwxr-x  2 root  wheel      236 Aug  5 04:11:18 2021 firmware-1.20210805/boot/overlays
-rw-rw-r--  1 root  wheel  2959904 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start.elf
-rw-rw-r--  1 root  wheel  2235712 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start4.elf
-rw-rw-r--  1 root  wheel   799964 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start4cd.elf
-rw-rw-r--  1 root  wheel  3731528 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start4db.elf
-rw-rw-r--  1 root  wheel  2987720 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start4x.elf
-rw-rw-r--  1 root  wheel   799964 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start_cd.elf
-rw-rw-r--  1 root  wheel  4803496 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start_db.elf
-rw-rw-r--  1 root  wheel  3711432 Aug  5 04:11:18 2021 firmware-1.20210805/boot/start_x.elf
Note the lack of config.txt , armstub8-gic.bin , and
armstub8.bin .

(I'll not list the overlays/* .)

I've no clue to the consequences of mixing and matching
materials from different vintages of the firmware. It
does appear that:

1.20210727/boot/overlays/rpi-poe-plus.dtbo
1.20210805/boot/overlays/rpi-poe-plus.dtbo

(the newer 2 of th3 3) are the same by content but that:

1.20210527/boot/overlays/rpi-poe-plus.dtbo

is distinct in its older content.
Be warned that the sys-utils/rpi-firmware port installs a
couple of files that are not based on
https://github.com/raspberrypi/ materials:

# ls -Tld /boot/efi/armstub8*
-rwxr-xr-x  1 root  wheel  5888 Apr 20 19:25:22 2022 /boot/efi/armstub8-gic.bin
-rwxr-xr-x  1 root  wheel  5888 Apr 20 19:25:22 2022 /boot/efi/armstub8.bin
(I was only showing the file naming. I used a more modern
context to do that, which may have been confusing. Ignore
the dates for those 2 files and that I used a mount point
for where they are placed for live use.)

Be sure to keep those 2 files in place (for at least
armstub8-gic.bin ). A similar point goes for your
config.txt .

      
===
Mark Millard
marklmi at yahoo.com

--------------tgznBgeoe1oP6togsuOi0lFv-- From nobody Sat May 13 08:28:18 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJJgT5kM0z4B6PW for ; Sat, 13 May 2023 08:28:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-23.consmr.mail.gq1.yahoo.com (sonic304-23.consmr.mail.gq1.yahoo.com [98.137.68.204]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QJJgN21Pcz3QvC for ; Sat, 13 May 2023 08:28:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=asvvUpr1; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.204 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683966510; bh=VDddJIAAnMH5d/BEu9R1EHrYC0J4fIKkhdMRucrLgY4=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=asvvUpr10nA8EPdl237vT74Vpxg4/WHdEk36ykb3dG3CIYcNGOnD0ftOSV60p9qCWTF9eXAb5jlWyvevP7vWVEUPQP4nJOzyl5QaIM8k9pX441OuWKluYqQuUOMJ1rh5/cltjVZrUSZA4Ubp/j9MbeUHLjL7UL6QlCAIW4R4C7WQ3YNc3IjvfAgFoDqhunTenNWhwqeknRrr7R2Faln04Vc5VMr7htf/vPkRSS4m6Pzqn+FT0h444rvpbQIXjG8JlWWYTpHPCp2ADvyDh4bbZcObgVsSuG6EeOz0ZPJEjcE21Y9uwyS5mltRPB0sLijeIOr8drEj+gGB8Dm5bEHR/w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683966510; bh=2zI1YJVxCPa/+FRH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NfX5koCi WZHtMM3H9TBTnktbinz01zHkJsZJOHVUgcDu826xp8qBRqmwwUod1MmUUQt1auKTc_pjqE1VkLEX zGo4RDAgbEw.PMxDV7E5Z_r3VfyqKyIU2woOb4.Sfe4j7qLVf_XJJTpvAhD.5UDS6_tBGGfCDdDJ KxOO7yKJglZ8oZ6dBRe3TDRTJ1FrBvvIQVJTHoPosrga0rYJon2hvZE4W21TYIAqIKtNR5.nty8v ycobtX0Uxo8JNGDmxZvIzY99coje_OGthQ8Bu8WSuAf97QM8zNUYNHqQot3pBw8ZY0xOn1_lwtYk Nf.yrC8kcok6TRJpneFwlQM9VrijSjk0HpBDwjD2mPlQSaYMQcimhp11ZbEI74tzancBtgan2ecm _lZijaxzlNNTHoS0fymMtfV2rRGtZHzC1w_x4qnvCnRBe67xbpnoYaWJVtQ26hf.0EBnTuperJZm MaaOriK7hTcABZc7GOJD3qIAmvQ7zYkxpJh1d7ldRtlYwOsEtPkME0Aq6tG4gaN2R.mr7OTWUlUP ghUlp06lLRPuAPF9QnYa7L68JODI31Brza8HyXJj0VHi6GSK5amSXIUli9y_c X-Sonic-MF: X-Sonic-ID: c1068968-3059-4aff-aab4-6e1b37b558e0 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sat, 13 May 2023 08:28:30 +0000 Received: by hermes--production-gq1-6db989bfb-c6sbx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 3a52a5be89c98dcf2c231d7500a0228b; Sat, 13 May 2023 08:28:29 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: -mcpu= selections and the Windows Dev Kit 2023: example from-scratch buildkernel times (after kernel-toolchain) Message-Id: <3B5EB0DD-E9CB-41BD-9BCC-6549BBF0C0DA@yahoo.com> Date: Sat, 13 May 2023 01:28:18 -0700 To: freebsd-arm X-Mailer: Apple Mail (2.3731.400.51.1.1) References: <3B5EB0DD-E9CB-41BD-9BCC-6549BBF0C0DA.ref@yahoo.com> X-Spamd-Result: default: False [-3.38 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.89)[-0.885]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.204:from]; BLOCKLISTDE_FAIL(0.00)[98.137.68.204:query timed out]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.204:from] X-Rspamd-Queue-Id: 4QJJgN21Pcz3QvC X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N While the selections were guided by some benchmark like explorations, the results for the Windows Dev Kit 2023 (WDK23 abbreviation) go like: -mcpu=3Dcortex-a72 code generation produced a (non-debug) kernel/world that, in turn, got (from scratch buildkernel after kernel-toolchain): Kernel(s) GENERIC-NODBG-CA72 built in 597 seconds, ncpu: 8, make -j8 (The rest of the aarch64 that I've access to is nearly-all cortex-a72 based, the others being cortex-a53 these days. So I was seeing how code tailored for the cortex-a72 context performed on the WDK23. cortex-a72 was my starting point with the WDK23.) -mcpu=3Dcortex-x1c+flagm code generation produced a (non-debug) kernel/world that, in turn, got (from scratch buildkernel after kernel-toolchain): Kernel(s) GENERIC-NODBG-CA78C built in 584 seconds, ncpu: 8, make -j8 NOTE: "+flagm" is because of various clang/gcc having an inaccurate set of features that omit flagm --and I'm making sure I've got it enabled. -mcpu=3Dcortex-a78c is even worse: it has examples of +fp16fml by default in some toolchains --but neither of the 2 types of core has support for such. (The cortex-x1c and cortex-a78c actually have matching features for code generation purposes, at least for all that I looked at. Toolchain mismatches for default features are sufficient evidence of an error in at least one case as far as I can tell.) This context is implicitly +lse+rcpc . At the time I was not being explicit when defaults matched. Notes: "lse" is the large system extension atomics, disabled below. "rcpc" is the extension having load acquire and store release instructions. (rcpc I was explicit about below, despite the default matching.) -mcpu=3Dcortex-x1c+flagm+nolse+rcpc code generation produced a (non-debug) kernel/world that, in turn, got (from scratch buildkernel after kernel-toolchain): Kernel(s) GENERIC-NODBG-CA78CnoLSE built in 415 seconds, ncpu: 8, make = -j Note: My explorations so far have tried the world combinations of lse and rcpc status but with a kernel that was based on -mcpu=3Dcortex-x1c+flagm . I then updated the kernel to match the -mcpu=3Dcortex-x1c+flagm+nolse+rcpc and used it to produce the above. So there is more exploring that I've not done yet. But I'm not expecting decreases to notably below the 415 sec. The benchmark like activity had showed that +lse+rcpc for the world/benchmark builds lead to notable negative consequences for cpus 0..3 compared to the other 3 combinations of status. For cpus 4..7, it showed that +nolse+rcpc for the world/benchmark builds had a noticeable gain compared to the other 3 combinations. This guided the buildkernel testing selections done so far. The buildkernel tests were, in part, to be sure that the apparent consequences were not just odd consequences for time measurements that could mess up benchmark result comparisons being useful. For comparison to a standard FreeBSD non-debug build, I used a snapshot download of: = http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/13.2/FreeBSD-13.2= -STABLE-arm64-aarch64-ROCK64-20230504-7dea7445ba44-255298.img.xz and dd'd it to media, replaced the EFI/*/* with ones that work for the Windows Dev Kit 2023, booted the WDK23 with the media, copied over my /usr/*-src/ to the media, did a "make -j8 = kernel-toolchain", from the /usr/main-src/ copy and finally did a "make -j8 buildkernel" (so, from-scratch, given the toolchain materials are already in place): Kernel(s) GENERIC built in 505 seconds, ncpu: 8, make -j8 ( /usr/main-src/ has the source that the other buildkernel timings were based on. ) Looks like -mcpu=3Dcortex-a72 and -mcpu=3Dcortex-x1c+flagm are far from a good fit for buildkernel workloads to run under on the WDK23. FreeBSD defaults and -mcpu=3Dcortex-x1c+flagm+nolse+rcpc seems to be better fits for such use. Note: This testing was in a ZFS context, using bectl to advantage, in case that somehow matters. For reference: # grep mcpu=3D /usr/main-src/sys/arm64/conf/GENERIC-NODBG-CA78C makeoptions CONF_CFLAGS=3D"-mcpu=3Dcortex-x1c+flagm+nolse+rcpc" # grep mcpu=3D ~/src.configs/*CA78C-nodbg* XCFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc XCXXFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc ACFLAGS.arm64cpuid.S+=3D -mcpu=3Dcortex-x1c ACFLAGS.aesv8-armx.S+=3D -mcpu=3Dcortex-x1c ACFLAGS.ghashv8-armx.S+=3D -mcpu=3Dcortex-x1c # more /usr/local/etc/poudriere.d/main-CA78C-make.conf CFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc CXXFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc CPPFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc RUSTFLAGS_CPU_FEATURES=3D -C target-cpu=3Dcortex-x1c -C = target-feature=3D+x1c,+flagm,-lse,+rcpc diff --git a/secure/lib/libcrypto/Makefile = b/secure/lib/libcrypto/Makefile index 8fde4f19d046..e13227d6450b 100644 --- a/secure/lib/libcrypto/Makefile +++ b/secure/lib/libcrypto/Makefile @@ -22,7 +22,7 @@ SRCS+=3D mem.c mem_dbg.c mem_sec.c o_dir.c = o_fips.c o_fopen.c o_init.c SRCS+=3D o_str.c o_time.c threads_pthread.c uid.c .if defined(ASM_aarch64) SRCS+=3D arm64cpuid.S armcap.c -ACFLAGS.arm64cpuid.S=3D -march=3Darmv8-a+crypto +ACFLAGS.arm64cpuid.S+=3D -march=3Darmv8-a+crypto .elif defined(ASM_amd64) SRCS+=3D x86_64cpuid.S .elif defined(ASM_arm) @@ -43,7 +43,7 @@ SRCS+=3D mem_clr.c SRCS+=3D aes_cbc.c aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c = aes_wrap.c .if defined(ASM_aarch64) SRCS+=3D aes_core.c aesv8-armx.S vpaes-armv8.S -ACFLAGS.aesv8-armx.S=3D -march=3Darmv8-a+crypto +ACFLAGS.aesv8-armx.S+=3D -march=3Darmv8-a+crypto .elif defined(ASM_amd64) SRCS+=3D aes_core.c aesni-mb-x86_64.S aesni-sha1-x86_64.S = aesni-sha256-x86_64.S SRCS+=3D aesni-x86_64.S vpaes-x86_64.S @@ -278,7 +278,7 @@ SRCS+=3D cbc128.c ccm128.c cfb128.c ctr128.c = cts128.c gcm128.c ocb128.c SRCS+=3D ofb128.c wrap128.c xts128.c .if defined(ASM_aarch64) SRCS+=3D ghashv8-armx.S -ACFLAGS.ghashv8-armx.S=3D -march=3Darmv8-a+crypto +ACFLAGS.ghashv8-armx.S+=3D -march=3Darmv8-a+crypto =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sat May 13 08:50:15 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJK8l6LNXz4B6q1 for ; Sat, 13 May 2023 08:50:31 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-23.consmr.mail.gq1.yahoo.com (sonic312-23.consmr.mail.gq1.yahoo.com [98.137.69.204]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QJK8k4Jfcz3jNW for ; Sat, 13 May 2023 08:50:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=jpyXiiPW; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.204 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683967829; bh=8eA/jZqKf9QIsDG63Y/20WFmKomYQ5T67/CS/Z7tEfM=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=jpyXiiPWM8BbORiVHNeZXgg9huzqeR8kquvJF1yefIJTVfMooFTPQOb4qaD7z8DKYO9TBCx97+BHKCn7iNSpyLFR8WB/NKO7+sLrced1na6zHgYRyMrreXpsVkH3z+RiE5Os13cV6mlAke3QP6uL935two9O6l6BthHC5ReNgX/CRVRfJQmumDTCghR21cJb3+RPaEgg/FSZ0AbEo8bV/ZKCIOkHkXr7s+EBSKbHHqgRvpukU8Wxc9ee3yVkLg7JmwAzqIGYs3/+gSLa6pIXB8yXTPogQutzluAHih8/x4uJwx4O1g+AkGw9fHVEtQapxqD0K9GmoUkUZ6C1TOUbtg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1683967829; bh=i2JrllOgmwJO2sXxlTU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vPqdEDq TFZLKzrZRcPwllaqWIu.A29BbYNBpcuozlfnnz8pwp0rT5ahcI3VKCV4djX4RS.MTJQJ83Q7mjsu haPfl4HLP8WYZFKGf.0SwpRRkIQcH1B_fph8029_hoH7sal4SYHKaGSLjNdSgNniExMjQKKSt_Y1 .HZXE7T2D.9SrfOXiMA8snAY5YLyLPHqtrnwPAt5Oq7hGe404NtAFGjL9o3k6aZ4I7oObg046RNd xXud9MPYILE4f30f5_V_H6slet6hvpZEcSqATbBF8n6QBKWJvmJfO7jV5vwuE4PKFOpEiUTaeh6h yP9CFA04RTL1zDQGHb1hi.kgUbzEBi.pFM9U4R9jhLhZhbcxMaSuVbHBX0vHKO9ex7HKMwSlNNsV DFDa9lZJZqrZUNaN.aRKH55tzIKkGkzlXzW50ZIkZS4d3hJAz8itfvPECb36zSQx99igZms9QGFP BVA9ixEt6IYcWbVAJtjAubBKkDv6Krurov4UTjjNat0MW50kml0zOGojKmlX4I2lCs6DUZLMSjYm d6g5f3EetTnStRyZM8VfViAODkH_w4D_BMWQiEjsavBL.1LuT22nYq4bsNP9Q970H X-Sonic-MF: X-Sonic-ID: dddb7d07-64f6-4feb-aaf3-8227d9b11f7b Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Sat, 13 May 2023 08:50:29 +0000 Received: by hermes--production-bf1-54475bbfff-xzdff (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 06e40dfe4d8af3f12cbd23f2601f9b79; Sat, 13 May 2023 08:50:27 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: -mcpu= selections and the Windows Dev Kit 2023: example from-scratch buildkernel times (after kernel-toolchain) Date: Sat, 13 May 2023 01:50:15 -0700 References: <3B5EB0DD-E9CB-41BD-9BCC-6549BBF0C0DA@yahoo.com> To: freebsd-arm In-Reply-To: <3B5EB0DD-E9CB-41BD-9BCC-6549BBF0C0DA@yahoo.com> Message-Id: <6196193E-4A75-464C-AB0B-AE2C3BC00D66@yahoo.com> X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spamd-Result: default: False [-3.29 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; NEURAL_HAM_SHORT(-0.80)[-0.796]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; BLOCKLISTDE_FAIL(0.00)[98.137.69.204:server fail]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.204:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4QJK8k4Jfcz3jNW X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On May 13, 2023, at 01:28, Mark Millard wrote: > While the selections were guided by some benchmark like > explorations, the results for the Windows Dev Kit 2023 > (WDK23 abbreviation) go like: >=20 >=20 > -mcpu=3Dcortex-a72 code generation produced a (non-debug) > kernel/world that, in turn, got (from scratch buildkernel after > kernel-toolchain): >=20 > Kernel(s) GENERIC-NODBG-CA72 built in 597 seconds, ncpu: 8, make -j8 >=20 > (The rest of the aarch64 that I've access to is nearly-all cortex-a72 > based, the others being cortex-a53 these days. So I was seeing how > code tailored for the cortex-a72 context performed on the WDK23. > cortex-a72 was my starting point with the WDK23.) >=20 >=20 > -mcpu=3Dcortex-x1c+flagm code generation produced a (non-debug) > kernel/world that, in turn, got (from scratch buildkernel after > kernel-toolchain): >=20 > Kernel(s) GENERIC-NODBG-CA78C built in 584 seconds, ncpu: 8, make -j8 >=20 > NOTE: "+flagm" is because of various clang/gcc having an inaccurate > set of features that omit flagm --and I'm making sure I've got it > enabled. -mcpu=3Dcortex-a78c is even worse: it has examples of = +fp16fml > by default in some toolchains --but neither of the 2 types of core has > support for such. (The cortex-x1c and cortex-a78c actually have = matching > features for code generation purposes, at least for all that I looked > at. Toolchain mismatches for default features are sufficient evidence > of an error in at least one case as far as I can tell.) >=20 > This context is implicitly +lse+rcpc . At the time I was not being > explicit when defaults matched. >=20 > Notes: > "lse" is the large system extension atomics, disabled below. > "rcpc" is the extension having load acquire and store release > instructions. (rcpc I was explicit about below, despite the > default matching.) >=20 >=20 > -mcpu=3Dcortex-x1c+flagm+nolse+rcpc code generation produced a > (non-debug) kernel/world that, in turn, got (from scratch buildkernel > after kernel-toolchain): >=20 > Kernel(s) GENERIC-NODBG-CA78CnoLSE built in 415 seconds, ncpu: 8, = make -j >=20 > Note: My explorations so far have tried the world combinations of > lse and rcpc status but with a kernel that was based on > -mcpu=3Dcortex-x1c+flagm . I then updated the kernel to match the > -mcpu=3Dcortex-x1c+flagm+nolse+rcpc and used it to produce the above. > So there is more exploring that I've not done yet. But I'm not > expecting decreases to notably below the 415 sec. >=20 > The benchmark like activity had showed that +lse+rcpc for the > world/benchmark builds lead to notable negative consequences for > cpus 0..3 compared to the other 3 combinations of status. For > cpus 4..7, it showed that +nolse+rcpc for the world/benchmark > builds had a noticeable gain compared to the other 3 combinations. > This guided the buildkernel testing selections done so far. The > buildkernel tests were, in part, to be sure that the apparent > consequences were not just odd consequences for time measurements > that could mess up benchmark result comparisons being useful. >=20 >=20 > For comparison to a standard FreeBSD non-debug build, I used a > snapshot download of: >=20 > = http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/13.2/FreeBSD-13.2= -STABLE-arm64-aarch64-ROCK64-20230504-7dea7445ba44-255298.img.xz >=20 > and dd'd it to media, replaced the EFI/*/* with ones that > work for the Windows Dev Kit 2023, booted the WDK23 with the media, > copied over my /usr/*-src/ to the media, did a "make -j8 = kernel-toolchain", > from the /usr/main-src/ copy and finally did a "make -j8 buildkernel" > (so, from-scratch, given the toolchain materials are already in = place): >=20 > Kernel(s) GENERIC built in 505 seconds, ncpu: 8, make -j8 >=20 > ( /usr/main-src/ has the source that the other buildkernel timings > were based on. ) >=20 >=20 > Looks like -mcpu=3Dcortex-a72 and -mcpu=3Dcortex-x1c+flagm are far = from > a good fit for buildkernel workloads to run under on the WDK23. = FreeBSD > defaults and -mcpu=3Dcortex-x1c+flagm+nolse+rcpc seems to be better = fits > for such use. >=20 >=20 > Note: This testing was in a ZFS context, using bectl to advantage, in > case that somehow matters. >=20 >=20 > For reference: >=20 > # grep mcpu=3D /usr/main-src/sys/arm64/conf/GENERIC-NODBG-CA78C > makeoptions CONF_CFLAGS=3D"-mcpu=3Dcortex-x1c+flagm+nolse+rcpc" >=20 > # grep mcpu=3D ~/src.configs/*CA78C-nodbg* > XCFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc > XCXXFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc > ACFLAGS.arm64cpuid.S+=3D -mcpu=3Dcortex-x1c > ACFLAGS.aesv8-armx.S+=3D -mcpu=3Dcortex-x1c > ACFLAGS.ghashv8-armx.S+=3D -mcpu=3Dcortex-x1c >=20 > # more /usr/local/etc/poudriere.d/main-CA78C-make.conf > CFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc > CXXFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc > CPPFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc > RUSTFLAGS_CPU_FEATURES=3D -C target-cpu=3Dcortex-x1c -C = target-feature=3D+x1c,+flagm,-lse,+rcpc Note: RUSTFLAGS_CPU_FEATURES is something that I added to my environment to allow the experiment: # git -C /usr/ports/ diff Mk/Uses/cargo.mk diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index 50146372fee1..2f21453fd02b 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -145,7 +145,9 @@ WITH_LTO=3D yes . endif # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk -. if ${ARCH} =3D=3D amd64 || ${ARCH} =3D=3D i386 +. if defined(RUSTFLAGS_CPU_FEATURES) +RUSTFLAGS+=3D ${RUSTFLAGS_CPU_FEATURES} +. elif ${ARCH} =3D=3D amd64 || ${ARCH} =3D=3D i386 RUSTFLAGS+=3D ${CFLAGS:M-march=3D*:S/-march=3D/-C target-cpu=3D/} . elif ${ARCH:Mpowerpc*} RUSTFLAGS+=3D ${CFLAGS:M-mcpu=3D*:S/-mcpu=3D/-C = target-cpu=3D/:S/power/pwr/} > diff --git a/secure/lib/libcrypto/Makefile = b/secure/lib/libcrypto/Makefile > index 8fde4f19d046..e13227d6450b 100644 > --- a/secure/lib/libcrypto/Makefile > +++ b/secure/lib/libcrypto/Makefile > @@ -22,7 +22,7 @@ SRCS+=3D mem.c mem_dbg.c mem_sec.c o_dir.c = o_fips.c o_fopen.c o_init.c > SRCS+=3D o_str.c o_time.c threads_pthread.c uid.c > .if defined(ASM_aarch64) > SRCS+=3D arm64cpuid.S armcap.c > -ACFLAGS.arm64cpuid.S=3D -march=3Darmv8-a+crypto > +ACFLAGS.arm64cpuid.S+=3D -march=3Darmv8-a+crypto > .elif defined(ASM_amd64) > SRCS+=3D x86_64cpuid.S > .elif defined(ASM_arm) > @@ -43,7 +43,7 @@ SRCS+=3D mem_clr.c > SRCS+=3D aes_cbc.c aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c = aes_wrap.c > .if defined(ASM_aarch64) > SRCS+=3D aes_core.c aesv8-armx.S vpaes-armv8.S > -ACFLAGS.aesv8-armx.S=3D -march=3Darmv8-a+crypto > +ACFLAGS.aesv8-armx.S+=3D -march=3Darmv8-a+crypto > .elif defined(ASM_amd64) > SRCS+=3D aes_core.c aesni-mb-x86_64.S aesni-sha1-x86_64.S = aesni-sha256-x86_64.S > SRCS+=3D aesni-x86_64.S vpaes-x86_64.S > @@ -278,7 +278,7 @@ SRCS+=3D cbc128.c ccm128.c cfb128.c ctr128.c = cts128.c gcm128.c ocb128.c > SRCS+=3D ofb128.c wrap128.c xts128.c > .if defined(ASM_aarch64) > SRCS+=3D ghashv8-armx.S > -ACFLAGS.ghashv8-armx.S=3D -march=3Darmv8-a+crypto > +ACFLAGS.ghashv8-armx.S+=3D -march=3Darmv8-a+crypto =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Sat May 13 12:45:55 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJQNc1vS4z4BLf3 for ; Sat, 13 May 2023 12:46:08 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QJQNc0PbDz43qk for ; Sat, 13 May 2023 12:46:08 +0000 (UTC) (envelope-from dfr@rabson.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-55a1462f9f6so107542657b3.3 for ; Sat, 13 May 2023 05:46:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabson-org.20221208.gappssmtp.com; s=20221208; t=1683981967; x=1686573967; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UkuF+uhc9dQpSPfeKTJzZOx7hkCpO7yrR0KiAOx/C2w=; b=0jlr6AQmfVb7RYjCEad/A4++Yq5QzKoZ6KqX5PQr9ckCA1JeizqNYgo2gmR7RWs5f0 UJhTgg6L8W7OJeryk8A3w5Ydq+EfC7LrCOItyqD4Ln368zkJO2S8y3l4QE8RwPK9eBU7 A7RfLAe2emVuhXRhpm5SLgGnZ8fPF+xGIeC3c/W7L0tuPxbfDYp2Z0OKOTOXbUQpPweR zZgH6i2YpaQ3YYD8x3qcm+GwL8J5t4HIAk6kQEzqYq6/VK/cmGuAQUdZa8rgmkThJMAB V4DIJItNjCJr4Lnn1jcL8Wnn0a0e6bJXAQA1Gn4Pk1dMaTwdgRLpPkZOiRnS1tHy6F/5 sVeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683981967; x=1686573967; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UkuF+uhc9dQpSPfeKTJzZOx7hkCpO7yrR0KiAOx/C2w=; b=JFb0UgU6ChyXdmUQj4rgg975EZAEML+Hp1iPVBdRMsd1Cj7vn/pVST/ds/OT8V7NaQ gWf2PIqQmAC3TivU4OH7bFvsbNlYuXGzoaKuE1ziSTMDb10sldirsml0N1i1s8cQrtrk kbC02HnYeNCWS55jHLTB3QaSgrc+BSbA/xIUy9YWyYdBjpsH5vhXwF4cfsDbV56+lkWN i+n264hsga1iA4QjOfkeYTinh4g7PiQJlF/Aq0KQhPP96QHb/LLee1gFeMuWhzmuDKQS l0rU7XhDqQ5KvaUfOM7wKxQTW0JdrXPGpsGs+h9R1mhXy6YQKgXSg4G6t8n0/IsLZPey 0J6A== X-Gm-Message-State: AC+VfDz9hbjX27dW/D5FQ038MlQKuAMcoumeot8EKUnX32X/Vqnsw6CF pmAZYpJ79x1vPy+myUubT7cv4z5RJOXmb5nCn9Z4iQyd/atQgxO0HtSa6w== X-Google-Smtp-Source: ACHHUZ7vrtZMtSf1DgdGSWqziVmX0Lzift0K5O5XBEBv1SAbv92Tm04bJMvmufqw5byfvH/mbT6hhFlHtlXColDmbnU= X-Received: by 2002:a25:6906:0:b0:ba7:36de:754e with SMTP id e6-20020a256906000000b00ba736de754emr2878529ybc.9.1683981966771; Sat, 13 May 2023 05:46:06 -0700 (PDT) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <77CD0716-3BC8-47EB-8743-F2BD9CA43D31@yahoo.com> <432A1A16-9FE5-4339-AB38-8F3E03A5D4EF@yahoo.com> In-Reply-To: <432A1A16-9FE5-4339-AB38-8F3E03A5D4EF@yahoo.com> From: Doug Rabson Date: Sat, 13 May 2023 13:45:55 +0100 Message-ID: Subject: Re: Raspberry Pi POE+ hat overlay To: Mark Millard Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000f01f5405fb929a0b" X-Rspamd-Queue-Id: 4QJQNc0PbDz43qk X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000f01f5405fb929a0b Content-Type: text/plain; charset="UTF-8" I was able to build an updated rpi-firmware port based on 1.20210805 and this boots successfully on pi400 as well as rpi4. With this, I can load the rpi-poe-plus overlay and I just need to try and reverse engineer the undocumented mailbox API by reading the Linux code. diff --git a/sysutils/rpi-firmware/Makefile b/sysutils/rpi-firmware/Makefile index e82ab20ebc74..4fbb5df6d743 100644 --- a/sysutils/rpi-firmware/Makefile +++ b/sysutils/rpi-firmware/Makefile @@ -1,5 +1,5 @@ PORTNAME= rpi-firmware -PORTVERSION= 1.20210303.g20210303 +PORTVERSION= 1.20210805.g20210805 CATEGORIES= sysutils MAINTAINER= uboot@FreeBSD.org @@ -17,7 +17,7 @@ USE_GITHUB= yes GH_ACCOUNT= raspberrypi gonzoua:pscimon GH_PROJECT= firmware rpi3-psci-monitor:pscimon -FW_TAG= fcf8d2f +FW_TAG= 8939bde PSCI_TAG= 558620c GH_TAGNAME= ${FW_TAG} ${PSCI_TAG}:pscimon diff --git a/sysutils/rpi-firmware/distinfo b/sysutils/rpi-firmware/distinfo index 2e1e0c92066a..27a0eb8c9fa3 100644 --- a/sysutils/rpi-firmware/distinfo +++ b/sysutils/rpi-firmware/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1614939753 -SHA256 (raspberrypi-firmware-1.20210303.g20210303-fcf8d2f_GH0.tar.gz) = 5a0d7247490e0207f0fc32baabcec25a0e97ebdab9cbee216bf9537a1de22e69 -SIZE (raspberrypi-firmware-1.20210303.g20210303-fcf8d2f_GH0.tar.gz) = 192233875 +TIMESTAMP = 1683975782 +SHA256 (raspberrypi-firmware-1.20210805.g20210805-8939bde_GH0.tar.gz) = 2069df5b1dff340c78e393e4cc10feba395524d26cf5db475876d62b7a0507b2 +SIZE (raspberrypi-firmware-1.20210805.g20210805-8939bde_GH0.tar.gz) = 193244754 SHA256 (gonzoua-rpi3-psci-monitor-558620c_GH0.tar.gz) = 7621db7933eedaa17a03c282ef8a50be597bd14366149dfa93172d1b3985dbb7 SIZE (gonzoua-rpi3-psci-monitor-558620c_GH0.tar.gz) = 5614 diff --git a/sysutils/rpi-firmware/pkg-plist b/sysutils/rpi-firmware/pkg-plist index 7661a0a13cb2..02a41640a0be 100644 --- a/sysutils/rpi-firmware/pkg-plist +++ b/sysutils/rpi-firmware/pkg-plist @@ -183,6 +183,7 @@ %%DATADIR%%/overlays/rpi-display.dtbo %%DATADIR%%/overlays/rpi-ft5406.dtbo %%DATADIR%%/overlays/rpi-poe.dtbo +%%DATADIR%%/overlays/rpi-poe-plus.dtbo %%DATADIR%%/overlays/rpi-proto.dtbo %%DATADIR%%/overlays/rpi-sense.dtbo %%DATADIR%%/overlays/rpi-tv.dtbo On Fri, 12 May 2023 at 18:41, Mark Millard wrote: > On May 12, 2023, at 10:19, Mark Millard wrote: > > > On May 12, 2023, at 10:11, Mark Millard wrote: > > > >> On May 12, 2023, at 09:38, Doug Rabson wrote: > >> > >>> On Fri, 12 May 2023 at 17:27, Mark Millard wrote: > >>> On May 12, 2023, at 08:43, Doug Rabson wrote: > >>> > >>>> I have a pi4 with the official POE+ hat which I want to run FreeBSD > on. One thing I noticed is that the fan doesn't run in FreeBSD so I decided > to try and write a little driver for it. First step seems to be to load the > corresponding devicetree overlay by adding something like this to > /boot/msdos/config.txt: > >>>> > >>>> dtoverlay=rpi-poe-plus > >>>> dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000 > >>>> dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000 > >>>> dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000 > >>>> dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000 > >>>> > >>>> Unfortunately this is where I'm stuck - the overlay is not present in > the final DTB given to the kernel so there isn't anything to hook a driver > to. Are dtoverlays supposed to work on FreeBSD? > >>> > >>> The RPi* firwmare version that FreeBSD has in ports and uses > >>> in making snapshots and other images does not have that overlay: > >>> > >>> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi* > >>> -rw-r--r-- 1 root wheel 489 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo > >>> -rw-r--r-- 1 root wheel 4081 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo > >>> -rw-r--r-- 1 root wheel 643 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo > >>> -rw-r--r-- 1 root wheel 2574 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo > >>> -rw-r--r-- 1 root wheel 842 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo > >>> -rw-r--r-- 1 root wheel 2937 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo > >>> -rw-r--r-- 1 root wheel 771 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo > >>> -rw-r--r-- 1 root wheel 893 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo > >>> -rw-r--r-- 1 root wheel 567 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo > >>> -rw-r--r-- 1 root wheel 1226 Mar 3 05:29:57 2021 > /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo > >>> > >>> You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo . > >>> > >>> I copied the file from a rasbian install I had for another project. > Perhaps I should find the corresponding source for it and build it with the > device tree source from FreeBSD. > >>> > >>> You also do not mention what version of FreeBSD you are using > >>> on the RPi4B. The output of the command: > >>> > >>> I'm running 13.2-RELEASE-p0 > >> > >> That limits the range of firmware you can experiment with > >> but the following tagged vintages should be compatible and > >> also have an overlays/rpi-poe-plus.dtbo present: > >> > >> 1.20210527/boot/overlays/rpi-poe-plus.dtbo > >> 1.20210727/boot/overlays/rpi-poe-plus.dtbo > >> 1.20210805/boot/overlays/rpi-poe-plus.dtbo > >> > >> So extracting a consistent/full set of firmware and trying > >> it is a possibility. > >> > >> The first 3 tags links on: > >> > >> https://github.com/raspberrypi/linux/tags?after=1.20210831 > > That was likely a wasteful reference for me to supply. Trying > again: > > https://github.com/raspberrypi/firmware/tags?after=1.20210831 > > likely avoids ending up with a full set of linux materials > to go along with the firmware (smaller download with a smaller > expansion). > > >> are for the above 3 firmware versions. > >> > >> Anything newer will lead to a FreeBSD kernel crash for > >> 13.2-RELEASE-p0 due to mishandling the .dtb file that > >> would be used. > >> > >> As an example of what is in . . ./boot/ from one of those 3: > >> > >> # ls -Tld firmware-1.20210805/boot/* > >> -rw-rw-r-- 1 root wheel 18693 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/COPYING.linux > >> -rw-rw-r-- 1 root wheel 1594 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/LICENCE.broadcom > >> -rw-rw-r-- 1 root wheel 26401 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb > >> -rw-rw-r-- 1 root wheel 25749 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb > >> -rw-rw-r-- 1 root wheel 26138 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2708-rpi-b.dtb > >> -rw-rw-r-- 1 root wheel 26060 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2708-rpi-cm.dtb > >> -rw-rw-r-- 1 root wheel 27076 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb > >> -rw-rw-r-- 1 root wheel 25883 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2708-rpi-zero.dtb > >> -rw-rw-r-- 1 root wheel 27276 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb > >> -rw-rw-r-- 1 root wheel 27425 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb > >> -rw-rw-r-- 1 root wheel 29542 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb > >> -rw-rw-r-- 1 root wheel 28923 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb > >> -rw-rw-r-- 1 root wheel 27421 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb > >> -rw-rw-r-- 1 root wheel 49825 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb > >> -rw-rw-r-- 1 root wheel 49821 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2711-rpi-400.dtb > >> -rw-rw-r-- 1 root wheel 50499 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb > >> -rw-rw-r-- 1 root wheel 52456 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/bootcode.bin > >> -rw-rw-r-- 1 root wheel 7278 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup.dat > >> -rw-rw-r-- 1 root wheel 5407 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup4.dat > >> -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup4cd.dat > >> -rw-rw-r-- 1 root wheel 8416 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup4db.dat > >> -rw-rw-r-- 1 root wheel 8418 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup4x.dat > >> -rw-rw-r-- 1 root wheel 3211 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup_cd.dat > >> -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup_db.dat > >> -rw-rw-r-- 1 root wheel 10262 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/fixup_x.dat > >> drwxrwxr-x 2 root wheel 236 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/overlays > >> -rw-rw-r-- 1 root wheel 2959904 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start.elf > >> -rw-rw-r-- 1 root wheel 2235712 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start4.elf > >> -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start4cd.elf > >> -rw-rw-r-- 1 root wheel 3731528 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start4db.elf > >> -rw-rw-r-- 1 root wheel 2987720 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start4x.elf > >> -rw-rw-r-- 1 root wheel 799964 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start_cd.elf > >> -rw-rw-r-- 1 root wheel 4803496 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start_db.elf > >> -rw-rw-r-- 1 root wheel 3711432 Aug 5 04:11:18 2021 > firmware-1.20210805/boot/start_x.elf > > > > Note the lack of config.txt , armstub8-gic.bin , and > > armstub8.bin . > > > >> (I'll not list the overlays/* .) > >> > >> I've no clue to the consequences of mixing and matching > >> materials from different vintages of the firmware. It > >> does appear that: > >> > >> 1.20210727/boot/overlays/rpi-poe-plus.dtbo > >> 1.20210805/boot/overlays/rpi-poe-plus.dtbo > >> > >> (the newer 2 of th3 3) are the same by content but that: > >> > >> 1.20210527/boot/overlays/rpi-poe-plus.dtbo > >> > >> is distinct in its older content. > > > > Be warned that the sys-utils/rpi-firmware port installs a > > couple of files that are not based on > > https://github.com/raspberrypi/ materials: > > > > # ls -Tld /boot/efi/armstub8* > > -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 > /boot/efi/armstub8-gic.bin > > -rwxr-xr-x 1 root wheel 5888 Apr 20 19:25:22 2022 > /boot/efi/armstub8.bin > > > > Be sure to keep those 2 files in place (for at least > > armstub8-gic.bin ). A similar point goes for your > > config.txt . > > > === > Mark Millard > marklmi at yahoo.com > > --000000000000f01f5405fb929a0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I was able to build an updated rpi-firmware port based on = 1.20210805 and this boots successfully on pi400 as well as rpi4. With this,= I can load the rpi-poe-plus overlay and I just need to try and reverse eng= ineer the undocumented mailbox API by reading the Linux code.

diff --git a/sysutils/rpi-firmware/Makefile b/sysutils/rpi-firmware/M= akefile
index e82ab20ebc74..4fbb5df6d743 100644
--- a/sysutils/rpi-fi= rmware/Makefile
+++ b/sysutils/rpi-firmware/Makefile
@@ -1,5 +1,5 @@<= br>=C2=A0PORTNAME=3D rpi-firmware
-PORTVERSION=3D 1.20210303.g20210303+PORTVERSION=3D 1.20210805.g20210805
=C2=A0CATEGORIES=3D sysutils
<= br>=C2=A0MAINTAINER=3D uboot@FreeBSD.org
@@ -17,7 +17,7 @@ USE_GITHUB=3D= yes

=C2=A0GH_ACCOUNT=3D raspberrypi gonzoua:pscimon
=C2=A0GH_PRO= JECT=3D firmware rpi3-psci-monitor:pscimon
-FW_TAG=3D fcf8d2f
+FW_TA= G=3D 8939bde
=C2=A0PSCI_TAG=3D 558620c
=C2=A0GH_TAGNAME=3D ${FW_TAG}= ${PSCI_TAG}:pscimon

diff --git a/sysutils/rpi-firmware/distinfo b/s= ysutils/rpi-firmware/distinfo
index 2e1e0c92066a..27a0eb8c9fa3 100644--- a/sysutils/rpi-firmware/distinfo
+++ b/sysutils/rpi-firmware/distin= fo
@@ -1,5 +1,5 @@
-TIMESTAMP =3D 1614939753
-SHA256 (raspberrypi-= firmware-1.20210303.g20210303-fcf8d2f_GH0.tar.gz) =3D 5a0d7247490e0207f0fc3= 2baabcec25a0e97ebdab9cbee216bf9537a1de22e69
-SIZE (raspberrypi-firmware-= 1.20210303.g20210303-fcf8d2f_GH0.tar.gz) =3D 192233875
+TIMESTAMP =3D 16= 83975782
+SHA256 (raspberrypi-firmware-1.20210805.g20210805-8939bde_GH0.= tar.gz) =3D 2069df5b1dff340c78e393e4cc10feba395524d26cf5db475876d62b7a0507b= 2
+SIZE (raspberrypi-firmware-1.20210805.g20210805-8939bde_GH0.tar.gz) = =3D 193244754
=C2=A0SHA256 (gonzoua-rpi3-psci-monitor-558620c_GH0.tar.gz= ) =3D 7621db7933eedaa17a03c282ef8a50be597bd14366149dfa93172d1b3985dbb7
= =C2=A0SIZE (gonzoua-rpi3-psci-monitor-558620c_GH0.tar.gz) =3D 5614
diff = --git a/sysutils/rpi-firmware/pkg-plist b/sysutils/rpi-firmware/pkg-plistindex 7661a0a13cb2..02a41640a0be 100644
--- a/sysutils/rpi-firmware/pk= g-plist
+++ b/sysutils/rpi-firmware/pkg-plist
@@ -183,6 +183,7 @@
= =C2=A0%%DATADIR%%/overlays/rpi-display.dtbo
=C2=A0%%DATADIR%%/overlays/r= pi-ft5406.dtbo
=C2=A0%%DATADIR%%/overlays/rpi-poe.dtbo
+%%DATADIR%%/o= verlays/rpi-poe-plus.dtbo
=C2=A0%%DATADIR%%/overlays/rpi-proto.dtbo
= =C2=A0%%DATADIR%%/overlays/rpi-sense.dtbo
=C2=A0%%DATADIR%%/overlays/rpi= -tv.dtbo

On Fri, 12 May 2023 at 18:41, Mark Millard <marklmi@yahoo.com> wrote:
On May 12, 2023, at 10:19, Mark Millard <marklmi@yahoo.com> wrote:

> On May 12, 2023, at 10:11, Mark Millard <marklmi@yahoo.com> wrote:
>
>> On May 12, 2023, at 09:38, Doug Rabson <dfr@rabson.org> wrote:
>>
>>> On Fri, 12 May 2023 at 17:27, Mark Millard <marklmi@yahoo.com> wrote: >>> On May 12, 2023, at 08:43, Doug Rabson <dfr@rabson.org> wrote:
>>>
>>>> I have a pi4 with the official POE+ hat which I want to ru= n FreeBSD on. One thing I noticed is that the fan doesn't run in FreeBS= D so I decided to try and write a little driver for it. First step seems to= be to load the corresponding devicetree overlay by adding something like t= his to /boot/msdos/config.txt:
>>>>
>>>> dtoverlay=3Drpi-poe-plus
>>>> dtparam=3Dpoe_fan_temp0=3D45000,dtparam=3Dpoe_fan_temp0_hy= st=3D3000
>>>> dtparam=3Dpoe_fan_temp1=3D50000,dtparam=3Dpoe_fan_temp1_hy= st=3D3000
>>>> dtparam=3Dpoe_fan_temp2=3D62000,dtparam=3Dpoe_fan_temp2_hy= st=3D4000
>>>> dtparam=3Dpoe_fan_temp3=3D70000,dtparam=3Dpoe_fan_temp3_hy= st=3D5000
>>>>
>>>> Unfortunately this is where I'm stuck - the overlay is= not present in the final DTB given to the kernel so there isn't anythi= ng to hook a driver to. Are dtoverlays supposed to work on FreeBSD?
>>>
>>> The RPi* firwmare version that FreeBSD has in ports and uses >>> in making snapshots and other images does not have that overla= y:
>>>
>>> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi*
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0489 Mar=C2=A0 = 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo >>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 4081 Mar=C2=A0 3 05:= 29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo >>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0643 Mar=C2=A0 = 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2574 Mar=C2=A0 3 05:= 29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0842 Mar=C2=A0 = 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2937 Mar=C2=A0 3 05:= 29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0771 Mar=C2=A0 = 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0893 Mar=C2=A0 = 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0567 Mar=C2=A0 = 3 05:29:57 2021 /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo
>>> -rw-r--r--=C2=A0 1 root=C2=A0 wheel=C2=A0 1226 Mar=C2=A0 3 05:= 29:57 2021 /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo
>>>
>>> You do not mention establishing a copy of overlays/rpi-poe-plu= s.dtbo .
>>>
>>> I copied the file from a rasbian install I had for another pro= ject. Perhaps I should find the corresponding source for it and build it wi= th the device tree source from FreeBSD.
>>>
>>> You also do not mention what version of FreeBSD you are using<= br> >>> on the RPi4B. The output of the command:
>>>
>>> I'm running 13.2-RELEASE-p0
>>
>> That limits the range of firmware you can experiment with
>> but the following tagged vintages should be compatible and
>> also have an overlays/rpi-poe-plus.dtbo present:
>>
>> 1.20210527/boot/overlays/rpi-poe-plus.dtbo
>> 1.20210727/boot/overlays/rpi-poe-plus.dtbo
>> 1.20210805/boot/overlays/rpi-poe-plus.dtbo
>>
>> So extracting a consistent/full set of firmware and trying
>> it is a possibility.
>>
>> The first 3 tags links on:
>>
>> https://github.com/raspberrypi/= linux/tags?after=3D1.20210831

That was likely a wasteful reference for me to supply. Trying
again:

https://github.com/raspberrypi/firmwa= re/tags?after=3D1.20210831

likely avoids ending up with a full set of linux materials
to go along with the firmware (smaller download with a smaller
expansion).

>> are for the above 3 firmware versions.
>>
>> Anything newer will lead to a FreeBSD kernel crash for
>> 13.2-RELEASE-p0 due to mishandling the .dtb file that
>> would be used.
>>
>> As an example of what is in . . ./boot/ from one of those 3:
>>
>> # ls -Tld firmware-1.20210805/boot/*
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 18693 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/COPYING.linux
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A01594 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/LICENCE.broadcom
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 26401 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b-plus.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 25749 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b-rev1.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 26138 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-b.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 26060 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-cm.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 27076 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-zero-w.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 25883 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2708-rpi-zero.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 27276 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2709-rpi-2-b.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 27425 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-2-b.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 29542 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-3-b-plus.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 28923 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-3-b.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 27421 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2710-rpi-cm3.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 49825 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-4-b.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 49821 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-400.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 50499 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bcm2711-rpi-cm4.dtb
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 52456 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/bootcode.bin
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A07278 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/fixup.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A05407 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/fixup4.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A03211 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/fixup4cd.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A08416 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/fixup4db.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A08418 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/fixup4x.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A03211 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/fixup_cd.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 10262 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/fixup_db.dat
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0 10262 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/fixup_x.dat
>> drwxrwxr-x=C2=A0 2 root=C2=A0 wheel=C2=A0 =C2=A0 =C2=A0 236 Aug=C2= =A0 5 04:11:18 2021 firmware-1.20210805/boot/overlays
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2959904 Aug=C2=A0 5 04:1= 1:18 2021 firmware-1.20210805/boot/start.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2235712 Aug=C2=A0 5 04:1= 1:18 2021 firmware-1.20210805/boot/start4.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0799964 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/start4cd.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 3731528 Aug=C2=A0 5 04:1= 1:18 2021 firmware-1.20210805/boot/start4db.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 2987720 Aug=C2=A0 5 04:1= 1:18 2021 firmware-1.20210805/boot/start4x.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 =C2=A0799964 Aug=C2=A0 5= 04:11:18 2021 firmware-1.20210805/boot/start_cd.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 4803496 Aug=C2=A0 5 04:1= 1:18 2021 firmware-1.20210805/boot/start_db.elf
>> -rw-rw-r--=C2=A0 1 root=C2=A0 wheel=C2=A0 3711432 Aug=C2=A0 5 04:1= 1:18 2021 firmware-1.20210805/boot/start_x.elf
>
> Note the lack of config.txt , armstub8-gic.bin , and
> armstub8.bin .
>
>> (I'll not list the overlays/* .)
>>
>> I've no clue to the consequences of mixing and matching
>> materials from different vintages of the firmware. It
>> does appear that:
>>
>> 1.20210727/boot/overlays/rpi-poe-plus.dtbo
>> 1.20210805/boot/overlays/rpi-poe-plus.dtbo
>>
>> (the newer 2 of th3 3) are the same by content but that:
>>
>> 1.20210527/boot/overlays/rpi-poe-plus.dtbo
>>
>> is distinct in its older content.
>
> Be warned that the sys-utils/rpi-firmware port installs a
> couple of files that are not based on
> https://github.com/raspberrypi/ materials:
>
> # ls -Tld /boot/efi/armstub8*
> -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 5888 Apr 20 19:25:22 2022 /b= oot/efi/armstub8-gic.bin
> -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 5888 Apr 20 19:25:22 2022 /b= oot/efi/armstub8.bin
>
> Be sure to keep those 2 files in place (for at least
> armstub8-gic.bin ). A similar point goes for your
> config.txt .


=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--000000000000f01f5405fb929a0b-- From nobody Sat May 13 19:49:46 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QJbnl5l6tz4BjQ2 for ; Sat, 13 May 2023 19:50:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic315-55.consmr.mail.gq1.yahoo.com (sonic315-55.consmr.mail.gq1.yahoo.com [98.137.65.31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QJbnk3VXbz3q5X for ; Sat, 13 May 2023 19:50:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=MClAJ06K; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.31 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684007400; bh=D9ZZ98OvpP07rF5bUgqj3Nsj9a7XWRVajXmRYEQbgRo=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=MClAJ06KC5/PFrgowKqpkNQa2b9gGgFTiN9T1y2wsuQHRzNi9Ju5TrfFRNKAEIkd/8RtEQagUwXt6lW7PkUC7FWF0B+n2ns5g3gUuqLeCo0TBk0wnLij9ydNdlgL9aobrRNHoQGg+3pMU11p5Qar6+HoPHkH0UN7AFbcZegDdgk7HsHuS+8EUV3IaeeZFjN82GVVRge+pIehbXRS4RoVvrteIPu+QePmkWVww8e8ZqoiPp0sAoZdNYAy6IBGBM/IqLRNu0ayycYwd5DVC+o2RyFUNQYXMF+ft/fAnpIL2KdTNS7dAn3bF+f/tfpNhbL3qqRZaXr6VgTVe6uTAtlnBw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1684007400; bh=Vzcvk3hK/EDvanpWT8qr6UhEFYq9LeaCY4I1wFLG6V8=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=KUz8MKBknGEW0ffDuL3VuDI7LF0uQdHeyDXJdMkdkj/fu56NeTDTlf1u7xMGEfrLQ1MWqk9Eom6p6t1FGE832DHnYV26AKTDFRBdelN+rWHs/Gimboc0abDs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nEfzl_k4Fkp9DZUy9HelV1HsC6v1eeDxZTAKpc A5oLOth7TBWdX7I0WRyKioMNnoNstiJt68SgWYjSuIoMwJegrQiAi1ORMF0RdBwhcFYUxCxCWBHu mafPEVcuNFeSY.yKF_O_Iq6I_VLMCPrX3PSubFnMfktQytwz5ZY2is8MyqV.CFItU23TE5ZN3Y_O K1U4Pq0ypclQD2rfvziR6V3DtbBJ5AsT6JG5ihCLTuqqc9HbnR0NiVtvEuZY0NVu9Z.lsCvzQyPh IigJauSNmj5sITyKDLXCLMykpD4kJOJNqKfoYxBkXv53ycCE6y9lXusS7NNuSe2F0DJ.192zJKwq s_1IIjZWBosE6S7isCWjG5ach6pJ8tGbGDwy5b_RxRg_ZrZopwtBAgwqfyDcb_LTd X-Sonic-MF: X-Sonic-ID: 01ed7d9c-924a-45be-ba70-aa255590a955 Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.gq1.yahoo.com with HTTP; Sat, 13 May 2023 19:50:00 +0000 Received: by hermes--production-gq1-6db989bfb-ppvpv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 22e7a63e5ae8afac8b4854511822cc89; Sat, 13 May 2023 19:49:57 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: -mcpu= selections and the Windows Dev Kit 2023: example from-scratch buildkernel times (after kernel-toolchain) Date: Sat, 13 May 2023 12:49:46 -0700 References: <3B5EB0DD-E9CB-41BD-9BCC-6549BBF0C0DA@yahoo.com> <6196193E-4A75-464C-AB0B-AE2C3BC00D66@yahoo.com> To: freebsd-arm In-Reply-To: <6196193E-4A75-464C-AB0B-AE2C3BC00D66@yahoo.com> Message-Id: <049ED1F8-CA62-4564-8635-4EFCF008ED9D@yahoo.com> X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spamd-Result: default: False [-2.97 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.994]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; MV_CASE(0.50)[]; NEURAL_HAM_SHORT(-0.47)[-0.475]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.31:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org] X-Rspamd-Queue-Id: 4QJbnk3VXbz3q5X X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On May 13, 2023, at 01:50, Mark Millard wrote: > On May 13, 2023, at 01:28, Mark Millard wrote: >=20 >> While the selections were guided by some benchmark like >> explorations, the results for the Windows Dev Kit 2023 >> (WDK23 abbreviation) go like: >>=20 >>=20 >> -mcpu=3Dcortex-a72 code generation produced a (non-debug) >> kernel/world that, in turn, got (from scratch buildkernel after >> kernel-toolchain): >>=20 >> Kernel(s) GENERIC-NODBG-CA72 built in 597 seconds, ncpu: 8, make -j8 >>=20 >> (The rest of the aarch64 that I've access to is nearly-all cortex-a72 >> based, the others being cortex-a53 these days. So I was seeing how >> code tailored for the cortex-a72 context performed on the WDK23. >> cortex-a72 was my starting point with the WDK23.) >>=20 >>=20 >> -mcpu=3Dcortex-x1c+flagm code generation produced a (non-debug) >> kernel/world that, in turn, got (from scratch buildkernel after >> kernel-toolchain): >>=20 >> Kernel(s) GENERIC-NODBG-CA78C built in 584 seconds, ncpu: 8, make = -j8 >>=20 >> NOTE: "+flagm" is because of various clang/gcc having an inaccurate >> set of features that omit flagm --and I'm making sure I've got it >> enabled. -mcpu=3Dcortex-a78c is even worse: it has examples of = +fp16fml >> by default in some toolchains --but neither of the 2 types of core = has >> support for such. (The cortex-x1c and cortex-a78c actually have = matching >> features for code generation purposes, at least for all that I looked >> at. Toolchain mismatches for default features are sufficient evidence >> of an error in at least one case as far as I can tell.) >>=20 >> This context is implicitly +lse+rcpc . At the time I was not being >> explicit when defaults matched. >>=20 >> Notes: >> "lse" is the large system extension atomics, disabled below. >> "rcpc" is the extension having load acquire and store release >> instructions. (rcpc I was explicit about below, despite the >> default matching.) >>=20 >>=20 >> -mcpu=3Dcortex-x1c+flagm+nolse+rcpc code generation produced a >> (non-debug) kernel/world that, in turn, got (from scratch buildkernel >> after kernel-toolchain): >>=20 >> Kernel(s) GENERIC-NODBG-CA78CnoLSE built in 415 seconds, ncpu: 8, = make -j >>=20 >> Note: My explorations so far have tried the world combinations of >> lse and rcpc status but with a kernel that was based on >> -mcpu=3Dcortex-x1c+flagm . I then updated the kernel to match the >> -mcpu=3Dcortex-x1c+flagm+nolse+rcpc and used it to produce the above. >> So there is more exploring that I've not done yet. But I'm not >> expecting decreases to notably below the 415 sec. >>=20 >> The benchmark like activity had showed that +lse+rcpc for the >> world/benchmark builds lead to notable negative consequences for >> cpus 0..3 compared to the other 3 combinations of status. For >> cpus 4..7, it showed that +nolse+rcpc for the world/benchmark >> builds had a noticeable gain compared to the other 3 combinations. >> This guided the buildkernel testing selections done so far. The >> buildkernel tests were, in part, to be sure that the apparent >> consequences were not just odd consequences for time measurements >> that could mess up benchmark result comparisons being useful. >>=20 >>=20 >> For comparison to a standard FreeBSD non-debug build, I used a >> snapshot download of: >>=20 >> = http://ftp3.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/13.2/FreeBSD-13.2= -STABLE-arm64-aarch64-ROCK64-20230504-7dea7445ba44-255298.img.xz >>=20 >> and dd'd it to media, replaced the EFI/*/* with ones that >> work for the Windows Dev Kit 2023, booted the WDK23 with the media, >> copied over my /usr/*-src/ to the media, did a "make -j8 = kernel-toolchain", >> from the /usr/main-src/ copy and finally did a "make -j8 buildkernel" >> (so, from-scratch, given the toolchain materials are already in = place): >>=20 >> Kernel(s) GENERIC built in 505 seconds, ncpu: 8, make -j8 >>=20 >> ( /usr/main-src/ has the source that the other buildkernel timings >> were based on. ) >>=20 >>=20 >> Looks like -mcpu=3Dcortex-a72 and -mcpu=3Dcortex-x1c+flagm are far = from >> a good fit for buildkernel workloads to run under on the WDK23. = FreeBSD >> defaults and -mcpu=3Dcortex-x1c+flagm+nolse+rcpc seems to be better = fits >> for such use. >>=20 >>=20 >> Note: This testing was in a ZFS context, using bectl to advantage, in >> case that somehow matters. >>=20 >>=20 >> For reference: >>=20 >> # grep mcpu=3D /usr/main-src/sys/arm64/conf/GENERIC-NODBG-CA78C >> makeoptions CONF_CFLAGS=3D"-mcpu=3Dcortex-x1c+flagm+nolse+rcpc" >>=20 >> # grep mcpu=3D ~/src.configs/*CA78C-nodbg* >> XCFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc >> XCXXFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc >> ACFLAGS.arm64cpuid.S+=3D -mcpu=3Dcortex-x1c >> ACFLAGS.aesv8-armx.S+=3D -mcpu=3Dcortex-x1c >> ACFLAGS.ghashv8-armx.S+=3D -mcpu=3Dcortex-x1c >>=20 >> # more /usr/local/etc/poudriere.d/main-CA78C-make.conf >> CFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc >> CXXFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc >> CPPFLAGS+=3D -mcpu=3Dcortex-x1c+flagm+nolse+rcpc >> RUSTFLAGS_CPU_FEATURES=3D -C target-cpu=3Dcortex-x1c -C = target-feature=3D+x1c,+flagm,-lse,+rcpc >=20 > Note: RUSTFLAGS_CPU_FEATURES is something that I added to my > environment to allow the experiment: >=20 > # git -C /usr/ports/ diff Mk/Uses/cargo.mk > diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk > index 50146372fee1..2f21453fd02b 100644 > --- a/Mk/Uses/cargo.mk > +++ b/Mk/Uses/cargo.mk > @@ -145,7 +145,9 @@ WITH_LTO=3D yes > . endif > # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk > -. if ${ARCH} =3D=3D amd64 || ${ARCH} =3D=3D i386 > +. if defined(RUSTFLAGS_CPU_FEATURES) > +RUSTFLAGS+=3D ${RUSTFLAGS_CPU_FEATURES} > +. elif ${ARCH} =3D=3D amd64 || ${ARCH} =3D=3D i386 > RUSTFLAGS+=3D ${CFLAGS:M-march=3D*:S/-march=3D/-C target-cpu=3D/} > . elif ${ARCH:Mpowerpc*} > RUSTFLAGS+=3D ${CFLAGS:M-mcpu=3D*:S/-mcpu=3D/-C = target-cpu=3D/:S/power/pwr/} >=20 >> diff --git a/secure/lib/libcrypto/Makefile = b/secure/lib/libcrypto/Makefile >> index 8fde4f19d046..e13227d6450b 100644 >> --- a/secure/lib/libcrypto/Makefile >> +++ b/secure/lib/libcrypto/Makefile >> @@ -22,7 +22,7 @@ SRCS+=3D mem.c mem_dbg.c mem_sec.c o_dir.c = o_fips.c o_fopen.c o_init.c >> SRCS+=3D o_str.c o_time.c threads_pthread.c uid.c >> .if defined(ASM_aarch64) >> SRCS+=3D arm64cpuid.S armcap.c >> -ACFLAGS.arm64cpuid.S=3D -march=3Darmv8-a+crypto >> +ACFLAGS.arm64cpuid.S+=3D -march=3Darmv8-a+crypto >> .elif defined(ASM_amd64) >> SRCS+=3D x86_64cpuid.S >> .elif defined(ASM_arm) >> @@ -43,7 +43,7 @@ SRCS+=3D mem_clr.c >> SRCS+=3D aes_cbc.c aes_cfb.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c = aes_wrap.c >> .if defined(ASM_aarch64) >> SRCS+=3D aes_core.c aesv8-armx.S vpaes-armv8.S >> -ACFLAGS.aesv8-armx.S=3D -march=3Darmv8-a+crypto >> +ACFLAGS.aesv8-armx.S+=3D -march=3Darmv8-a+crypto >> .elif defined(ASM_amd64) >> SRCS+=3D aes_core.c aesni-mb-x86_64.S aesni-sha1-x86_64.S = aesni-sha256-x86_64.S >> SRCS+=3D aesni-x86_64.S vpaes-x86_64.S >> @@ -278,7 +278,7 @@ SRCS+=3D cbc128.c ccm128.c cfb128.c ctr128.c = cts128.c gcm128.c ocb128.c >> SRCS+=3D ofb128.c wrap128.c xts128.c >> .if defined(ASM_aarch64) >> SRCS+=3D ghashv8-armx.S >> -ACFLAGS.ghashv8-armx.S=3D -march=3Darmv8-a+crypto >> +ACFLAGS.ghashv8-armx.S+=3D -march=3Darmv8-a+crypto I'll probably not do any more exploring of kernel vs. world cortex-x1c/cortex-a78c feature use vs. not combinations. My "-mcpu=3Dcortex-x1c+flagm context" based from scratch build of my ports took somewhat over 15 hrs on the WDK23: [main-CA78C-default] [2023-05-10_01h26m04s] [committing:] Queued: 480 = Built: 480 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 0 = Time: 15:08:47 Beyond using a -mcpu=3Dcortex-x1c+flagm+nolse+rcpc based context now, I've also recently changed the build sequence to use 2 stages to help avoid a long-tail-of-build being largely one process at a time (single thread) time: poudriere bulk -jmain-CA78C -w -f ~/origins/build-first.txt poudriere bulk -jmain-CA78C -w -f ~/origins/CA78C-origins.txt # more ~/origins/build-first.txt=20 devel/binutils devel/boost-jam devel/llvm16 devel/llvm15 lang/rust (Actually my test was without boost-jam being listed. I added that after the test. I also later added PRIORITY_BOOST=3D"boost-libs" to etc/poudriere.conf . CA78C-origins.txt also lists those port origins, along with the rest of the things I explicitly want built.) The above, in my context, happens to lead to devel/boost-libs building in parallel with other activity. I use a high-load-average-allowed style of building ports into packages: ALLOW_MAKE_JOBS=3Dyes and the default number of builders, so up to 8 on the WDK23. Also: USE_TMPFS=3Dall (based on about 118 GiBytes of swap, so RAM+SWAP approx=3D 150 GiBytes. Observed swap use got up to a little under 13 GiBytes but was not thrashing.) (This style would not scale well at some point but works for what I have access to, even the ThreadRipper 1950X with its 128 GiBytes of RAM and 32 FreeBSD "cpus". It has more swap configured.) Those, combined with the -mcpu=3Dcortex-x1c+flagm+nolse+rcpc use, has from-scratch port builds down to a slightly over 10 hours on the WDK23: [main-CA78C-default] [2023-05-13_01h31m02s] [committing:] Queued: 99 = Built: 99 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 0 = Time: 05:53:58 [main-CA78C-default] [2023-05-13_07h25m03s] [committing:] Queued: 381 = Built: 381 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 0 Tobuild: 0 = Time: 04:07:07 This context was ZFS. I've not done a UFS-context test yet. =3D=3D=3D Mark Millard marklmi at yahoo.com