minix/lib/libsys/pci_init.c

31 lines
666 B
C
Raw Normal View History

2005-12-02 15:41:46 +01:00
/*
pci_init.c
*/
#include "syslib.h"
2012-03-07 01:10:04 +01:00
#include <minix/ds.h>
#include <minix/sysutil.h>
endpoint_t pci_procnr= ANY;
2005-12-02 15:41:46 +01:00
/*===========================================================================*
* pci_init *
*===========================================================================*/
2012-03-25 20:25:53 +02:00
void pci_init(void)
2005-12-02 15:41:46 +01:00
{
2012-03-07 01:10:04 +01:00
int r;
message m;
r= ds_retrieve_label_endpt("pci", &pci_procnr);
if (r != 0)
panic("pci_init: unable to obtain label for 'pci': %d", r);
m.m_type= BUSC_PCI_INIT;
r= sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_init: can't talk to PCI: %d", r);
if (m.m_type != 0)
panic("pci_init: got bad reply from PCI: %d", m.m_type);
2005-12-02 15:41:46 +01:00
}