]> git.buserror.net Git - polintos/scott/priv.git/blob - idl/io/bus/generic.idl
Initial checkin from Perforce.
[polintos/scott/priv.git] / idl / io / bus / generic.idl
1 namespace IO.Bus;
2
3 struct Resource {       
4         Mem.Region region;
5         ResourceSpace rspace;
6         char[] description;
7 };
8
9 // Whether the alloc() and/or dev_alloc() methods are accepted by a given
10 // ResourceSpace is defined by the particular subtype.
11
12 interface ResourceSpace : Mem.Allocator {
13         guid: "2515CEC8-F7E0-11D9-9DF4-000A95BB581A";
14
15         dev_alloc(ulong start inout, ulong len, Mem.Allocator.AllocFlags flags,
16                   Device dev, Mem.AllocHandle handle out);
17
18         get_resources(Resource[] res out);
19         get_parent(Resource parent out);
20         get_bus(Bus bus out);
21         get_devices(Device[] devs out);
22         get_description(char[] desc out);
23 };
24
25 interface Device {
26         guid: "1F19CCF2-F7E0-11D9-98CE-000A95BB581A";
27
28         get_resources(Resource[] res out);
29         get_parent(Bus bus out);
30         get_description(char[] desc out);
31 };
32
33 interface Bus : Device {
34         guid: "196CC482-F7E0-11D9-9AED-000A95BB581A";
35         
36         get_devices(Device[] devs out);
37         get_resource_spaces(ResourceSpace[] resource_spaces out);
38
39         // Try to auto-enumerate new devices.  If the bus is not capable
40         // of auto-enumeration, do nothing.  It is up to the specific bus
41         // type as to whether any action is taken for prevously-enumerated
42         // devices that are no longer detected.
43         
44         scan();
45 };