Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ida_tdk_en/appl_note/mdriver_entry.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ida_tdk_en/appl_note/mdriver_entry.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ida_tdk_en/appl_note/mdriver_entry.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ida_tdk_en/appl_note/mdriver_entry.html on line 8

mdriver_entry

Minidriver system page entry

Synopsis:

struct mdriver_entry
{
   uint32_t    intr;
   int         (*handler)(int state, void *data);
   void        *data;
   paddr32_t   data_paddr;
   uint32_t    data_size;
   uint32_t    name;
   uint32_t    internal;
   uint32_t    spare[1];
};

Description:

Each entry for a minidriver is stored in the system page. In order for a full (process time) driver to find a minidriver and gain access to its data area, it must access the system page. The members of this structure are:

intr
The interrupt, which the minidriver is attached to.
handler
The minidriver handler function.
data
The physical address of the minidriver's data area.
data_paddr
data_size
The size of the minidriver's data area, in bytes.
name
The name of the minidriver, added by mdriver_add(). This value is the offset into the system page strings section where the name is stored.

Access to this information is done through the SYSPAGE_ENTRY() macro: SYSPAGE_ENTRY(mdriver)[i].data_paddr Where i is the index into the minidriver section. You can use the name field can be used to locate a specific minidriver if there are multiple ones running in the system, possibly attached to the same interrupt. Sample code used to access this information would look like:

int i, num_drivers = 0;
struct mdriver_entry    *mdriver;

mdriver = (struct mdriver_entry *) SYSPAGE_ENTRY(mdriver);
num_drivers = _syspage_ptr->mdriver.entry_size/sizeof(*mdriver);
printf("Number of Installed minidrivers = %d\n\n", num_drivers);
for (i = 0; i < num_drivers; i++)
    {
        printf("Minidriver entry .. %d\n", i);
        printf("Name .............. %s\n",
           SYSPAGE_ENTRY(strings)->data + mdriver[i].name);
        printf("Interrupt ......... 0x%X\n", mdriver[i].intr);
        printf("Data size ......... %d\n", mdriver[i].data_size);
        printf("\n");
    }

Classification:

QNX Neutrino


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/ida_tdk_en/appl_note/mdriver_entry.html on line 115

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/ida_tdk_en/appl_note/mdriver_entry.html on line 115