Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 2021 00:38:44 +0200
From:      Michael Tuexen <tuexen@freebsd.org>
To:        Dmitry Skorodumov <sdmitry@parallels.com>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: gic-v2 and SGI interrupts on boot CPU
Message-ID:  <2B7A227B-245F-4F1B-A700-263C3FE56B68@freebsd.org>
In-Reply-To: <YQXPR01MB4691AB59B8CFBE3521B8002EA1489@YQXPR01MB4691.CANPRD01.PROD.OUTLOOK.COM>
References:  <YQXPR01MB4691AB59B8CFBE3521B8002EA1489@YQXPR01MB4691.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 21. Apr 2021, at 00:02, Dmitry Skorodumov via freebsd-arm =
<freebsd-arm@freebsd.org> wrote:
>=20
> Hi
>=20
>=20
> It looks like code for gic-v2 in FreeBSD not quite correctly relies on =
implementation defined behaviour of GIC.
>=20
> The  =
g<file:///Users/sdmitry/Downloads/IHI0048B_b_gic_architecture_specificatio=
n.pdf>ic 2.0 spec https://developer.arm.com/documentation/ihi0048/bb =
chapter 3.2.2 "Interrupt controls in the GIC" states the following:
>=20
> "Whether SGIs are permanently enabled, or can be enabled and disabled =
by writes to the GICD_ISENABLERn and GICD_ICENABLERn, is IMPLEMENTATION =
DEFINED."
>=20
> But code in sys/arm/arm/gic.c assumes that SGI are always enabled and =
doesn't configure them at initialization. They are initialized only for =
secondary CPUs - in arm_gic_init_secondary().
>=20
> For sure it is a rather minor issue, since all appears to be ok in =
gic-v3 (v3 code enables SGIs for all CPUs, including the boot one). And =
even if platform supports only gic-v2, likely SGIs are always enabled =
anyway. So, my post is rather pedantic notice without real life case.
Dear all,

if I understand things correctly, the problem described is the cause =
which does not
allow to use more than one CPU core in FreeBSD when running on Parallels =
Desktop on
an M1 based Mac. It runs perfectly well with one core, but with multiple =
cores it
locks up during boot.

It would be great if some could propose a patch. I would be more than =
happy to test it.

Best regards
Michael
>=20
> Dmitry
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2B7A227B-245F-4F1B-A700-263C3FE56B68>