Robert, I'll take a look this evening and get back to you. This has run on bare hardware before, as well as in a jailhouse cell, so it should be fairly close to running on your hardware. I do most of my testing inside of QEMU since it is much easier for me to attach the debugger, but I'll see if I can still get this running directly on my NUC.
As for the multiple PCI busses I will need to look at that as well. >From what I remember the enumeration code structures handle the bus id, but I would need to look at how we identify the buses that we scan. This is actually all timely because I just got some PCIe hardware that I have been waiting for for a few months, so let's see what we can do. --Brennan On Thu, Jul 30, 2020 at 1:21 PM Robert Faron <robe...@cmslaser.com> wrote: > > Brennan , > I got your latest code this morning with the pcitest config and have been > able to make it create an iso and run it in qemu. The qemu_pci_init runs and > scans bus 0 which maybe the only bus that qemu is providing. I see the is a > function for mapping pci memory for qemu but there isn't one for real > hardware if I am not mistaken, which is easy enough to write once I can get > an image to boot actual hardware. > > For my hardware I would need the pci_init to scan at least the first 3 buses. > My device is on bus 2 vendor id 0x1204 device id 0xec30 currently at bar0 > 0xf7c40000 and bar1 0xf7c00000 each are 256k. > > I did try to use grub to boot the nuttx.elf file however it told me there > would be no console. And it seems to either lock up the computer or quite > possibly just didn't have any console. So my question is what do I do to boot > actual hardware? > My hardware is intel i3-4160 running on a asus 885m-e with 8gb of ram ddr3. > > -----Original Message----- > From: Robert Faron <robe...@cmslaser.com> > Sent: Thursday, July 30, 2020 9:51 AM > To: dev@nuttx.apache.org > Subject: RE: AMD64 arch > > Brennan, > > Thanks for the help thus far. I cloned your branch yesterday afternoon. I > created nuttx.elf files for both qemu-intel64:ostest and qemu-intel64:nsh. I > created iso files using grub as your README.txt stated. And was able to boot > both via qemu this morning. Looks like the OSTEST automatically runs > ostest_main which completes with status 0. However the nsh build brings me > to a nsh> prompt and randomly returns " nsh> nsh: nsh_session: cle failed: 22 > " > > I'll clone the rebase of pci and try the pcitest config > > > > > -----Original Message----- > From: Brennan Ashton <bash...@brennanashton.com> > Sent: Wednesday, July 29, 2020 10:53 PM > To: dev@nuttx.apache.org > Subject: Re: AMD64 arch > > On Wed, Jul 29, 2020 at 12:26 PM Brennan Ashton <bash...@brennanashton.com> > wrote: > > > I would also recommend working off of my branch. There is stuff in > > the current pci branch that will need to go away especially around MSI > > and MSI-X. If you are ok using the legacy interrupt for now it should > > be ok. > > > > There is an example here I did for the QEMU PCI Edu device that > > implements interrupts, mmio, and dma. > > https://github.com/btashton/incubator-nuttx/blob/pci-btashton/drivers/ > > virt/qemu_edu.c > > > > I can try to rebase the branch up to master this evening. > > I have rebased the PCI branch as well as my PR on top of it and verified that > my test drivers still run as expected. Additionally I added a new > configuration pcitest with all the needed features enabled as well as a > couple lines to the README. > > --Brennan > NOTICE: This e-mail message and all attachments transmitted with it may > contain trade secrets and confidential information intended solely for the > use of the addressee. If the reader of this message is not the intended > recipient, you are hereby notified that any reading, dissemination, > distribution, copying, or other use of this message or its attachments is > strictly prohibited. If you have received this message in error, please > notify the sender immediately by telephone at 407-679-9716, and delete this > message and all copies and backups thereof. Thank you > NOTICE: This e-mail message and all attachments transmitted with it may > contain trade secrets and confidential information intended solely for the > use of the addressee. If the reader of this message is not the intended > recipient, you are hereby notified that any reading, dissemination, > distribution, copying, or other use of this message or its attachments is > strictly prohibited. If you have received this message in error, please > notify the sender immediately by telephone at 407-679-9716, and delete this > message and all copies and backups thereof. Thank you