MollenOS wrote:
If you don't have the motivation or interest to write your own kernel and drivers, I don't see how you would ever succeed. Writing an OS or just a simple driver requires immense knowledge of both software and hardware, and I'm saying this again, there is no shortcut. You don't have to read an entire specification, you do like normal people would and find the parts that are relevant, 60-80% of an specification can be directly ignored as it's primarily technical information/for hardware designers.
If you seriously don't have the will, or the motivation do finish what you've started, then stop now. OS development is not for you. Find something else to do, use windows and write an application in C#. You have other options.
I'll say this the last time, you have to start at the bottom like everyone else. Driver development is OS-specific, so no such library exists. Every driver is tailored to the OS, and while it's possible to standardize an implementation, you still have to support the same function-set as the driver uses.
I've been developing .NET applications for the past 5 years give or take and it's getting pretty boring. That's why I want to take a break and do something funny in C++. And the only thing I really wanted to make and haven't ever been able to is an OS. Basic one suffices for as long as I can keep on adding modules.
Drivers such as these aren't necessarily OS specific. You can have a library that gives you some kind of API and it can be implemented into any OS with ease, because it works directly with hardware. The AHCI driver is merely being used by the rest of the system, it doesn't need to communicate with it and therefore a simply read/write sector API is all I really need. That surely doesn't have to be OS dependent.
iansjack wrote:
It looks like the basic problem here is that you don't actually understand what an operating system is and what it does. I'd stick with your original plan of writing some sort of user application on top of the Linux kernel; that way you get all the hardware support that you need.
Frankly I know very well what an OS is. I just hoped it would be easier to use parts of the Linux kernel. I need mine to be simply and fast, that would be impossible if I relied on Linux.
SpyderTL wrote:
Let us know if there is anything else we can help with. (Just try to be a little more specific when asking questions.)
So.. If I understand correctly.. I first check all the slots on all the PCI buses for SATA mass storage devices and then read their BAR5 and use the returned value as a pointer to the HBA_MEM struct of that device. Is that so?
Because that was the initial question "How do I get the ABAR?" and it appears to me that this might just as well be the answer.
Edit: The BAR5 of a SATA device (CD-ROM drive) in VMWare machine is 0xFD5FF000 which is definitely out of my memory's reach. What am I supposed to do with it?
I've allocated 0x0 - 0x800000 physical / 0xC0000000 - 0xC0800000 virtual memory if that's related in any sense.
And yes, I've already read
the Wiki page regarding this matter.