[OpenBIOS] [commit] r969 - in trunk/openbios-devel/arch: ppc/qemu ppc64/qemu
Andreas Färber
andreas.faerber at web.de
Tue Nov 30 22:09:01 CET 2010
Am 30.11.2010 um 21:41 schrieb Mark Cave-Ayland:
> Andreas Färber wrote:
>
>> I noticed that Haiku uses the set-callback ciface method shortly
>> before, but it appears that we only save the callback-function in
>> forth/system/ciface.fs and - according to grep - never use it
>> elsewhere.
>> Shouldn't every ofmem function check if we have a non-zero callback-
>> function (how? Cf. below) and then call that instead?
>> variable callback-function
>> : set-callback ( newfunc -- oldfunc )
>> callback-function @
>> swap
>> callback-function !
>> ;
>
> AIUI the callback function provides a way for open firmware to call
> a function within the client image, e.g. allow a Forth function to
> invoke a "named" C function within the kernel image. I don't believe
> it is related to OFMEM at all.
The callback function apparently provides a way for the OS to take
over memory management from OpenFirmware. Thus the relation to ofmem.
http://dev.haiku-os.org/browser/haiku/trunk/src/system/boot/platform/openfirmware/arch/ppc/mmu.cpp?rev=39430#L636
Haiku sets up a new page table based on the one from OpenFirmware,
calls set-callback and expects to be asked for future memory
allocations etc.
Andreas
More information about the OpenBIOS
mailing list