• Jeffrey Lee's avatar
    Fixes for zero-size PMPs · 0830af41
    Jeffrey Lee authored
    OS_DynamicArea 21, 22 & 25 were using the value of the PMP page list
    pointer (DANode_PMP) to determine whether the dynamic area is a PMP or
    not. However, PMPs which have had their max physical size set to zero
    will don't have the page list allocated, which will cause the test to
    fail. Normally this won't matter (those calls can't do anything useful
    when used on PMPs with zero max size), except for the edge case of where
    the SWI has been given a zero-length page list as input. By checking the
    value of DANode_PMP, this would result in the calls incorrectly
    returning an error.
    Fix this by having the code check the DA flags instead. Also, add a
    check to OS_DynamicArea 23 (PMP resize), otherwise non-PMP DAs could end
    up having page lists allocated for them.
ChangeDyn 265 KB