Tips for kernel development

I am porting a PCI driver to Haiku for handling my NVMe ssds in RAID mode. Being new to the process, I copied the code from: X86PCIController.cpp « x86 « pci « busses « kernel « add-ons « src - haiku - Haiku's main repository
changing SupportsDevice() and RegisterDevice(). I then built a new image and installed haiku into my partition. Here’s my question:

How do I know if my driver was registered with the correct device? (NOTE: I get a kernel panic when trying to boot due to the missing driver I am trying to write.) Is there a way to verify my driver during the boot process(stepping through it) or in the kdebug terminal?

Any other general tips for writing a driver( PCI specifically )?

1 Like

You can use listimage to verify it is loaded.

To verify it is attached to the right device you can probably log to the system log from the driver and then chrck /var/log/syslog