Information concerning loadable device drivers

From: Dirk Grunwald <grunwald_at_foobar.cs.colorado.edu>
Date: Thu, 21 Sep 1995 09:20:01 -0600

We're trying to build a loadable device driver. We've been following
the NE100 example in /usr/examples, but could use some help. If anyone
has examples of a loadable device driver they're willing to send us,
please let me know.

With the current configuration for our device (pal), sysconfig -l
reports...

pal:
        Subsystem_Description = pal physical memory character pseudo-device
        Module_Type = Dynamic
        Module_Path = /subsys/pal.mod
        Module_Config_Name = pal
        Device_Dir = /dev
        Device_Char_Major = Any
        Device_Char_Minor = 0
        Device_Char_Files = pal
        Device_User = root
        Device_Group = 0
        Device_Mode = 600

We have made a link from /subsys/device.mth to /subsys/pal.mth (as
suggested in the none100 example README in /usr/examples/devdriver).

However, we get the following error messages..


bootme.cs:none100> sudo sysconfig -c pal
Password:
framework error: loading/unloading subsystem
bootme.cs:none100>

and the following shows up in the log window for kloadsrv:

kloadsrv: kernel_load("/subsys/pal.mod", x, module) = 0
Unknown relocation type (17)
kloadsrv: kernel_next_module(*module == 0) = 0; *module = 2
kloadsrv: kernel_inq_module(2, info, 1040, ret_size) = 0; *ret_size = 1040
kloadsrv: kernel_inq_region(2, 0, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 1, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 2, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 3, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 4, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 5, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 6, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 7, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 8, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_inq_region(2, 9, info, 104, ret_size) = 0; *ret_size = 104
kloadsrv: kernel_next_module(*module == 2) = 0; *module = 0
kloadsrv: kls_server_ipc_send_reply: calling msgsnd()
kloadsrv: kls_server_ipc_receive_request: calling msgrcv()


The "unknown relocation type" could be caused by the way we compiled
it. We get this when comparing the types of the none driver
(prebuilt) and the pal driver we built:

> file /subsys/*.mod
/subsys/none.mod: COFF format alpha unknown binary type executable or object module not stripped - version 12.144--16368
/subsys/pal.mod: COFF format alpha executable or object module not stripped - version 3.11-8
bootme.cs:none100>
Received on Thu Sep 21 1995 - 17:50:21 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT