Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 85cc313a authored by Finn Thain's avatar Finn Thain Committed by Geert Uytterhoeven
Browse files

nubus: Fix pointer validation



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: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
parent 475e6e15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment