From nobody Wed May 22 15:48:34 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 4VkwhH3T6xz5LwRt for ; Wed, 22 May 2024 15:48:47 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (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 4VkwhH08SJz4RT1 for ; Wed, 22 May 2024 15:48:46 +0000 (UTC) (envelope-from dfr@rabson.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-dcd7c526cc0so5982919276.1 for ; Wed, 22 May 2024 08:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rabson-org.20230601.gappssmtp.com; s=20230601; t=1716392925; x=1716997725; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=If1YOzxoGEmcp8F50AD3RjgVFOEDoWKX5CTvOdJYIa0=; b=mfcFAmX1pWcMcwfF8+oCLLHhczVvxpDQUWzITHSfe2Olr/tf7YWHaDZ9BWSzOrZMjd nhQzKgNVtQ6f+NmsVIWvHB4G6YwmHfDlFvuCWexkR9JBJiXgUe3+h2PbRtKFdET4TMbT uf4pQkIZMH1BkhqvoHg7kqZ9+FCDJrQXQCehA9mjC4t7/S9VJErgdrzPM3RfWPMG5FZE ZBlft84zu4NG7QMhyTUjuecdATL/ItSKwjaZ8toShcWyaFldUz0dCT7sRUCG7RVLQNaL tjaYwsaSNRvIyZHrGi1ZKUtv7gAni//tv4NZXPNX6ZnWBkgusMNubSa0/MhQeCg896+u W0zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716392925; x=1716997725; 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=If1YOzxoGEmcp8F50AD3RjgVFOEDoWKX5CTvOdJYIa0=; b=ZY5BmbMbIaCWAw3Gbc3sWlK2JiD5LF9ebgoZ35IXWkXBw2bElezRl3+c1pmWGkZCFl C5ieP8HCt/bSd1pn8jtQZ29+l3VMbhb1adFenzrV6Qm0RaznQaq+Nx4KHwY6P+7fss2C UlLY2agQG1cAl/iXvrIbJeU2e94Cwm8UBRdVyYybBQJ2m7qQOZ0SRq4aFuHk3+tTn+ze BydJFXJuQf4DAEF3XXyNvP1jYE5oqvDkaJlCoCH4OAWf1v8F2aXl09SnvPuC74zz7K9z EvIriqT60aC6wSfWFx1arddcsXNLjhpxXxBi6UKV3BcaNNMZLAoJ01/L5BUDfKb/r23a hC/w== X-Forwarded-Encrypted: i=1; AJvYcCUNvd37KZ7sJQIN6YalMH7q/WpxvgkcsRDk4f7G4jQcy9y6trK4ajw4jhFiU/i1ahaAZbHMOAnc1/maz8Adjms= X-Gm-Message-State: AOJu0Yw3AHXE6IEuwU8OcIR7ktFyJqTKWdi4B86xIa+R/iLxk9lbWhp5 Zxm3jCfdIAMfv4HABYu5EICgRAZycb5yEReYGHBcmtIhMAt9qSOOiR1dfhZL1SEAIoA3xpDXsEB zRvFySOOZVu10/HsJZ9NPiyHfF6vJeIqQrBm7Hg== X-Google-Smtp-Source: AGHT+IGsnFmSVh4kTfAJfuEXSvWGPVtqAdXSleIcC5mNfW001bhBHn8BzocCLq/XVeNgC040kguFhvwH/j8JpBoPrUo= X-Received: by 2002:a25:5f48:0:b0:df4:d65e:f519 with SMTP id 3f1490d57ef6-df4e0dde829mr2157041276.59.1716392925050; Wed, 22 May 2024 08:48:45 -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: <18B789E4-5891-4F3E-BAB6-05FD45949438@yahoo.com> <1923834610.13708.1716392599662@localhost> In-Reply-To: <1923834610.13708.1716392599662@localhost> From: Doug Rabson Date: Wed, 22 May 2024 16:48:34 +0100 Message-ID: Subject: Re: vmm (bhyve) on GICv2 To: Ronald Klop Cc: Mark Millard , Mario Marietto , arm@freebsd.org, Lexi Winter Content-Type: multipart/alternative; boundary="00000000000097d47f06190cdeeb" 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:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4VkwhH08SJz4RT1 --00000000000097d47f06190cdeeb Content-Type: text/plain; charset="UTF-8" I have some unfinished patches, currently stuck trying to figure out how MSI works on the platform. Sadly, this part is not documented publicly and I have no access to NDA documentation. The Linux driver is my only reference which is far from optimal. Mike Karels is also interested in getting this working. Doug. On Wed, 22 May 2024 at 16: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: > > > 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 :-) > > 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): > > # gpart show -pl > => 40 249737136 mmcsd0 GPT (119G) > 40 2008 - free - (1.0M) > 2048 249733120 mmcsd0p1 RPi5-edk2 (119G) > 249735168 2008 - free - (1.0M) > > => 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) > > See: https://github.com/worproject/rpi5-uefi > > # 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 > > That kernel is at: /boot/kernel.CA76-NODBG/kernel in my context. > > But I also have kernels that I got from: > > https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/ > > that boot it as well: > > # 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 > > And the debug version (witness and such): > > # 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 > > (It has beem a while since I updated.) > > All these kernels boot a world that I got from the same: > > https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/ > > I do have another world in a directory tree that I built that I > can chroot to. > > === > Mark Millard > marklmi at yahoo.com > > > ------------------------------ > > > > Hi, > > This looks nice. Are there any FreeBSD patches needed to boot a RPI5? Or > only an up-to-date EDK2? > > And if it works well can we collaborate in documenting the RPI5 on > https://wiki.freebsd.org/arm/Raspberry%20Pi? > > Regards, > Ronald. > > --00000000000097d47f06190cdeeb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have some unfinished patches, currently stuck trying=C2= =A0to figure out how MSI works on the platform. Sadly, this part is not doc= umented publicly and I have no access to NDA documentation. The Linux drive= r is my only reference which is far from optimal. Mike Karels is also inter= ested in getting this working.

Doug.


On Wed, 22 May 2024 at 16:43, Ronald Klop <ronald-lists@klop.ws> wrote:
=

Van: Mark Millard <marklmi@yahoo.com>
Datum: woensdag, 22 mei 2024 17:34
Aan: Lexi Winter <lexi@le-fay.org>
CC: Mario Marietto <marietto2008@gmail.com>, arm@freebsd.org
Onderwerp: Re: vmm (bhyve) on GICv2

On May 22, 2024, at 00:25, Lexi Winter = <lexi@le-fay.org> wrote:

> Mario Marietto:
>> On Wed, May 22, 2024 at 9:03AM Lexi Winter <
lexi@le-fay.org> wrote:
>>> i was pleased to see ARM64 vmm has been merged to main recentl= y.
>>>
>>> i have several use-cases to run bhyve on RPi4, but unfortunate= ly 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 relat= ively
>> cheap arm hardware can run bhyve.
>
> i don't know off hand, but i do know FreeBSD doesn't support R= Pi5 at
> all right now, so this is not an immediate solution :-)

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):

# gpart show -pl
=3D> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A040 =C2=A0249737136 =C2=A0=C2=A0= =C2=A0mmcsd0 =C2=A0GPT =C2=A0(119G)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A040 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A02008 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0- free - =C2=A0(1.0M)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A02048 =C2=A0249733120 =C2=A0mmcsd0= p1 =C2=A0RPi5-edk2 =C2=A0(119G)
=C2=A0=C2=A0249735168 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A02008 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0- free - =C2=A0(1.0M)=

=3D> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A034 =C2=A01875384941 =C2= =A0=C2=A0=C2=A0=C2=A0da0 =C2=A0GPT =C2=A0(894G)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A034 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A032734 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0- free - =C2=A0(16M)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A032768 =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0501760 =C2=A0=C2=A0da0p1 =C2=A0PkgBaseEFI =C2=A0(245M)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0534528 =C2=A0=C2=A0=C2=A020971520 =C2= =A0=C2=A0da0p2 =C2=A0PkgBaseSwp10 =C2=A0(10G)
=C2=A0=C2=A0=C2=A0=C2=A021506048 =C2=A0=C2=A0=C2=A029360128 =C2=A0=C2=A0da0= p3 =C2=A0PkgBaseSwp14 =C2=A0(14G)
=C2=A0=C2=A0=C2=A0=C2=A050866176 =C2=A0=C2=A0=C2=A033554432 =C2=A0=C2=A0da0= p4 =C2=A0PkgBaseSwp16 =C2=A0(16G)
=C2=A0=C2=A0=C2=A0=C2=A084420608 =C2=A0=C2=A0=C2=A067108864 =C2=A0=C2=A0da0= p5 =C2=A0PkgBaseSwp32 =C2=A0(32G)
=C2=A0=C2=A0=C2=A0151529472 =C2=A0=C2=A0=C2=A096468992 =C2=A0=C2=A0da0p6 = =C2=A0PkgBaseSwp46 =C2=A0(46G)
=C2=A0=C2=A0=C2=A0247998464 =C2=A0=C2=A0268435456 =C2=A0=C2=A0da0p7 =C2=A0P= kgBaseSwp128 =C2=A0(128G)
=C2=A0=C2=A0=C2=A0516433920 =C2=A0=C2=A0=C2=A0=C2=A07340032 =C2=A0=C2=A0da0= p8 =C2=A0PkgBaseSwp3p5 =C2=A0(3.5G)
=C2=A0=C2=A0=C2=A0523773952 =C2=A0=C2=A0=C2=A013631488 =C2=A0da0p10 =C2=A0P= kgBaseSwp6p5 =C2=A0(6.5G)
=C2=A0=C2=A0=C2=A0537405440 =C2=A01337979528 =C2=A0=C2=A0da0p9 =C2=A0PkgBas= eUFS =C2=A0(638G)
=C2=A0=C2=A01875384968 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A07 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0- free - = =C2=A0(3.5K)

See: = https://github.com/worproject/rpi5-uefi

# 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 =C2=A0=C2=A0=C2=A0=C2=A0r= oot@aarch64-main-pbase:/usr/obj/BUILDs/main-CA76-nodbg-clang/usr/main-src/a= rm64.aarch64/sys/GENERIC-NODBG-CA76 arm64 aarch64 1500018 1500018

That kernel is at: /boot/kernel.CA76-NODBG/kernel in my context.

But I also have kernels that I got from:

https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/

that boot it as well:

# 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

And the debug version (witness and such):

# 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

(It has beem a while since I updated.)

All these kernels boot a world that I got from the same:

https://pkg.freebsd.org/FreeBSD:15:aarch64/base_latest/

I do have another world in a directory tree that I built that I
can chroot to.

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

=C2=A0



Hi,

This looks nice. Are there any FreeBSD patches needed to boot a RPI5? Or on= ly an up-to-date EDK2?

And if it works well can we collaborate in documenting the RPI5 on https://= wiki.freebsd.org/arm/Raspberry%20Pi?

Regards,
Ronald.
=C2=A0
--00000000000097d47f06190cdeeb--