
Am Mittwoch, 20. November 2002 15:06 schrieben Sie:
In message 200211201114.gAKBEss01326@dagobert.svc.sysgo.de you wrote:
[explanation of x86 gate mechanism ..]
But this is not what U-Boot needs.
I thought so :-)
You may remember that we used a jump table attached to the global data in early versions of PPCBoot. I didn't like this. The nice thing about the syscall trap on PPC is that you can easily put a "jump table" at a well-known location, so that a standalone application can access certain services (those explicitely exported by U-Boot using the syscall interface) without depending on a special software version.
So, essentially, the syscall mechanism in U-Boot/PPC is just a jump table at a well known location, where that location is defined by the architecture, right ?
This surely makes sense, but I'm not sure wether it should be adopted as a model for the other architectures.
Why not do it as the good old OS-9 or pSOS did: identify one absolute address that is otherwise unused (every architecture has this in some form: an unused trap vector, unused word in space reserved for first level exception handler, etc.). In that location, have U-boot publish the address of the jump table at startup time (by storing a pointer to it). This is actually no different from the trap mechanism used by the PPC, except that the "well-known location" is defined by convention rather than by the hardware. And this could be done portably.
Rob
---------------------------------------------------------------- Robert Kaiser email: rkaiser@sysgo.de SYSGO AG Am Pfaffenstein 14 phone: (49) 6136 9948-762 D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10