<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Linux 2.6 PCI Device Driver on Virtex 4</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>I have spent the past few months slowly trying to get a PCI design<BR>
with Linux 2.6 on the Virtex 4. I have been able to overcome some of<BR>
the hurdles; however, I am still unable to boot up a working system.<BR>
<BR>
I am using PPC.I have implemented Xilinx's board support&nbsp; package including<BR>
xparameter head file, ml410 early boot files, pci support files,<BR>
Board initialization file, did board specific setup, and fixed some<BR>
bugs in its call tree.<BR>
<BR>
I have attached my booting message in this mail.&nbsp; As you can see, I am<BR>
stuck at &quot;[&nbsp;&nbsp; 11.805382] Freeing unused kernel memory: 100k init&quot; . Usually<BR>
it's the last step before the kernel starts root file system. I am sure my ramdisk and<BR>
root file system were both working OK. My naive thought is that the kernel could not<BR>
register serial port successfully (see time stamp [ 5.965954]). As a result, ttyS0 was<BR>
not able to run and display messages after starting ramdisk.<BR>
<BR>
It's also interesting to see my ml410 board respond me with a &quot;ml300&quot;<BR>
id. My booting message was saying:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pci_scan: bus 0, device&nbsp; 8, id 030010ee<BR>
&quot;10ee&quot; is the vendor id for xilinx while &quot;0300&quot; is the device id which<BR>
I think might represent ml300. Does Xilinx forget to refresh its rom?<BR>
<BR>
<BR>
Here is my environment and tools:<BR>
-- Xilinx ML410 Rev C<BR>
-- Xilinx EDK 9.2i<BR>
-- Secret lab Linux v2.6 originally configured as platform Xilinx<BR>
ML403<BR>
<BR>
And my booting message:<BR>
---------------------------------------------------------------------------<BR>
Xilinx ML410 Board-Specific Initialization:<BR>
<BR>
ppb_init: dev =&nbsp; 9, id = ac23104c<BR>
pci_scan: bus 0, device&nbsp; 1, id 545110b9<BR>
pci_scan: bus 0, device&nbsp; 2, id 153310b9<BR>
pci_scan: bus 0, device&nbsp; 3, id 545710b9<BR>
pci_scan: bus 0, device&nbsp; 8, id 030010ee<BR>
pci_scan: bus 0, device&nbsp; 9, id ac23104c<BR>
pci_scan: bus 0, device 12, id 710110b9<BR>
pci_scan: bus 0, device 15, id 523710b9<BR>
sio_init: Device ID = 53 15, Revision = f3.<BR>
sio_init: LPT1 base = 0x0378, irq = 5.<BR>
sio_init: COM1 base = 0x03f8, irq = 4.<BR>
sio_init: COM2 base = 0x02f8, irq = 3.<BR>
sio_init: KBC irq = 1, PS2 irq = 1.<BR>
sio_init: Super I/O initialization complete.<BR>
<BR>
loaded at:&nbsp;&nbsp;&nbsp;&nbsp; 00400000 006C21B4<BR>
board data at: 006C0124 006C01A0<BR>
relocated to:&nbsp; 00405154 004051D0<BR>
zimage at:&nbsp;&nbsp;&nbsp;&nbsp; 00406215 004EFDAA<BR>
initrd at:&nbsp;&nbsp;&nbsp;&nbsp; 004F0000 006BFDB0<BR>
avail ram:&nbsp;&nbsp;&nbsp;&nbsp; 006C3000 08000000<BR>
<BR>
Linux/PPC load: console=ttyS0,9600 ip=off root=/dev/ram<BR>
Uncompressing Linux...done.<BR>
Now booting the kernel<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Linux version 2.6.23-rc2-g0d62d8a8-dirty (bhuang2@rsass-<BR>
homer.uncc.edu) (gcc version 4.2.1) #190 Thu Mar 28<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Xilinx ML40x Reference System (Virtex-4 FX)<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Port by MontaVista Software, Inc. (sou...@mvista.com)<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Zone PFN ranges:<BR>
[&nbsp;&nbsp;&nbsp; 0.000000]&nbsp;&nbsp; DMA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 -&gt;&nbsp;&nbsp;&nbsp; 32768<BR>
[&nbsp;&nbsp;&nbsp; 0.000000]&nbsp;&nbsp; Normal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32768 -&gt;&nbsp;&nbsp;&nbsp; 32768<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Movable zone start PFN for each node<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] early_node_map[1] active PFN ranges<BR>
[&nbsp;&nbsp;&nbsp; 0.000000]&nbsp;&nbsp;&nbsp;&nbsp; 0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 -&gt;&nbsp;&nbsp;&nbsp; 32768<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Built 1 zonelists in Zone order.&nbsp; Total pages: 32512<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Kernel command line: console=ttyS0,9600 ip=off root=/<BR>
dev/ram<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] Xilinx INTC #0 at 0x41200000 mapped to 0xE7FED000<BR>
[&nbsp;&nbsp;&nbsp; 0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)<BR>
[&nbsp;&nbsp;&nbsp; 0.000175] Console: colour dummy device 80x25<BR>
[&nbsp;&nbsp;&nbsp; 0.000241] console [ttyS0] enabled<BR>
[&nbsp;&nbsp;&nbsp; 1.382947] Dentry cache hash table entries: 16384 (order: 4, 65536<BR>
bytes)<BR>
[&nbsp;&nbsp;&nbsp; 1.466045] Inode-cache hash table entries: 8192 (order: 3, 32768<BR>
bytes)<BR>
[&nbsp;&nbsp;&nbsp; 1.572643] Memory: 125852k available (1480k kernel code, 496k<BR>
data, 100k init, 0k highmem)<BR>
[&nbsp;&nbsp;&nbsp; 1.764350] Mount-cache hash table entries: 512<BR>
[&nbsp;&nbsp;&nbsp; 1.827727] PCI: Probing PCI hardware<BR>
[&nbsp;&nbsp;&nbsp; 1.906477] ppc405_map_irq: bus 0 idsel 1 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 1.970528] ppc405_map_irq: bus 0 idsel 2 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.035157] ppc405_map_irq: bus 0 idsel 3 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.099646] ppc405_map_irq: bus 0 idsel 8 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.164225] ppc405_map_irq: bus 0 idsel 9 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.228787] ppc405_map_irq: bus 0 idsel 11 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.294400] ppc405_map_irq: bus 0 idsel 12 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.360031] ppc405_map_irq: bus 0 idsel 15 pin 1, res = 31<BR>
[&nbsp;&nbsp;&nbsp; 2.441645] SCSI subsystem initialized<BR>
[&nbsp;&nbsp;&nbsp; 2.487503] usbcore: registered new interface driver usbfs<BR>
[&nbsp;&nbsp;&nbsp; 2.553907] usbcore: registered new interface driver hub<BR>
[&nbsp;&nbsp;&nbsp; 2.617790] usbcore: registered new device driver usb<BR>
[&nbsp;&nbsp;&nbsp; 2.687574] checking if image is initramfs...it isn't (no cpio<BR>
magic); looks like an initrd<BR>
[&nbsp;&nbsp;&nbsp; 4.548936] Freeing initrd memory: 1855k freed<BR>
[&nbsp;&nbsp;&nbsp; 4.606889] io scheduler noop registered<BR>
[&nbsp;&nbsp;&nbsp; 4.653232] io scheduler anticipatory registered (default)<BR>
[&nbsp;&nbsp;&nbsp; 4.718790] io scheduler deadline registered<BR>
[&nbsp;&nbsp;&nbsp; 4.769907] io scheduler cfq registered<BR>
[&nbsp;&nbsp;&nbsp; 4.815634] Activating ISA DMA hang workarounds.<BR>
[&nbsp;&nbsp;&nbsp; 5.667502] 0000:00:0f.0 OHCI: BIOS handoff failed (BIOS bug ?)<BR>
ffffffff<BR>
[&nbsp;&nbsp;&nbsp; 5.798505] Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports,<BR>
IRQ sharing disabled<BR>
[&nbsp;&nbsp;&nbsp; 5.892194] serial8250: ttyS0 at MMIO 0x0 (irq = 12) is a 16550A<BR>
[&nbsp;&nbsp;&nbsp; 5.965954] Couldn't register serial port 0000:00:03.0: -28<BR>
[&nbsp;&nbsp;&nbsp; 6.044910] RAMDISK driver initialized: 16 RAM disks of 65536K size<BR>
1024 blocksize<BR>
[&nbsp;&nbsp;&nbsp; 6.141529] loop: module loaded<BR>
[&nbsp;&nbsp;&nbsp; 6.178422] Uniform Multi-Platform E-IDE driver Revision:<BR>
7.00alpha2<BR>
[&nbsp;&nbsp;&nbsp; 6.254522] ide: Assuming 33MHz system bus speed for PIO modes;<BR>
override with idebus=xx<BR>
[&nbsp;&nbsp;&nbsp; 6.351314] ALI15X3: IDE controller at PCI slot 0000:00:0b.0<BR>
[&nbsp;&nbsp;&nbsp; 6.418510] ALI15X3: chipset revision 196<BR>
[&nbsp;&nbsp;&nbsp; 6.466414] ALI15X3: 100% native mode on irq 31<BR>
[&nbsp;&nbsp;&nbsp; 6.520489] ALI15X3: simplex device: DMA forced<BR>
[&nbsp;&nbsp;&nbsp; 6.574602]&nbsp;&nbsp;&nbsp;&nbsp; ide0: BM-DMA at 0xdfd0-0xdfd7, BIOS settings:<BR>
hda:DMA, hdb:DMA<BR>
[&nbsp;&nbsp;&nbsp; 6.660918] ALI15X3: simplex device: DMA forced<BR>
[&nbsp;&nbsp;&nbsp; 6.715201]&nbsp;&nbsp;&nbsp;&nbsp; ide1: BM-DMA at 0xdfd8-0xdfdf, BIOS settings:<BR>
hdc:DMA, hdd:DMA<BR>
[&nbsp;&nbsp;&nbsp; 9.054991] usbmon: debugfs is not available<BR>
[&nbsp;&nbsp;&nbsp; 9.106161] mice: PS/2 mouse device common for all mice<BR>
[&nbsp;&nbsp;&nbsp; 9.168819] ali15x3_smbus 0000:00:0c.0: ALI15X3_smb region<BR>
uninitialized - upgrade BIOS or use force_addr=0xaddr<BR>
[&nbsp;&nbsp;&nbsp; 9.290327] ali15x3_smbus 0000:00:0c.0: ALI15X3 not detected,<BR>
module not inserted.<BR>
[&nbsp;&nbsp;&nbsp; 9.383605] RAMDISK: Compressed image found at block 0<BR>
[&nbsp;&nbsp; 11.704980] VFS: Mounted root (ext2 filesystem) readonly.<BR>
[&nbsp;&nbsp; 11.805382] Freeing unused kernel memory: 100k init<BR>
................kernel stops here................<BR>
<BR>
---------------------------------------------------------------------------<BR>
<BR>
<BR>
If anyone has tried to do this (or has already done this) I would<BR>
apprecaite any help or suggestions.<BR>
<BR>
regards,<BR>
<BR>
Bin </FONT>
</P>

</BODY>
</HTML>