29jm / SnowflakeOS

"It is very special"
https://jmnl.xyz
MIT License
316 stars 18 forks source link

AHCI + SATA updates & upgrades #41

Closed thesilvanator closed 1 year ago

thesilvanator commented 1 year ago

Hey! I know its been quite a while!

I spent some time cleaning up the AHCI + SATA driver I wrote as things were quite messy. They still are tbh haha, but at least its an improvement. Also, a lot of what's in here is simple formatting changes resulting from the .clang-format file.

This is the initial part of a couple of additions I intend to add right now. Those being:

I know previously we discussed a block driver layer as well. I'll try and get to that after these additions if the time is available.

Also, a lot of what's in here is simple formatting changes resulting from the .clang-format file.

Thanks!

29jm commented 1 year ago

Hey! I just wanted to let you know that I'm looking at this PR and will get to merging it, it looks good! I want to play around a bit with this over Christmas also.

thesilvanator commented 1 year ago

Awesome! I appreciate you looking at this.

I also have another branch right now that can detect ACPI presence and what tables are available. I'm just cleaning it up a bit cause it is quite messy (dealing with the different structures for ACPI 1 vs 2.0+ is ugly lol). I'll probably get that done and add it to this PR in the next few days and then begin IOMMU support.

Thanks!

29jm commented 1 year ago

My apologies for the long merge time here. I really appreciate the fixes, thank you!

I wish I was helping you with this more, for instance integrating this with other systems, e.g. the ext2 driver somehow -- let me know if there is anything like that you would have me do, or document maybe. In any case I will do my best to merge this branch to master, I just want to go through things once more, adding small stuff here and there. From mid February I will have more time than I've had so far this year.

I'm curious about the ACPI tables thing, what can be done with it, what info it gives us. Don't hesitate to open even an early PR!

thesilvanator commented 1 year ago

No worries at all. I appreciate you looking at it!

I do want to build out the functionality a bit more so that it can be integrated (hopefully seamlessly) with the ext2 filesystem or whichever other filesystems may get added down the road. Looking to do that in the (relatively) near future. I also want to fix the booting on real hardware issue you mentioned in the previous PR.

The ACPI tables are mostly the firmware giving info on the hardware from what I understand. You can use it to get information on IOMMUs, APICs, number of cpu cores, etc. The branch I have right now for ACPI is pretty much complete in terms of enumerating desired tables, so I'll probably look over it one more time and send a PR. Although we don't really use the tables for anything so I guess it's a bit of a "useless" feature lol.

I'm gonna have to walk back adding IOMMU support at the moment haha. A bit of a bigger beast than I expected. Maybe one day down the road, though.

Thanks again for looking over this!