Saturday, January 21, 2012

Kernel progress

The kernel is now at a point where code in two separate maps can communicate non-object parameters, provided the maps do not overlap, and only a single thread is supported.

The calling code should:
  • Put the feature identifier into r0 (this number is ignored by the kernel and passed unchanged to the callee)
  • Encode any parameters into the thread transfer block
  • Access the target "object" address using the specific instruction required by the kernel (currently LDR r14, [r14], so load r14 with the object's address and execute the instruction)
Only one register (r13) is preserved over the call, and on return r11 points to the map's thread transfer block which will contain the return values.  (I'm not sure yet whether to have the V bit set on exception, or call an exception handler routine.)

The callee is entered with:
  • r0 containing the value from the caller (nominally the feature number/identifier),
  • r11 pointing to the thread transfer block,
  • r12 containing the object identifier, as provided by code in the destination map when exporting the object handler, and
  • r14 containing the address to which the code should jump in order to return from the call.
The encoding of parameters allows the transfers of objects and simple expanded type values.
Objects local to the caller memory map will be defined by a handler (code) address and object identifier pair, which will be replaced by the kernel with a single pointer to an imported object.  Objects that have been imported into the caller can also be passed as parameters or results of calls, and the kernel will give the recipient access to these values as well.

The next task will be to add interrupt handling and multi-threading.

Friday, January 13, 2012

Name already taken

I just realised that the Brunel name was already taken (also for an Eiffel derivative language), back in 1991.

I'll have to come up with another name, I guess.