• F
    nubus: Fix pointer validation · 85cc313a
    Finn Thain 提交于
    Fix bounds checking on slot-space pointer movement.
    Remove redundant test for zero byte-lanes value.
    Fix broken byte-lanes vs. address validation.
    
    This patch changes the circumstances under which an error is printed to
    the console and fixes the address validation.
    
    The validation code should work correctly now: the broken test for a
    valid bytelanes value is replaced with a working test (which eliminates
    false negatives) and the 24-bit directory offset bounds check is fixed
    (which eliminates false positives).
    
    Please see "Designing Cards and Drivers for the Macintosh Family"
    ch. 8, "NuBus Card Firmware" for an explanation of the bytelanes check
    and directory offset value.
    Signed-off-by: NFinn Thain <fthain@telegraphics.com.au>
    Reviewed-by: NMichael Schmitz <schmitzmic@gmail.com>
    Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
    85cc313a
nubus.c 21.2 KB