[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [MiNT] Proposal for SLB extension



> > I thought that the scheduler is doing that anyway?
>
> AFAIR not.

That should be checked. I know that MiNT once did it, and there might be
code out there relying on it.

> > However, you would still need to get into supervisor mode to access it,
> > right?
>
> No, as far as I know (and tested with TOS 4.04 and MagiC 6.1), act_pd is
> accessible in user mode. And as it's a constant pointer, it would be

That's obvious. If you don't have memory protection, any memory location
above 0x800 is accessible.

> enough to read and save it during initialization of MiNT. The SLB
> wrapper code could then read the copy of the TOS-header pointer in user
> mode, and access the variable it points to - no need to switch to
> supervisor mode.
>
> Another, even simpler, method would be to let the scheduler save the
> address of the current basepage directly to a variable accessible by the
> SLB wrapper code.

Make a proposal where to put it :-)