• Jeffrey Lee's avatar
    Add a compatibility page zero for high processor vectors / zero page relocation builds · ffac5791
    Jeffrey Lee authored
    Detail:
      When HiProcVecs is enabled, there will now be a read-only page located at &0 in order to ease compatibility with buggy software which reads from null pointers
      Although most of the page is zero-filled, the start of the page contains a few words which are invalid pointers, discouraging dereferencing them, and a warning message if the memory is interpreted as a string.
      On ARMv6+ the page is also made non-executable, to deal with branch-through-zero type situations
      OS_Memory 20 has been introduced as a way of determining whether the compatibility page is present, and also to enable/disable it
      File changes:
      - hdr/Options - Add CompatibilityPage option
      - hdr/OSMem - Declare OS_Memory reason code 20
      - hdr/KernelWS - When CompatibilityPage is enabled, make sure nothing else is located at &0
      - s/NewReset - Enable compatibility page just before Service_PostInit (try and keep zero-tolerance policy for null pointer dereferencing during ROM init)
      - s/MemInfo - OS_Memory 20 implementation. Add knowledge of the compatibility page to OS_Memory 16 and 24.
    Admin:
      Tested on BB-xM
    
    
    Version 5.87. Tagged as 'Kernel-5_87'
    ffac5791
MemInfo 68.2 KB