Page MenuHomeFreeBSD

ARM GIC: check for Security Extensions to be present before using
ClosedPublic

Authored by bz on May 16 2016, 7:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 10:46 PM
Unknown Object (File)
Mon, Apr 29, 10:36 PM
Unknown Object (File)
Feb 28 2024, 10:49 AM
Unknown Object (File)
Feb 28 2024, 9:03 AM
Unknown Object (File)
Dec 22 2023, 9:45 PM
Unknown Object (File)
Nov 7 2023, 6:43 AM
Unknown Object (File)
Nov 4 2023, 7:59 PM
Unknown Object (File)
Oct 24 2023, 9:46 AM

Details

Summary

The GIC (v2 at least) has a bit in the TYPER register to indicate whether the GIC supports the Security Extensions or not. This bit is not the same as the CPU one.
Currently we are not checking for either before trying to write to the special registers.
This can lead to problems on hardware or simulators that do not provide the security extensions.
Add the missing checks. Their interactions with the CPU flag is not entirely clear to me but using a macro will make it easier to quickly adjust the condition once the CPU bits are sorted as well.

Test Plan

Booted an arm-std6 and an arm64 kernel on gem5 which no longer crashed.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz retitled this revision from to ARM GIC: check for Security Extensions to be present before using.
bz updated this object.
bz edited the test plan for this revision. (Show Details)
bz added a reviewer: andrew.
bz set the repository for this revision to rS FreeBSD src repository - subversion.
bz added subscribers: ARM, arm64.
andrew added a subscriber: br.

I'm a little unsure as to why we are writing to these registers. From the non-secure state the IGROUP register is write-ignored. Writing these was added in rS252370 in a patch submitted by @br. I'm guessing it was for the Samsung Exynos 5250 as the dts for this was added in rS252371, but maybe Ruslan knows.

bz edited edge metadata.

HEAD has changed over night.. update the diff...

br edited edge metadata.
This revision is now accepted and ready to land.May 17 2016, 10:20 AM

Just leaving a comment after an office discussion. My understanding is that the calls were/are needed to undo some boot loader settings to make things work correctly.

This revision was automatically updated to reflect the committed changes.