Make MMU_Changing ARMops perform the sub-operations in a sensible order
Jeffrey Lee authored
Detail:
  For a while we've known that the correct way of doing cache maintenance on ARMv6+ (e.g. when converting a page from cacheable to non-cacheable) is as follows:
  1. Write new page table entry
  2. Flush old entry from TLB
  3. Clean cache + drain write buffer
  The MMU_Changing ARMops (e.g. MMU_ChangingEntry) implement the last two items, but in the wrong order. This has caused the operations to fall out of favour and cease to be used, even in pre-ARMv6 code paths where the effects of improper cache/TLB management perhaps weren't as readily visible.
  This change re-specifies the relevant ARMops so that they perform their sub-operations in the correct order to make them useful on modern ARMs, updates the implementations, and updates the kernel to make use of the ops whereever relevant.
  File changes:
  - Docs/HAL/ARMop_API - Re-specify all the MMU_Changing ARMops to state that they are for use just after a page table entry has been changed (as opposed to before - e.g. 5.00 kernel behaviour). Re-specify the cacheable ones to state that the TLB invalidatation comes first.
  - s/ARM600, s/ChangeDyn, s/HAL, s/MemInfo, s/VMSAv6, s/AMBControl/memmap - Replace MMU_ChangingUncached + Cache_CleanInvalidate pairs with equivalent MMU_Changing op
  - s/ARMops - Update ARMop implementations to do everything in the correct order
  - s/MemMap2 - Update ARMop usage, and get rid of some lingering sledgehammer logic from ShuffleDoublyMappedRegionForGrow
Admin:
  Tested on pretty much everything currently supported


Version 5.70. Tagged as 'Kernel-5_70'
9a96263a
Name Last commit Last update
..
AMBControl Make MMU_Changing ARMops perform the sub-operations in a sensible order
PMF Remove a dead function
vdu Delete lots of old switches
ARM600 Make MMU_Changing ARMops perform the sub-operations in a sensible order
ARMops Make MMU_Changing ARMops perform the sub-operations in a sensible order
Arthur2 Delete lots of old switches
Arthur3 Delete lots of old switches
ArthurSWIs Reimplement AMBControl ontop of the PMP system
CPUFeatures Revise comments - it's multiprocessing extensions, not virtualisation
ChangeDyn Make MMU_Changing ARMops perform the sub-operations in a sensible order
Convrsions Add OS_Memory 24 implementation. Change OS_ValidateAddress to use it. Fix kernel leaving the physical access MB in a messy state. Try and protect against infinite abort loops caused by bad environment handlers.
Exceptions Reimplement AMBControl ontop of the PMP system
ExtraSWIs Reimplement AMBControl ontop of the PMP system
GetAll Make s/ChangeDyn slightly more readable by splitting some routines out into a separate file
HAL Make MMU_Changing ARMops perform the sub-operations in a sensible order
HeapMan Delete lots of old switches
HeapSort Avoid unnecesssary remainder calculations
Kernel Reimplement AMBControl ontop of the PMP system
LibKern More HAL work. IOMD HAL work in progress. Lots of my own little build scripts. Don't touch this.
MOSDict Import from cleaned 360 CD
MemInfo Make MMU_Changing ARMops perform the sub-operations in a sensible order
MemMap2 Make MMU_Changing ARMops perform the sub-operations in a sensible order
Middle Fix OS_BreakPt when called from SVC mode
ModHand Issue Service_ModulePostInit when really post init
MoreComms Resolve 2x header clashes
MoreSWIs
MsgCode
NewIRQs
NewReset
Oscli
SWINaming
Super1
SysComms
TickEvents
UnSqueeze
Utility
VMSAv6