custom message type for VM_INFO
[minix3.git] / lib / libsys / pci_attr_r8.c
blob2542614b5d5ee275b503ca14ff076222f5a3660f
1 /*
2 pci_attr_r8.c
3 */
5 #include "pci.h"
6 #include "syslib.h"
7 #include <minix/sysutil.h>
9 /*===========================================================================*
10 * pci_attr_r8 *
11 *===========================================================================*/
12 u8_t pci_attr_r8(devind, port)
13 int devind;
14 int port;
16 int r;
17 message m;
19 m.m_type= BUSC_PCI_ATTR_R8;
20 m.m2_i1= devind;
21 m.m2_i2= port;
23 r= ipc_sendrec(pci_procnr, &m);
24 if (r != 0)
25 panic("pci_attr_r8: can't talk to PCI: %d", r);
27 if (m.m_type != 0)
28 panic("pci_attr_r8: got bad reply from PCI: %d", m.m_type);
30 return m.m2_l1;