next up previous contents
Nächste Seite: Glossar Aufwärts: Diplomarbeit zum Thema Generische Vorherige Seite: Zusammenfassung und Ausblick   Inhalt


Schnittstellen-Definition: I/ O Server

This can be found in the io package [Hel01a] (io/idl/io.idl).

/*
 * CORBA IDL based function interfaces for L4 systems
 */
module l4
{
    /*
     * L4 io server interface
     */
    interface io
    {
        /* 
         * Miscellaneous Services
         */
    
        /*
         * register new io client
         */
        long register_client(in l4_io_drv_t type);
    
        /*
         * unregister io client
         */
        long unregister_client();
    
        /*
         * initiate mapping of io info page
         */
        long map_info(out fpage info);
    
        /*
         * Resource Allocation
         */
    
        /*
         * register for exclusive use of IO port region
         */
        long request_region(in unsigned long addr,
                            in unsigned long len);
    
        /*
         * release IO port region
         */
        long release_region(in unsigned long addr,
                            in unsigned long len);
    
        /*
         * register for exclusive use of `IO memory' region
         */
         ...
    
        /*
         * PCI Services
         */
    
        /*
         * search for PCI device by vendor/device id
         */
        long pci_find_device(in unsigned short vendor_id,
                             in unsigned short device_id, 
                             in l4_io_pdev_t start_at,
                             out l4_io_pci_dev_t pci_dev);
         ...
    
        /*
         * read configuration BYTE registers of PCI device
         */
        long pci_read_config_byte(in l4_io_pdev_t pdev,
                                  in long offset, out octet val);
         ...
    
        /*
         * write configuration BYTE registers of PCI device
         */
        long pci_write_config_byte(in l4_io_pdev_t pdev,
                                   in long offset, in octet val);
         ...
    };
};

This can be found in the omega0 package (l4/omega0/client.h).

/* attach to an irq line */
extern int omega0_attach(omega0_irqdesc_t desc);

/* detach from an irq line */
extern int omega0_detach(omega0_irqdesc_t desc);

/* request for certain actions */
extern int omega0_request(int handle, omega0_request_t action);

This can be found in the io [Hel01a] (l4/io/types.h) and omega0 packages (l4/omega0/client.h).

/* l4io types */

typedef unsigned long l4io_pdev_t;

typedef struct {
    unsigned long   devfn;       /* encoded device & function index */
    unsigned short  vendor;
    unsigned short  device;
    unsigned short  sub_vendor;
    unsigned short  sub_device;
    unsigned long   class;       /* 3 bytes: (base,sub,prog-if) */

    unsigned long   irq;
    l4io_res_t res[12];          /* resource regions used by device:
                                  * 0-5  standard PCI regions (base addresses)
                                  * 6    expansion ROM
                                  * 7-10 unused for devices */
    char            name[80];
    char            slot_name[8];

    l4io_pdev_t     handle;      /* handle for this device */
} l4io_pci_dev_t;

/* omega0 types (look there ...) */

typedef struct {
   ...
} omega0_irqdesc_t;

typedef struct {
   ...
} omega0_request_t;



Christian Helmuth 2001-12-11