[Solved] What chipset should I write drivers for?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
trulyirrelevant
Posts: 5
Joined: Mon Jul 15, 2024 3:15 am

[Solved] What chipset should I write drivers for?

Post 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?
Last edited by trulyirrelevant on Wed Jul 17, 2024 5:34 pm, edited 1 time in total.
sebihepp
Member
Member
Posts: 184
Joined: Tue Aug 26, 2008 11:24 am
GitHub: https://github.com/sebihepp

Re: What chipset should I write drivers for?

Post by sebihepp »

You can compile Bochs with x86_64 support.
User avatar
iansjack
Member
Member
Posts: 4683
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: What chipset should I write drivers for?

Post by iansjack »

Qemu is an excellent x86_64 (amongst many other processors) virtual machine.
Octocontrabass
Member
Member
Posts: 5501
Joined: Mon Mar 25, 2013 7:01 pm

Re: What chipset should I write drivers for?

Post 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).
trulyirrelevant wrote: Mon Jul 15, 2024 3:27 amqemu doesnt seem to do x86-64
Yes it does. What are you trying to do that doesn't work?
trulyirrelevant
Posts: 5
Joined: Mon Jul 15, 2024 3:15 am

Re: What chipset should I write drivers for?

Post by trulyirrelevant »

Sorry mates I was looking at qemu/hw and did not see anything x64
Anyway, which x64 chipset would you guys recommend?
thewrongchristian
Member
Member
Posts: 422
Joined: Tue Apr 03, 2018 2:44 am

Re: What chipset should I write drivers for?

Post 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.
trulyirrelevant
Posts: 5
Joined: Mon Jul 15, 2024 3:15 am

Re: What chipset should I write drivers for?

Post by trulyirrelevant »

@thewrongchristian
Thank you! I found all datasheets easily too, it is looking bright :D
Post Reply