[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Help writing a trivial device
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] Help writing a trivial device |
Date: |
Tue, 27 Sep 2011 15:05:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Zhi Yong Wu writes:
> 2011/9/26 Lluís Vilanova <address@hidden>:
>> 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
Re: [Qemu-devel] Help writing a trivial device, Zhi Yong Wu, 2011/09/27
- Re: [Qemu-devel] Help writing a trivial device,
Lluís Vilanova <=