Page MenuHomeFreeBSD

Add an instruction barrier to pmap_activate()
ClosedPublic

Authored by alc on Jul 10 2019, 3:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 15 2024, 9:46 PM
Unknown Object (File)
Dec 20 2023, 3:06 AM
Unknown Object (File)
Nov 12 2023, 1:41 AM
Unknown Object (File)
Nov 10 2023, 10:12 PM
Unknown Object (File)
Nov 10 2023, 3:46 AM
Unknown Object (File)
Nov 8 2023, 10:15 PM
Unknown Object (File)
Nov 7 2023, 2:19 PM
Unknown Object (File)
Oct 22 2023, 11:44 PM

Details

Summary

According to Section D5.10.3 "Maintenance requirements on changing System register values" of the architecture manual, an isb instruction should be executed after updating ttbr0_el1 and before invalidating the TLB.

Test Plan

After adding the isb instruction into pmap_activate(), I can replace the pmap_invalidate_page() in pmap_enter_quick_locked() with a dsb ishst instruction and not suffer from spurious bus errors.

Diff Detail

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

Event Timeline

efi_arch_enter() and _leave() have the isb following the TLB invalidation.

Perhaps we should add a cpufunc.h intrinsic for these two instructions?

This revision is now accepted and ready to land.Jul 10 2019, 3:20 PM

Add the isb instruction to efi_arch_enter() and efi_arch_leave().

This revision now requires review to proceed.Jul 10 2019, 3:43 PM
This revision is now accepted and ready to land.Jul 10 2019, 3:46 PM

efi_arch_enter() and _leave() have the isb following the TLB invalidation.

I believe that the isb instruction must be executed before and after TLB invalidation.

Perhaps we should add a cpufunc.h intrinsic for these two instructions?

Probably.