flat assembler
Message board for the users of flat assembler.

Index > OS Construction > help me with SATA

Author
Thread Post new topic Reply to topic
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 04 Mar 2011, 06:12
Hi everyone!
I am making a bootloader for my Os and i want to boot from SATA device, the only problem is that i cant find how to use SATA drives...... The only thing I found is SATA specs but it is too complex, most of this specs contains almost nothing i need to know, because I need only IO ports and what are they stand for. If you have seen any tutorials on SATA please post..
P.S. I already asked guys on OSdev.org and searched their whole Wiki, and still nothing (except AHCI)

_________________
_______________________________
NSOS
Post 04 Mar 2011, 06:12
View user's profile Send private message Reply with quote
poupougne



Joined: 04 May 2007
Posts: 15
Location: Lyon, France
poupougne 04 Mar 2011, 08:05
Hi,
If i remember well :
You can try to scan PCI devices, and search for IDE/SATA controler.
Then BAR0 to BAR3 slots will give you I/O addresses, that you can use for accessing SATA drives, with the same protocol than IDE 0x1f0 native driver.
Post 04 Mar 2011, 08:05
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 04 Mar 2011, 12:36
I think you can use this approach only if you disabled "Native SATA mode" in BIOS, so that BIOS shows SATA disks as legacy IDEs.
Post 04 Mar 2011, 12:36
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 04 Mar 2011, 15:03
poupougne wrote:
Hi,
If i remember well :
You can try to scan PCI devices, and search for IDE/SATA controler.
Then BAR0 to BAR3 slots will give you I/O addresses, that you can use for accessing SATA drives, with the same protocol than IDE 0x1f0 native driver.

thanks, but still complete tutorial would be better

Quote:
I think you can use this approach only if you disabled "Native SATA mode" in BIOS, so that BIOS shows SATA disks as legacy IDEs.

but i chose SATA because
1.Its next generation technology
2.Its very fast
so, i need Native sata mode
Post 04 Mar 2011, 15:03
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 04 Mar 2011, 16:27
@BOTOKILLER, you have just learned your first lesson of OS Dev.
That is you are going to have to compromise and build your OS around what is easily available.
You will always be coding with one hand tide behind your back.

Save yourself some time and take Madis731 advice,'use legacy IDEs'
Post 04 Mar 2011, 16:27
View user's profile Send private message Reply with quote
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 04 Mar 2011, 17:23
Dex4u wrote:
@BOTOKILLER, you have just learned your first lesson of OS Dev.
That is you are going to have to compromise and build your OS around what is easily available.
You will always be coding with one hand tide behind your back.

Save yourself some time and take Madis731 advice,'use legacy IDEs'


Crying or Very sad
Post 04 Mar 2011, 17:23
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 04 Mar 2011, 17:36
Quote:


but i chose SATA because
1.Its next generation technology
2.Its very fast
so, i need Native sata mode

2012 is soon. then, nothing can be assumed as a future.

use the still working and well documented hw.
for example, i have 3 PC from PMMX to atom (+2 old compac 386), and none of them have sata.
Post 04 Mar 2011, 17:36
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias 04 Mar 2011, 22:56
I don't know how to program SATA. Nevertheless, I use only SATA, in my machines, except for those few (3) computers upon which I still run Win 98.

Though it seems only yesterday that Win 98 appeared on the scene, so vibrant, compared with Win 95, but today, it appears to function like a forlorn kitten, abandoned by one and all.

Here's a good game.

Take an old computer, one that still can run floppies and win98. Make a task. Any task will do.

Time it.

Then install the Linux of that era, i.e. from ten years ago.
Haha. you won't even be able to install it.....

But, if you do finally get something in the Unix world to boot up, after ten years sitting on a shelf, don't be surprised, when you run your same test, whatever the test, that Linux is S L O W, compared with Win 98.

Then, just for grins, install the newest, slickest, best Linux out there. Oops. It may fail to show the same video resolution as Win 98--1280 x 1024. You may have to live with 800 x 600. But, even so, go ahead and install the latest and greatest.

Now run your test again.. .... Haha.

STILL SLOWER than Win 98, I will bet you.....

Ok, final test: Get out your stop watch, and turn off the machine, measure the time needed to power off, after signalling the OS of your desire to quit for the day......

Win98 TWO SECONDS. Linux xyz flavor, doesn't matter which: TWENTY seconds, on the SAME computer, same hard drive, same cpu, same memory..... I have run this same test hundreds of times on my three old computers....yeah, there are some differences between them, but, nothing like the difference between Linux and Win98.

So, unless you are enamored with old junk, like me, stick with SATA.....I have no clue how to program it.....IDE is not easy to program, but it is at least well documented.....

Smile
Post 04 Mar 2011, 22:56
View user's profile Send private message Reply with quote
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 05 Mar 2011, 05:03
edfed wrote:

2012 is soon. then, nothing can be assumed as a future.

AHAHAHA!!!!!

Quote:

I don't know how to program SATA. Nevertheless, I use only SATA, in my machines, except for those few (3) computers upon which I still run Win 98.

Though it seems only yesterday that Win 98 appeared on the scene, so vibrant, compared with Win 95, but today, it appears to function like a forlorn kitten, abandoned by one and all.

Here's a good game.

Take an old computer, one that still can run floppies and win98. Make a task. Any task will do.

Time it.

Then install the Linux of that era, i.e. from ten years ago.
Haha. you won't even be able to install it.....

But, if you do finally get something in the Unix world to boot up, after ten years sitting on a shelf, don't be surprised, when you run your same test, whatever the test, that Linux is S L O W, compared with Win 98.

Then, just for grins, install the newest, slickest, best Linux out there. Oops. It may fail to show the same video resolution as Win 98--1280 x 1024. You may have to live with 800 x 600. But, even so, go ahead and install the latest and greatest.

Now run your test again.. .... Haha.

STILL SLOWER than Win 98, I will bet you.....

Ok, final test: Get out your stop watch, and turn off the machine, measure the time needed to power off, after signalling the OS of your desire to quit for the day......

Win98 TWO SECONDS. Linux xyz flavor, doesn't matter which: TWENTY seconds, on the SAME computer, same hard drive, same cpu, same memory..... I have run this same test hundreds of times on my three old computers....yeah, there are some differences between them, but, nothing like the difference between Linux and Win98.

So, unless you are enamored with old junk, like me, stick with SATA.....I have no clue how to program it.....IDE is not easy to program, but it is at least well documented.....


yes, i know about this. But im actually not a fan of old junk. and even if using 6 years old computer it still will got SATA
Post 05 Mar 2011, 05:03
View user's profile Send private message Reply with quote
Coty



Joined: 17 May 2010
Posts: 553
Location: ␀
Coty 05 Mar 2011, 15:41
Since most BIOS support IDE emulation its best to use IDE for now, this will give you almost full support of any HDD.

BOTOKILLER wrote:
AHAHAHA!!!!!

Did I miss some kind of inside joke? You do relise that it is very possible by the time your OS is released SATA could be a thing of the past and people could be using SATA emulation.


None the less, I hope you like intel, Here is a SATA document that explains the SATA, it says that it assumes you have ATA knollage. http://www.intel.com/assets/pdf/manual/252671.pdf

If you cannot understand it I would recomend learning about the IDE, (like everyone else here is saying) because AFAIK the sata is based from it.

_________________
http://codercat.org/
Post 05 Mar 2011, 15:41
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 05 Mar 2011, 17:35
Coty wrote:
Since most BIOS support IDE emulation its best to use IDE for now, this will give you almost full support of any HDD.

BOTOKILLER wrote:
AHAHAHA!!!!!

Did I miss some kind of inside joke? You do relise that it is very possible by the time your OS is released SATA could be a thing of the past and people could be using SATA emulation.


None the less, I hope you like intel, Here is a SATA document that explains the SATA, it says that it assumes you have ATA knollage. http://www.intel.com/assets/pdf/manual/252671.pdf

If you cannot understand it I would recomend learning about the IDE, (like everyone else here is saying) because AFAIK the sata is based from it.


THANK YOU !!!!!! It is exactly what im looking for! the only thing is that all code is in C, but i can handle it

and can anybody tell me what is that for: http://download.intel.com/technology/serialata/pdf/rev1_3.pdf
is it the same specs or not?
Post 05 Mar 2011, 17:35
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.