Zhi Yong Wu writes: > 2011/9/26 Lluís Vilanova <vilan...@ac.upc.edu>: >> The testing system is a Linux 2.6.32, with this: >> >> int fd = open("/sys/devices/pci0000:00/000000:00:004.00/resource0", O_RDWR); >> void *addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); >> printf("-> %ld\n", *(uint64_t*)addr); > This is the way about how to test bar? Does bar1 correspond to guest > file /sys/devices/pci0000:00/000000:00:004.00/resource0?
In linux, resourceN corresponds to the Nth BAR. Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth