From nobody Wed May 22 16:50:23 2024 X-Original-To: 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 4Vky3f2HZTz5M2Cc for ; Wed, 22 May 2024 16:50:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-24.consmr.mail.gq1.yahoo.com (sonic304-24.consmr.mail.gq1.yahoo.com [98.137.68.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 4Vky3d6PFXz4bs5 for ; Wed, 22 May 2024 16:50:37 +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=1716396635; bh=QOXWWAsJpciT5xxCWyP5MYtz4q+Gf5zrHd+cWmKOMrM=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=OgVTdqt55B3aJJZ7Ra9iaSrN84UsSUrryHvSml8tvw2UfPR0iPD3nWdM1kg5MvwwW6k4ZdD2QO/B0VKxc4Yhxh8rvHtb5eZF7R7vqjnw34zBgqFoHYh3WiDuCUM7dBJtCXumpeoVy51WzJHQuRw89vMf9E7jOG0931ALVeBBxFSgbSEmf0KnkcHTgH0+31Pm1yjSBdQ3Uvq7sKf4D9owqqO6w/FKwqkvc3IhYNPl8+03/hqV8tJgT+QXIwpSfiUU96TvIbJPgMxL78hP8v8A95Z5++pbdJfigpJzY8OQZc1AV5Dm+PWj5Z/PfVAEK8JI5iJzXUZXbCtbL1ntHehy4A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1716396635; bh=DnhGSr5aQkIPLL5hM92hP5e9uY1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pxuAhT9_S6QNn19JrgxtgG9xRt7drzQxX9FEMXRtZ4iVif4n51YnjAqVdjr2 o8nDt4yIma3X4eTTwvvZuI4OG817AJgE9RoOM9ecmoEqA_t8glNAFgzod99l1IfeO2NiWLEEFFxm tBKbE.GobxcJXgd1UV5axPo6t6Gux6g103vlOBkqgE3i7wGM3UD7wPdTp56l2S.AD4byaE7WW9Pw t8PbgnJGuTV1obwzhsMkHczLFKeyj9Af_AHJL.rSWu.JtgKXgaS2bVKQiBb4B3vNvQzuvvkfFWL8 yynQGlG3YMDblzjIaV4ByS78kf0Ie4RGqq.TUZZa7Zv8TUeRB.du8yyNbZSWyO23Sm.6QNxHgkNH se30La106j4dTQZx3YtUBVPQ4G6DPDR4FtrZFxzGvpu3etX2B7JU.niKg3W41dKpPfQgSgL.2ibZ nxsVOs39_sHsZHGAlKq7zv7tFNDNBq2WS2zFY.9OmAYyHPPMNqzGJO5b3YtZVg44O6rzQwq3QRxo q2pCFZe6DjktP5YUNyb6biqqlIB2w0_pgU.fw5canTcUOuyIa4j5RBWhaEP0N7S3Jvh3Hz0yOgD. mpGdN X-Sonic-MF: X-Sonic-ID: d048bcd7-b90c-41f8-99f8-c4c949511345 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Wed, 22 May 2024 16:50:35 +0000 Received: by hermes--production-gq1-59c575df44-cc288 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6a72f9b7342eac815d4c81a282a5b99d; Wed, 22 May 2024 16:50:34 +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 \(3774.600.62\)) Subject: Re: vmm (bhyve) on GICv2 From: Mark Millard X-Priority: 3 (Normal) In-Reply-To: <1923834610.13708.1716392599662@localhost> Date: Wed, 22 May 2024 09:50:23 -0700 Cc: Mario Marietto , arm@freebsd.org, Lexi Winter Content-Transfer-Encoding: quoted-printable Message-Id: <6117F301-D584-40F7-9022-F90103FF5468@yahoo.com> References: <18B789E4-5891-4F3E-BAB6-05FD45949438@yahoo.com> <1923834610.13708.1716392599662@localhost> To: Ronald Klop X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated 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-Queue-Id: 4Vky3d6PFXz4bs5 On May 22, 2024, at 08:43, Ronald Klop wrote: >> Van: Mark Millard >> Datum: woensdag, 22 mei 2024 17:34 >> Aan: Lexi Winter >> CC: Mario Marietto , arm@freebsd.org >> Onderwerp: Re: vmm (bhyve) on GICv2 >> On May 22, 2024, at 00:25, Lexi Winter wrote: >>=20 >> > Mario Marietto: >> >> On Wed, May 22, 2024 at 9:03AM Lexi Winter = wrote: >> >>> i was pleased to see ARM64 vmm has been merged to main recently. >> >>> >> >>> i have several use-cases to run bhyve on RPi4, but unfortunately = this >> >>> hardware only supports GICv2 while vmm requires GICv3. >> >>> >> >>> does anyone have an idea if GICv2 is likely to be supported in = the >> >>> future? >> >> >> >> Does RPi5 support GICv3 ? I would like to know which kind of = relatively >> >> cheap arm hardware can run bhyve. >> > >> > i don't know off hand, but i do know FreeBSD doesn't support RPi5 = at >> > all right now, so this is not an immediate solution :-) >>=20 >> I boot and run a RPi5 via EDK2 in the microsd card slot and a USB3 >> UFS system media (that has lots of different swap partition sizes >> for use on various machines with widely varying amounts of RAM): >>=20 >> # gpart show -pl >> =3D> 40 249737136 mmcsd0 GPT (119G) >> 40 2008 - free - (1.0M) >> 2048 249733120 mmcsd0p1 RPi5-edk2 (119G) >> 249735168 2008 - free - (1.0M) >>=20 >> =3D> 34 1875384941 da0 GPT (894G) >> 34 32734 - free - (16M) >> 32768 501760 da0p1 PkgBaseEFI (245M) >> 534528 20971520 da0p2 PkgBaseSwp10 (10G) >> 21506048 29360128 da0p3 PkgBaseSwp14 (14G) >> 50866176 33554432 da0p4 PkgBaseSwp16 (16G) >> 84420608 67108864 da0p5 PkgBaseSwp32 (32G) >> 151529472 96468992 da0p6 PkgBaseSwp46 (46G) >> 247998464 268435456 da0p7 PkgBaseSwp128 (128G) >> 516433920 7340032 da0p8 PkgBaseSwp3p5 (3.5G) >> 523773952 13631488 da0p10 PkgBaseSwp6p5 (6.5G) >> 537405440 1337979528 da0p9 PkgBaseUFS (638G) >> 1875384968 7 - free - (3.5K) >>=20 >> See: https://github.com/worproject/rpi5-uefi >>=20 >> # uname -apKU >> FreeBSD aarch64-main-pkgs 15.0-CURRENT FreeBSD 15.0-CURRENT #5 = main-n269589-9dcf39575efb-dirty: Sun Apr 21 01:42:00 PDT 2024 = root@aarch64-main-pbase:/usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src= /arm64.aarch64/sys/GENERIC-NODBG-CA76 arm64 aarch64 1500018 1500018 >>=20 >> That kernel is at: /boot/kernel.CA76-NODBG/kernel in my context. >>=20 >> But I also have kernels that I got from: >>=20 >> https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/ >>=20 >> that boot it as well: >>=20 >> # strings /boot/kernel.GENERIC-NODEBUG/kernel | grep 15.0- >> @(#)FreeBSD 15.0-CURRENT main-n269581-dfa39133b333 GENERIC-NODEBUG >> FreeBSD 15.0-CURRENT main-n269581-dfa39133b333 GENERIC-NODEBUG >> 15.0-CURRENT >>=20 >> And the debug version (witness and such): >>=20 >> # strings /boot/kernel/kernel | grep 15.0- >> @(#)FreeBSD 15.0-CURRENT main-n269581-dfa39133b333 GENERIC >> FreeBSD 15.0-CURRENT main-n269581-dfa39133b333 GENERIC >> 15.0-CURRENT >>=20 >> (It has beem a while since I updated.) >>=20 >> All these kernels boot a world that I got from the same: >>=20 >> https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/ >>=20 >> I do have another world in a directory tree that I built that I >> can chroot to. >>=20 >> =3D=3D=3D >> Mark Millard >> marklmi at yahoo.com >>=20 > =20 >=20 > Hi, >=20 > This looks nice. Are there any FreeBSD patches needed to boot a RPI5? = Or only an up-to-date EDK2? The kernels and world installed via use of: https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/ that I referenced were/are used unmodified. Those materials are as built by the FreeBSD project, not built by me. I build my other kernels and the world that I can chroot to in order to experiment with builds that explicitly target Cortext-A76 instruction set compatible aarch64 contexts. Such is not required. The same Cortex-A76 kernels and world can be used on the Windows DevKit 2023's combination of Cortex-X1C's and Cortex-A78C's. I have only tried EDK2 as distributed via: https://github.com/worproject/rpi5-uefi/ I have not built it myself. > And if it works well can we collaborate in documenting the RPI5 on = https://wiki.freebsd.org/arm/Raspberry%20Pi? I'll note that my normal use is headless: serial console and ssh-over-ethernet. The EtherNet use is via a USB3 dongle: the built-in EtherNet is not supported via EDK2. Also, I leave the microsd card that has EDK2 on it in the microsd card slot and do not normally have it mounted. But the /etc/fstab that I use has a line: /dev/gpt/RPi5-edk2 /RPi5-edk2 msdosfs = rw,noatime,noauto 0 0 to mount it when desired. Presuming the /RPi5-edk2/ was created previously: # mount /RPi5-edk2 # ls -loaT /RPi5-edk2 total 2180 drwxr-xr-x 1 root wheel - 32768 Dec 31 23:00:00 1979 . drwxr-xr-x 26 root wheel - 512 May 22 09:29:16 2024 .. -rwxr-xr-x 1 root wheel uarch 2031616 Mar 16 03:43:48 2024 RPI_EFI.fd -rwxr-xr-x 1 root wheel - 76038 Mar 15 20:46:12 2024 = bcm2712-rpi-5-b.dtb -rwxr-xr-x 1 root wheel uarch 474 Apr 19 18:38:24 2024 config.txt -rwxr-xr-x 1 root wheel uarch 474 Apr 19 18:38:24 2024 = config.txt.m_m_edk2_rpi5 # cat /RPi5-edk2/config.txt armstub=3DRPI_EFI.fd device_tree_address=3D0x1f0000 device_tree_end=3D0x210000 # Force 32 bpp framebuffer allocation. framebuffer_depth=3D32 # Disable compensation for displays with overscan. disable_overscan=3D1 # Force maximum USB power regardless of the power supply. usb_max_current_enable=3D1 # Force maximum CPU speed. force_turbo=3D1 # # Local additions: enable_uart=3D1 uart_2ndstage=3D1 dtdebug=3D1 disable_commandline_tags=3D1 # [pi5] over_voltage_delta=3D100000 arm_freq=3D2600 [all] The local additions are not required. I'll note that: https://github.com/worproject/rpi5-uefi/blob/master/README.md documents ACPI mode as supporting (extracted from a table): OS: FreeBSD Version: 13.2 Tested/supported hardware: Display, UART, USB, SD, PCIe Notes: * SD is limited to HS. DeviceTree mode is documented with just: QUOTE The included DTB is meant for the RPi downstream 6.1.y kernel. END QUOTE And, so, FreeBSD is likely not a useful match to DeviceTree mode at this time. =3D=3D=3D Mark Millard marklmi at yahoo.com