2 * Description for driver memory areas, used under UX.
22 Vhw_entry_type _type; // type of the descriptor
23 Unsigned32 _provider_pid; // Host PID of the program providing this area
25 Address _mem_start; // start of a memory area in physical memory
26 Address _mem_size; // size of the memory area
28 Unsigned32 _irq_no; // IRQ number for notification events
29 Unsigned32 _fd; // Communication file descriptor
33 void type(enum Vhw_entry_type t) { _type = t; }
34 void provider_pid(Unsigned32 p) { _provider_pid = p; }
35 void mem_start(Address a) { _mem_start = a; }
36 void mem_size(Address a) { _mem_size = a; }
37 void irq_no(Unsigned32 i) { _irq_no = i; }
38 void fd(Unsigned32 i) { _fd = i; }
46 Unsigned32 magic() const { return _magic; }
47 Unsigned8 version() const { return _version; }
48 Unsigned8 count() const { return _count; }
52 static Unsigned8 const count_const = 3; // nr of descriptors
54 Unsigned32 _magic; // magic value
55 Unsigned8 _version; // version of this description format
56 Unsigned8 _count; // nr of descriptors
60 Vhw_entry descs[count_const];
63 // -----------------------------------------------------------------
64 IMPLEMENTATION[ux,ia32]:
75 Vhw_entry::set(enum Vhw_entry_type t,
76 Address start, Address size,
77 Unsigned32 irqno, Unsigned32 provpid, Unsigned32 fdp)
83 provider_pid(provpid);
91 Vhw_descriptor::init()
97 for (int i = 0; i < count_const; i++)
103 Vhw_descriptor::set_desc(Vhw_entry::Vhw_entry_type type,
104 Address mem_start, Address mem_size,
105 Unsigned32 irq_no, Unsigned32 provider_pid,
108 if (type != Vhw_entry::TYPE_NONE)
109 descs[type - 1].set(type, mem_start, mem_size, irq_no, provider_pid, fdp);