Page 1 of 1
[Solved] What chipset should I write drivers for?
Posted: Mon Jul 15, 2024 3:27 am
by trulyirrelevant
I am close to "completing" my kernel and am now looking at writing device drivers (i know I should get booting figured out first but still I need to get this sorted out)
Thankfully all I have written for a specific chipset (Intel, generic) are the ioapic and lapic, I figured that I should run on an emulator before doing things on real hardware but the problem is that qemu doesnt seem to do x86-64 and I have already written paging for that so I would like to not throw it away, what vm application can I use?
Re: What chipset should I write drivers for?
Posted: Mon Jul 15, 2024 9:33 am
by sebihepp
You can compile Bochs with x86_64 support.
Re: What chipset should I write drivers for?
Posted: Mon Jul 15, 2024 9:57 am
by iansjack
Qemu is an excellent x86_64 (amongst many other processors) virtual machine.
Re: What chipset should I write drivers for?
Posted: Mon Jul 15, 2024 11:16 am
by Octocontrabass
trulyirrelevant wrote: ↑Mon Jul 15, 2024 3:27 ami know I should get booting figured out first
Huh? How are you testing your code if you can't boot it?
trulyirrelevant wrote: ↑Mon Jul 15, 2024 3:27 amThankfully all I have written for a specific chipset (Intel, generic) are the ioapic and lapic,
You haven't written anything for any specific chipset. Those are generic components you'll find in every x86 PC (except really old ones).
Yes it does. What are you trying to do that doesn't work?
Re: What chipset should I write drivers for?
Posted: Tue Jul 16, 2024 3:14 am
by trulyirrelevant
Sorry mates I was looking at qemu/hw and did not see anything x64
Anyway, which x64 chipset would you guys recommend?
Re: What chipset should I write drivers for?
Posted: Tue Jul 16, 2024 3:42 pm
by thewrongchristian
trulyirrelevant wrote: ↑Tue Jul 16, 2024 3:14 am
Sorry mates I was looking at qemu/hw and did not see anything x64
Anyway, which x64 chipset would you guys recommend?
You don't need to target a specific chipset.
There is a sufficiently generic subset of chipset functionality to make a capable system enough system.
Intel and AMD based PCs basically enumerate PCI devices in the same way, PCI devices work the same regardless of chipset, the board firmware will count and setup your memory, so chipset differences in memory mapping don't need to be handled in the OS.
Just target a "generic" PC, with its generic x64 CPU, it's generic PCI bus with generic PCI devices.
My OS was written almost exclusively on QEMU (32-bit x86), but runs fine on the small number of devices I've tried it on, including both Intel and AMD CPU devices.
So don't worry about chipsets.
PS.
https://wiki.qemu.org/Documentation/Platforms/PC contains a description of the platform QEMU provides, including command line to start in x64 mode.
Re: What chipset should I write drivers for?
Posted: Wed Jul 17, 2024 5:28 pm
by trulyirrelevant
@thewrongchristian
Thank you! I found all datasheets easily too, it is looking bright