FORWARD _PROTOTYPE( void reply, (message *mp, int result) );
FORWARD _PROTOTYPE( struct rs_pci *find_acl, (int endpoint) );
+extern int debug;
+
int main(void)
{
int i, r;
int i, r, empty;
#if DEBUG
- printf("pci_init: called by '%s'\n", mp->m3_ca1);
+ printf("PCI: pci_init: called by '%s'\n", mp->m3_ca1);
#endif
empty= -1;
for (i= 0; i<NR_DRIVERS; i++)
mp->m_type= 0;
r= send(mp->m_source, mp);
if (r != 0)
- printf("do_init: unable to send to %d: %d\n", mp->m_source, r);
+ printf("PCI: do_init: unable to send to %d: %d\n",
+ mp->m_source, r);
}
PRIVATE void do_first_dev(mp)
aclp= find_acl(mp->m_source);
- if (!aclp)
- printf("do_first_dev: no acl for caller %d\n", mp->m_source);
+ if (!aclp && debug)
+ printf("PCI: do_first_dev: no acl for caller %d\n",
+ mp->m_source);
r= pci_first_dev_a(aclp, &devind, &vid, &did);
if (r == 1)
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_first_dev: unable to send to %d: %d\n",
+ printf("PCI: do_first_dev: unable to send to %d: %d\n",
mp->m_source, r);
}
}
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_next_dev: unable to send to %d: %d\n",
+ printf("PCI: do_next_dev: unable to send to %d: %d\n",
mp->m_source, r);
}
}
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_find_dev: unable to send to %d: %d\n",
+ printf("PCI: do_find_dev: unable to send to %d: %d\n",
mp->m_source, r);
}
}
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_ids: unable to send to %d: %d\n",
+ printf("PCI: do_ids: unable to send to %d: %d\n",
mp->m_source, r);
}
}
len= strlen(name)+1;
if (len > name_len)
len= name_len;
- printf("pci`do_dev_name: calling do_vircopy\n");
+ printf("PCI: pci`do_dev_name: calling do_vircopy\n");
r= sys_vircopy(SELF, D, (vir_bytes)name, mp->m_source, D,
(vir_bytes)name_ptr, len);
}
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_dev_name: unable to send to %d: %d\n",
+ printf("PCI: do_dev_name: unable to send to %d: %d\n",
mp->m_source, r);
}
}
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_dev_name: unable to send to %d: %d\n",
+ printf("PCI: do_dev_name: unable to send to %d: %d\n",
mp->m_source, r);
}
}
len= strlen(name)+1;
if (len > name_len)
len= name_len;
- printf("pci`do_slot_name: calling do_vircopy\n");
+ printf("PCI: pci`do_slot_name: calling do_vircopy\n");
r= sys_vircopy(SELF, D, (vir_bytes)name, mp->m_source, D,
(vir_bytes)name_ptr, len);
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_slot_name: unable to send to %d: %d\n",
+ printf("PCI: do_slot_name: unable to send to %d: %d\n",
mp->m_source, r);
}
}
r= send(mp->m_source, mp);
if (r != 0)
{
- printf("do_slot_name: unable to send to %d: %d\n",
+ printf("PCI: do_slot_name: unable to send to %d: %d\n",
mp->m_source, r);
}
}
if (mp->m_source != RS_PROC_NR)
{
-printf("do_acl: not from RS\n");
+ printf("PCI: do_acl: not from RS\n");
reply(mp, EPERM);
return;
}
}
if (i >= NR_DRIVERS)
{
-printf("do_acl: table is full\n");
+ printf("PCI: do_acl: table is full\n");
reply(mp, ENOMEM);
return;
}
sizeof(acl[i].acl), D);
if (r != OK)
{
-printf("do_acl: safecopyfrom failed\n");
+ printf("PCI: do_acl: safecopyfrom failed\n");
reply(mp, r);
return;
}
acl[i].inuse= 1;
- printf("do_acl: setting ACL for %d ('%s') at entry %d\n",
+ if(debug)
+ printf("PCI: do_acl: setting ACL for %d ('%s') at entry %d\n",
acl[i].acl.rsp_endpoint, acl[i].acl.rsp_label,
i);
#define BAM_NR 6 /* Number of base-address registers */
-PRIVATE int debug= 0;
+int debug= 0;
PRIVATE struct pcibus
{
if (qemu_pci)
{
printf(
- "pci: ignoring bad value 0x%x in sts for QEMU\n",
+ "PCI: ignoring bad value 0x%x in sts for QEMU\n",
sts & (PSR_SSE|PSR_RMAS|PSR_RTAS));
}
else
base= strtoul(cp, &next, 16);
if (next == cp || *next != ':')
{
- printf("pci: bad memory environment string '%s'\n",
+ printf("PCI: bad memory environment string '%s'\n",
memstr);
panic(NULL, NULL, NO_NUM);
}
size= strtoul(cp, &next, 16);
if (next == cp || (*next != ',' && *next != '\0'))
{
- printf("pci: bad memory environment string '%s'\n",
+ printf("PCI: bad memory environment string '%s'\n",
memstr);
panic(NULL, NULL, NO_NUM);
}
/* Should check main memory size */
if (memgap_high < memgap_low)
{
- printf("pci: bad memory gap: [0x%x .. 0x%x>\n",
+ printf("PCI: bad memory gap: [0x%x .. 0x%x>\n",
memgap_low, memgap_high);
panic(NULL, NULL, NO_NUM);
}