Date: Tue, 20 Apr 2021 22:02:21 +0000 From: Dmitry Skorodumov <sdmitry@parallels.com> To: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: gic-v2 and SGI interrupts on boot CPU Message-ID: <YQXPR01MB4691AB59B8CFBE3521B8002EA1489@YQXPR01MB4691.CANPRD01.PROD.OUTLOOK.COM>
next in thread | raw e-mail | index | archive | help
Hi It looks like code for gic-v2 in FreeBSD not quite correctly relies on impl= ementation defined behaviour of GIC. The g<file:///Users/sdmitry/Downloads/IHI0048B_b_gic_architecture_specific= ation.pdf>ic 2.0 spec https://developer.arm.com/documentation/ihi0048/bb ch= apter 3.2.2 "Interrupt controls in the GIC" states the following: "Whether SGIs are permanently enabled, or can be enabled and disabled by wr= ites to the GICD_ISENABLERn and GICD_ICENABLERn, is IMPLEMENTATION DEFINED.= " 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 secondar= y CPUs - in arm_gic_init_secondary(). 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 pla= tform supports only gic-v2, likely SGIs are always enabled anyway. So, my p= ost is rather pedantic notice without real life case. Dmitry
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQXPR01MB4691AB59B8CFBE3521B8002EA1489>