[openib-general] [ANNOUNCE] tvflash: userspace-only Mellanox HCA flash tool
Tom Duffy
tduffy at sun.com
Tue Sep 14 13:28:04 PDT 2004
On Tue, 2004-09-14 at 13:04 -0700, Roland Dreier wrote:
> OK, can you give it another shot now? I added an "__attribute__((packed))"
> for the Topspin VSD struct. When I split things up refactoring some
> code I changed the alignment of some fields so that it no longer gets
> packed naturally on 64-bit archs.
Yeah, it looks good as far as compiling goes now. Thanks.
I still am trying to figure out why running it on sparc64 is hanging in
the do loop of flash_write_cmd():
tat:~# strace /tmp/tvflash -i
execve("/tmp/tvflash", ["/tmp/tvflash", "-i"], [/* 16 vars */]) = 0
uname({sys="Linux", node="tat", ...}) = 0
brk(0) = 0x268f0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=50853, ...}) = 0
mmap(NULL, 50853, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7002c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpci.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\0\30"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=33288, ...}) = 0
mmap(NULL, 97784, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x7003c000
mprotect(0x70044000, 65016, PROT_NONE) = 0
mmap(0x7004c000, 32768, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x7004c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\2\0\0\0\1\0\1\316"..., 512) = 512fstat64(3, {st_mode=S_IFREG|0644, st_size=1291820, ...}) = 0
mmap(NULL, 1361736, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x70054000
mprotect(0x70188000, 100168, PROT_NONE) = 0
mmap(0x70194000, 49152, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x130000) = 0x70194000
mmap(0x701a0000, 1864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x701a0000
close(3) = 0
munmap(0x7002c000, 50853) = 0
ioctl(0, 0x40087468, 0xeffffcb0) = 0
brk(0) = 0x268f0
brk(0x488f0) = 0x488f0
brk(0) = 0x488f0
brk(0x4a000) = 0x4a000
access("/sys/bus/pci/devices", R_OK) = -1 ENOENT (No such file or directory)
uname({sys="Linux", node="tat", ...}) = 0
access("/proc/bus/pci", R_OK) = 0
open("/proc/bus/pci/devices", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7001a000
read(3, "0000\t108e8000\t0\t 0"..., 8192) = 2060
open("/proc/bus/pci/00/00.0", O_RDONLY) = 4
pread(4, "\0", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/00/01.0", O_RDONLY) = 4
pread(4, "\200", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/00/01.1", O_RDONLY) = 4
pread(4, "\200", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/00/03.0", O_RDONLY) = 4
pread(4, "\200", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/00/03.1", O_RDONLY) = 4
pread(4, "\200", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/01/00.0", O_RDONLY) = 4
pread(4, "\0", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/01/01.0", O_RDONLY) = 4
pread(4, "\1", 1, 14) = 1
close(4) = 0
open("/proc/bus/pci/02/00.0", O_RDONLY) = 4
pread(4, "\0", 1, 14) = 1
read(3, "", 8192) = 0
close(3) = 0
munmap(0x7001a000, 8192) = 0
open("/dev/mem", O_RDWR) = 3
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0x100000) = 0x701a4000
close(3) = 0
....hangs here....
# gdb tvflash
GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "sparc-linux"...Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run -i
Starting program: /build2/tduffy/tvflash/src/tvflash -i
Program received signal SIGTSTP, Stopped (user).
0x00011b0c in READ_CFG (addr=983460) at tvflash.c:499
499 } /* READ_CFG */
(gdb) bt
#0 0x00011b0c in READ_CFG (addr=983460) at tvflash.c:499
#1 0x00011ca0 in flash_write_cmd (addr=0) at tvflash.c:555
#2 0x00012df4 in identify_hca (num=0, tvdev=0x26b40,
identify_mode=IDENTIFY_EXTENDED) at tvflash.c:1153
#3 0x000132f0 in identify_hcas (hca=-1, identify_mode=IDENTIFY_EXTENDED)
at tvflash.c:1325
#4 0x00014e98 in main (argc=2, argv=0xeffffd64) at tvflash.c:2166
--
"When they took the 4th Amendment, I was quiet because I didn't deal
drugs. When they took the 6th Amendment, I was quiet because I am
innocent. When they took the 2nd Amendment, I was quiet because I don't
own a gun. Now they have taken the 1st Amendment, and I can only be
quiet." --Lyle Myhr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20040914/f5a9ddad/attachment.sig>
More information about the general
mailing list