Annotation of driverkit/notes/autoconfig, revision 1.1.1.1

1.1       root        1:                        Autoconfig questions
                      2:                
                      3: * NRW spec, IO Subsystem implies that 'device n' stuff is all relative to 
                      4:   slot. But...all of this stuff is hard wired to slot 15! Should we 
                      5:   assume that this stuff could work the same in other slots? Should autoconfig
                      6:   be able to deal with NRW-type devices in other slots?
                      7:  
                      8: mapping dev_type to executable
                      9:   -- dev_type = 32 bit number - 16 bits of type, 16 bits of rev
                     10:      == TTTTRRRR
                     11:      
                     12:   -- executables named dev_XXXXYYYY_<any_text>
                     13:      XXXX = type, in ASCII hex. Must match TYPE exactly
                     14:      YYYY = rev, in ASCII hex. Any digit can be '*'.
                     15:      
                     16:   -- multiple links to a given executable allow multiple dev_ports mapped 
                     17:      into one executable.
                     18:      
                     19:   -- multiple dev slots with same dev_type allow multiple exec's of one 
                     20:      executable. 
                     21:      
                     22:   -- Ports advertised in bootstrap server subset by config as
                     23:      dev_port_TTTT.
                     24:      
                     25:   -- autoconfig searches <driver_directory> for:
                     26:     -- XXXX must = TTTT.
                     27:     -- Then, in order:
                     28:        -- RRRR == YYYY
                     29:        -- RRRR == YY**
                     30:        -- RRRR == Y***       
                     31:        -- RRRR == ****
                     32:        
                     33: struct dev_entry {
                     34:        struct {                                // one for each type associated
                     35:            port_t dev_port;                    //   with this executable
                     36:            int dev_type;
                     37:        } entry[many];  
                     38:        int executable_fid;                     // only one
                     39:        char *one_executable_file_name;         // one of possibly many
                     40: };
                     41: 
                     42: autoconfig main
                     43: {
                     44:        register host_priv_port to get privileges;
                     45:        map in entire physical address space (somehow);
                     46:                
                     47:        for each device in DMA configuration page for each of three slots {
                     48:                examine dev_type;
                     49:                find executable for that dev_type;
                     50:                if none
                     51:                        continue to next device slot;
                     52:                get dev_port from kernel for that device #;
                     53:                if any dev_entries with this dev_type
                     54:                        make a new dev_entry;
                     55:                else if any dev_entries with this executable_fid
                     56:                        add this dev_port, dev_type to that dev_entry;
                     57:                else
                     58:                        make a new dev_entry;
                     59:        }
                     60:        for each dev_entry {
                     61:                make a new bootstrap subset;
                     62:                advertise each entry.dev_port in bootstrap server
                     63:                        as dev_port_TTTT under subst port;
                     64:                exec(executable) with bootstrap = subset_port;
                     65:        }
                     66: }
                     67: 
                     68: device driver task
                     69: {
                     70:        for each dev_type needed { 
                     71:                get bootstrap:dev_port_TTTT
                     72:                dev_reg_map(dev_port_TTTT, **reg_ptr_TTTT);
                     73:        }
                     74:        [driver probe:dev_port reg_ptr:reg_ptr];
                     75:        ...or...this is device-specific....
                     76:        [driver probe:dev_port_TTTT 
                     77:                next_port:dev_port_UUUU 
                     78:                reg_ptr1:reg_ptr_1
                     79:                reg_ptr2:reg_ptr_2];
                     80:        /* TBD */
                     81: }
                     82: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.