9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jake <plan9@10k.org>
To: 9fans@cse.psu.edu
Subject: [9fans] PCI vs. VPC
Date: Sat,  4 May 2002 02:04:44 -0400	[thread overview]
Message-ID: <Pine.GSO.4.43.0205040201180.13696-100000@matrix.10k.org> (raw)

Hi,

We got release 4 running in Virtual PC 5.0.2 on Mac OS X 10.1.4.
Everything seems to work as expected except ethernet. VPC emulates an
Intel 21041-based ethernet card.

	Ethernet
	* Emulates a DEC/Intel 21041-based PCI Ethernet card
	* The card is plug-and-play and can be reconfigured by the
	  operating system, but default settings use IRQ 1

complete list of emulated hardware is here:
http://fmpweb.connectix.com/kdb_new/FMPro?-db=kdb%5fweb.fp5&-format=detail.htm&-lay=entry&-sortfield=modified&-sortorder=descend&Keywords=emulated%20hardware&-max=30&-recid=34251&-find=


We change the ethernet driver with the following modification in hope to
make it work:

191d190
<       Tulip2          = (0x0002 << 16) | 0x1011,
678c677
<       if(ctlr->id == Pnic || ctlr->id == Tulip2){
---
>       if(ctlr->id == Pnic){
727c726
<       if(ctlr->id == Pnic || ctlr->id == Tulip2){
---
>       if(ctlr->id == Pnic){
1391c1390
<       if(ctlr->id == Pnic || ctlr->id == Tulip2){
---
>       if(ctlr->id == Pnic){
1515d1513
<               case Tulip2:            /* 2104x */
1555d1552
<               case Tulip2:

We decided to try this as a simple hack before we noticed that the OS
wasn't seeing PCI devices at all. Our /dev/pci directory is completely
empty! and we do mean dead empty, not even the VGA card was noted in the
pci list, despite that we have video running at 1600x1024.

So the next step, we sprinkled some diagnostic code throughout pci.c and
noticed that we are getting failures in the pcilscan() routine.

for the inner loop of that function, we added

        tbdf = MKBUS(BusPCI, bno, dno, fno);
            l = pcicfgrw32(tbdf, PciVID, 0, 1);
            if(l == 0xFFFFFFFF || l == 0) {
                print("pcicfgrw32 error %d\n", l);
                continue;
            }

with this snippet, pcicfgrw32() consistently returns -1 for every bus(0-7)
and every device(0-15).

we then added the following code to pcicfgrw32()

    if(BUSDNO(tbdf) > pcimaxdno) {
        print("BUSDNO(%d) failed!\n", tbdf);
        return x;
    }

and this message was never printed, indicating the -1 was read from the
port.

We also tried adding the following attribute to the plan9.ini file without
success.

*nobios=1

We speculate the bug is in the inl() code, but we don't know enough about
PCI to debug this. (Both Windows and Linux have no problem seeing the PCI
and the Ethernet card in the vm).


below is the boot text. All you 9gods out there,
would you please shed some light on this? thank you.

jake & north_



MBR...PBS...Plan 9 from Bell Labs
ELCR: 0A00
apm ax=f000 cx=f000 dx=40 di=1200 ebx=a519 esi=3e6
dev A0 port 1F0 config 045A capabilities 0F00 mwdma 0407
dev A0 port 170 config 85A0 capabilities 0300 mwdma 0000
using sdC0!9fat!plan9.ini
found 9PCDISK .    attr 0x0 start 0x702 len 1743030
....742283.........................................................................
....................+674324........................................................
.............................+76940=1493547
entry: 0x80100020
cpu0: 533MHz ConnectixCPU PentiumIII/Xeon (cpuid: AX 0x0684 DX 0x80A1FB)
ELCR: 0A00
dev A0 port 1F0 config 045A capabilities 0F00 mwdma 0407 dma 00000004 rwm
16
dev A0 port 170 config 85A0 capabilities 0300 mwdma 0000 dma 00000000 rwm
0
19379 free pages, 77516K bytes, 311116K swap
root is from (il, local)[local!#S/sdC0/fs]:






             reply	other threads:[~2002-05-04  6:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-04  6:04 Jake [this message]
2002-05-04 19:06 ` [9fans] SGI O2 Jake
2002-05-04 19:40   ` Dean Prichard
2002-05-04 13:12 [9fans] PCI vs. VPC jmk
2002-05-07 12:05 ` Stephen J. Bevan
2002-05-04 14:31 jmk
2002-05-07 11:59 ` Don
2002-05-07 15:25 jmk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.43.0205040201180.13696-100000@matrix.10k.org \
    --to=plan9@10k.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).