• Robert Sprowson's avatar
    Fix wildly inaccurate sizes in PhysRamTable when split_block needed · 9aee4207
    Robert Sprowson authored
    When Subtractv1v2fromRAMtable is called to remove a region that results in one of the RAM blocks being split in the middle the resulting size was incorrect.
    The shuffle up loop was reusing v6 as an iterator not realising that it's needed to calculate the size of the 2nd half later, the error introduced was the difference between the physical address where PhysRamTable is located and the block being split - these could be a long way apart for example when there are two SDRAM banks.
    Even if the PhysRamTable is nearby (eg. 1 SDRAM bank) the result would be some weird sized entries which ultimately mean some dynamic area address space is "leaked".
    
    Fixed by swapping to v7, and for symmetry also adjusted the shuffle down loop to match.
    
    Version 5.35, 4.79.2.224. Tagged as 'Kernel-5_35-4_79_2_224'
    9aee4207
HAL 111 KB