# The OS/K Team licenses this file to you under the MIT license. # See the LICENSE file in the project root for more information. To communicate with devices, use: devctl #dev #slot iocall #dev #slot This will call a function from the device's slot table. It will take registers ax0-ax7 as its parameters, and return a value in rdx:rax. The return value in rax is a status value: ≥0 ok (>0 only if meaningful) -1 unspecified error -2 no such device -3 device powered off -4 device fatal error -5 device not plugged -6 no such function slot -7 slot not implemented -8 slot reserved -9 invalid parameters -10 to -256 (reserved) < -256 (left to device) The slots for "devctl" are architecture-rerserved. They consist of the following functions: Slot Param (ax0) Description 0 ptr Write device type into buffer 1 ptr Write device name into buffer 2 ptr Write device model into buffer 3 ptr Write device vendor into buffer 4 rax=major, rdx=minor 5 rax=feats, rdx=revis The slots for "iocall" are device-defined. (They correspond to the "fslots" array of the dev_t structure.) See that particular device's documentation (if any).