[CDG5] NanoKernel

daniel B-J danielbj314 at verizon.net
Mon Dec 3 07:25:14 AWST 2018


I’m not sure what to make of the RTAS code.

For starters, there is only one confirmed usage of the KCallRTAS routine, and it provides little information. https://github.com/elliotnunn/CubeE/blob/master/Toolbox/ShutDownMgr/ShutDownMgr.a <https://github.com/elliotnunn/CubeE/blob/master/Toolbox/ShutDownMgr/ShutDownMgr.a>

I note that there is a cache flushing Special F-Trap, which makes sense as RTAS is supposed to run with paging disabled.

Searching the CubeE repo reveals a few other files with the FE20 (KCallRTAS) trap, but most of them are likely just coincidences. Where else would RTAS be used? Maybe the Expansion Bus Manager? We don’t have full sources of that yet.

The argument list seems to have the same format as the RTAS implementation in SLOF. https://github.com/aik/SLOF/blob/master/include/rtas.h <https://github.com/aik/SLOF/blob/master/include/rtas.h>
This seems to be a 64-bit RTAS and OF, but hopefully the interface is the same.

I have been unable to locate an actual API specification for RTAS. Any ideas on where to look?

Confusingly, the NK implementation doesn’t quite match up with the SLOF version of RTAS.

It converts the argument list pointer to a physical address, which makes sense, but then it goes and conditionally does an index with a half-word at offset 0x04. Then some more virt->phys.

The same code is in NKv2.28, so it must work. Or are there any systems which actually use RTAS?
Apparently the Trampoline can substitute the RTAS for a version contained within it. What does that code look like?
> On Dec 2, 2018, at 5:43 AM, Elliot Nunn <elliotnunn at fastmail.com> wrote:
> 
> Help!
> 
> Hi all,
> 
> I am back at work on the NanoKernel. The first G3 kernel is close to
> round-tripping. Then once the early NewWorld kernels are done, the v1
> series will be complete.
> 
> Throughout this version-history project I have tried to produce
> well-commented sources of high quality. And I have not hesitated to
> engineer the commit history to make the reversed sources seem eerily
> prescient. But there are some parts of the kernel on which I have done a
> bad job, out of concern for time and a lack of understanding of the
> underlying hardware. The worst pieces are External Interrupts, the RTAS
> dispatching, some of the MemRetry block and some of the instruction
> emulation block. So this email is to ask for a bit of help.
> 
> Max, could you please take a look at the overall history of
> ExternalInts.s and try to make some sense of it? And Daniel, would
> please give me your take on RTAS.s, and Emulate.s if you dare? And
> needless to say, help from others would be appreciated as well!
> 
> Best,
> 
> Elliot
> _______________________________________________
> cdg5 mailing list
> cdg5 at ucc.asn.au
> https://lists.ucc.gu.uwa.edu.au/mailman/listinfo/cdg5

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ucc.gu.uwa.edu.au/pipermail/cdg5/attachments/20181202/1494b49f/attachment.htm 


More information about the cdg5 mailing list