1
0
Fork
You've already forked pci-echodev
0
A PCI Echo Device for QEMU
  • C 99.3%
  • Makefile 0.7%
2024年01月06日 18:31:27 +01:00
bar0_test.c Added Legacy IRQ support 2024年01月06日 18:31:27 +01:00
bar1_test.c mmap implemented for BAR1 2023年11月30日 21:00:23 +01:00
echodev-cmd.h Added Legacy IRQ support 2024年01月06日 18:31:27 +01:00
echodev-drv.c Added Legacy IRQ support 2024年01月06日 18:31:27 +01:00
LICENSE Initial commit 2023年11月11日 18:13:25 +01:00
Makefile mmap implemented for BAR1 2023年11月30日 21:00:23 +01:00
pci-echodev.c Added Legacy IRQ support 2024年01月06日 18:31:27 +01:00
README.md Upload pci-echodev 2023年11月11日 20:24:37 +01:00

Emulating a PCI Device with QEMU

This repository contains a PCI Device for QEMU and a driver for it.

pci-echodev

The PCI devices comes with two memory space BARs. BAR1 is 4kB in size and offers memory storage. Values written to it, will be stored and can be read back.

BAR0 is also memory space and is diveded in four 4 Byte registers according to the following table:

Offset Name Default Value Description
0x0 ID 0xcafeaffe ID for identification
0x4 INVERT 0 The inverted writen value can be read back
0x8 IRQ CTRL 0 Can be used to fire and acknowledge IRQs
0xC RANDOM VAL 0 Returns a random value on read

Driver

Tbd.

Resources

implementation of a custom QEMU PCI device by Nikos Mouzakitis