hello,

I'm learning uefi <http://en.wikipedia.org/wiki/Uefi> and qemu.

If I understand correctly, in uefi, device drivers contain at least three
functions: supported, start and stop. When PCI devices are discovered, all
drivers "supported" function is invoked and if this function returns true,
its "start" function is invoked later to manage the device properly.

The "supported" function seems to be looking for pci vendor id and device
id to know whether it supports this device or not.

I've tested hello world applications and drivers provided by intel on their
tianocore site (with edk2). They suggest launching the uefi shell and
either launching the application manually or loading the driver manually
from the uefi shell. It works, I tested with OVMF and qemu. But now I want
this driver invoked automatically when a PCI device is discovered.

To do this, I want to add a new fake device in qemu that will just trigger
pci detection by uefi bios so that I can trigger my uefi driver code with
dummy pci vendor and device ids.

I'm sorry, this is really a beginner's question and it has probably been
asked many times, but is there a hello world device code for qemu
somewhere? I've been looking for it but cannot find a clue.

I think I'll take an emulated pci device in qemu's source code and take it
as an example, if you have any suggestion or typical mistakes to avoids...


Thank you,

yohann

Reply via email to