• Jeffrey Lee's avatar
    Improve safety of OS_Memory 0 "make temporarily uncacheable" and *Cache off · 6eee32dd
    Jeffrey Lee authored
    Detail:
      s/MemInfo - Wrap OS_Memory 0 in some code which will temporarily claim the FIQ vector when making pages temporarily uncacheable, to avoid any issues caused by modern ARMs ignoring unexpected cache hits
      s/VMSAv6 - Claim FIQs when OS_MMUControl is asked to make a change to the SCTLR, to avoid similar issues on modern ARMs. Also make the stack temporarily uncacheable before disabling the cache, so that we don't run into any problems using the stack inbetween disabling the cache and completing the clean+invalidate.
    Admin:
      Tested on Pi 2B, 3B
      *Cache off now works reliably on Pi 2B, although there is sometimes a pause of a few seconds while things sort themselves out (USB?)
      *Cache off "works" on Pi 3B but everything will fall over soon afterwards due to the Cortex-A53 not supporting LDREX/STREX to non-cacheable pages (or when the page is effectively non-cacheable, i.e. cacheable page with cache disabled)
    
    
    Version 5.35, 4.79.2.311. Tagged as 'Kernel-5_35-4_79_2_311'
    6eee32dd
ChangeDyn 276 KB