removed/optionalized debugging messages
This commit is contained in:
parent
b267d42531
commit
3f58857ce9
|
@ -45,6 +45,8 @@ FORWARD _PROTOTYPE( void do_rescan_bus, (message *mp) );
|
||||||
FORWARD _PROTOTYPE( void reply, (message *mp, int result) );
|
FORWARD _PROTOTYPE( void reply, (message *mp, int result) );
|
||||||
FORWARD _PROTOTYPE( struct rs_pci *find_acl, (int endpoint) );
|
FORWARD _PROTOTYPE( struct rs_pci *find_acl, (int endpoint) );
|
||||||
|
|
||||||
|
extern int debug;
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
int i, r;
|
int i, r;
|
||||||
|
@ -117,7 +119,7 @@ message *mp;
|
||||||
int i, r, empty;
|
int i, r, empty;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("pci_init: called by '%s'\n", mp->m3_ca1);
|
printf("PCI: pci_init: called by '%s'\n", mp->m3_ca1);
|
||||||
#endif
|
#endif
|
||||||
empty= -1;
|
empty= -1;
|
||||||
for (i= 0; i<NR_DRIVERS; i++)
|
for (i= 0; i<NR_DRIVERS; i++)
|
||||||
|
@ -145,7 +147,8 @@ message *mp;
|
||||||
mp->m_type= 0;
|
mp->m_type= 0;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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)
|
PRIVATE void do_first_dev(mp)
|
||||||
|
@ -157,8 +160,9 @@ message *mp;
|
||||||
|
|
||||||
aclp= find_acl(mp->m_source);
|
aclp= find_acl(mp->m_source);
|
||||||
|
|
||||||
if (!aclp)
|
if (!aclp && debug)
|
||||||
printf("do_first_dev: no acl for caller %d\n", mp->m_source);
|
printf("PCI: do_first_dev: no acl for caller %d\n",
|
||||||
|
mp->m_source);
|
||||||
|
|
||||||
r= pci_first_dev_a(aclp, &devind, &vid, &did);
|
r= pci_first_dev_a(aclp, &devind, &vid, &did);
|
||||||
if (r == 1)
|
if (r == 1)
|
||||||
|
@ -171,7 +175,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -197,7 +201,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +223,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,7 +243,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,7 +271,7 @@ message *mp;
|
||||||
len= strlen(name)+1;
|
len= strlen(name)+1;
|
||||||
if (len > name_len)
|
if (len > name_len)
|
||||||
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,
|
r= sys_vircopy(SELF, D, (vir_bytes)name, mp->m_source, D,
|
||||||
(vir_bytes)name_ptr, len);
|
(vir_bytes)name_ptr, len);
|
||||||
}
|
}
|
||||||
|
@ -276,7 +280,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,7 +317,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -333,7 +337,7 @@ message *mp;
|
||||||
len= strlen(name)+1;
|
len= strlen(name)+1;
|
||||||
if (len > name_len)
|
if (len > name_len)
|
||||||
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,
|
r= sys_vircopy(SELF, D, (vir_bytes)name, mp->m_source, D,
|
||||||
(vir_bytes)name_ptr, len);
|
(vir_bytes)name_ptr, len);
|
||||||
|
|
||||||
|
@ -341,7 +345,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -368,7 +372,7 @@ message *mp;
|
||||||
r= send(mp->m_source, mp);
|
r= send(mp->m_source, mp);
|
||||||
if (r != 0)
|
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);
|
mp->m_source, r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -380,7 +384,7 @@ message *mp;
|
||||||
|
|
||||||
if (mp->m_source != RS_PROC_NR)
|
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);
|
reply(mp, EPERM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -392,7 +396,7 @@ printf("do_acl: not from RS\n");
|
||||||
}
|
}
|
||||||
if (i >= NR_DRIVERS)
|
if (i >= NR_DRIVERS)
|
||||||
{
|
{
|
||||||
printf("do_acl: table is full\n");
|
printf("PCI: do_acl: table is full\n");
|
||||||
reply(mp, ENOMEM);
|
reply(mp, ENOMEM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -403,12 +407,13 @@ printf("do_acl: table is full\n");
|
||||||
sizeof(acl[i].acl), D);
|
sizeof(acl[i].acl), D);
|
||||||
if (r != OK)
|
if (r != OK)
|
||||||
{
|
{
|
||||||
printf("do_acl: safecopyfrom failed\n");
|
printf("PCI: do_acl: safecopyfrom failed\n");
|
||||||
reply(mp, r);
|
reply(mp, r);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
acl[i].inuse= 1;
|
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,
|
acl[i].acl.rsp_endpoint, acl[i].acl.rsp_label,
|
||||||
i);
|
i);
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
|
||||||
|
|
||||||
#define BAM_NR 6 /* Number of base-address registers */
|
#define BAM_NR 6 /* Number of base-address registers */
|
||||||
|
|
||||||
PRIVATE int debug= 0;
|
int debug= 0;
|
||||||
|
|
||||||
PRIVATE struct pcibus
|
PRIVATE struct pcibus
|
||||||
{
|
{
|
||||||
|
@ -720,7 +720,7 @@ printf("probe_bus(%d)\n", busind);
|
||||||
if (qemu_pci)
|
if (qemu_pci)
|
||||||
{
|
{
|
||||||
printf(
|
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));
|
sts & (PSR_SSE|PSR_RMAS|PSR_RTAS));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1227,7 +1227,7 @@ PRIVATE void complete_bars()
|
||||||
base= strtoul(cp, &next, 16);
|
base= strtoul(cp, &next, 16);
|
||||||
if (next == cp || *next != ':')
|
if (next == cp || *next != ':')
|
||||||
{
|
{
|
||||||
printf("pci: bad memory environment string '%s'\n",
|
printf("PCI: bad memory environment string '%s'\n",
|
||||||
memstr);
|
memstr);
|
||||||
panic(NULL, NULL, NO_NUM);
|
panic(NULL, NULL, NO_NUM);
|
||||||
}
|
}
|
||||||
|
@ -1235,7 +1235,7 @@ PRIVATE void complete_bars()
|
||||||
size= strtoul(cp, &next, 16);
|
size= strtoul(cp, &next, 16);
|
||||||
if (next == cp || (*next != ',' && *next != '\0'))
|
if (next == cp || (*next != ',' && *next != '\0'))
|
||||||
{
|
{
|
||||||
printf("pci: bad memory environment string '%s'\n",
|
printf("PCI: bad memory environment string '%s'\n",
|
||||||
memstr);
|
memstr);
|
||||||
panic(NULL, NULL, NO_NUM);
|
panic(NULL, NULL, NO_NUM);
|
||||||
}
|
}
|
||||||
|
@ -1290,7 +1290,7 @@ PRIVATE void complete_bars()
|
||||||
/* Should check main memory size */
|
/* Should check main memory size */
|
||||||
if (memgap_high < memgap_low)
|
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);
|
memgap_low, memgap_high);
|
||||||
panic(NULL, NULL, NO_NUM);
|
panic(NULL, NULL, NO_NUM);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue