• Jeffrey Lee's avatar
    OS_DynamicArea 22 fixes · 88219988
    Jeffrey Lee authored
    Multiple fixes, mostly related to error handling.
    1. Ensure R1 is initialised correctly when generating BadPageNumber
    errors (labels 94 & 95). Generally this involves setting it to zero to
    indicate that no call to LogOp_MapOut is required. Failing to do this
    would typically result in a crash.
    2. When branching back to the start of the loop after calling
    GetNonReservedPage, ensure R0 is reset to zero. Failing to do this would
    have a performance impact on LogOp_MapOut, but shouldn't be fatal.
    3. In the main routine, postpone writing back DANode_Size until after
    the call to physical_to_ppn (because we may decide to abort the op
    and return an error without moving a page).
    4. Fix stack offset when accessing PMPLogOp_GlobalTBLFlushNeeded.
    Getting this wrong could potentially result in some TLB maintenance
    being skipped when moving uncacheable pages.
    5. Fix stack imbalance at label 94
    Version 6.43. Tagged as 'Kernel-6_43'
ChangeDyn 266 KB