OS_Memory 20
Jon Abbott (1421) 2598 posts |
I see this was added to control the “compatibility page”, is documentation available or is it internal use only? |
Jeffrey Lee (213) 6046 posts |
Docs now online. The call is for public use, so feel free to use it within ADFFS or whatever if you need to trap reads/writes to &0 yourself (e.g. ZeroPain 0.07 automatically disables the compatibility page when it starts). And as mentioned on the page, it’s recommended that software authors test their code with the page disabled, so that the bugs it’s helping to hide actually get fixed instead of being left there forever. https://www.riscosopen.org/wiki/documentation/show/OS_Memory%2020 Note – the kernel works out the state of the page by reading from L2PT, so if you map a page of your own there then it will get confused. I’ll probably check in a change in a day or two so that it uses a variable in kernel workspace to track the state. |
Jon Abbott (1421) 2598 posts |
Thanks, ADFFS works in the same way as ZeroPain, requiring compatibility to be disabled so it can fault page zero access. |
Martin Avison (27) 1417 posts |
With the advent of the ‘Compatibility page’ when high vectors are being used, there now seem to me to be 3 possibilities: Compatibility enabled and ZeroPain not running Any ZP read accesses will ‘work’ as they always have (ie hiding errors). Writes will fail with Data Abort in User mode, as they have since RO3.8. Is this mainly aimed at users who are running applications with ZP accesses? ZeroPain running (so Compatibility disabled) ZP reads and writes will be ‘emulated’ and a ZP log will be generated. Is this mainly for developers and those users who want to provide information to help developers resolve problems? Compatibility disabled and ZeroPain not running ZP reads and writes will error with Data Abort. Is this the ultimate aim? Is this a reasonable summary? Seems like a big step forwards to me. |
Jeffrey Lee (213) 6046 posts |
That’s the general idea, yes.
The compatibility page is read-only in all modes, so it’s more strict than 3.8.
ZeroPain currently only emulates reads, not writes – so writes will fail |
Martin Avison (27) 1417 posts |
Thanks for the clarifications – and for the implementation. While there have been adverse comments about ZeroPain problems, they have certainly helped me identify and clear up a number of bugs in several programs – many benign, but some significant. |