1

Hi I'm learning OS and trying to follow a book to write a kernel.

The book using IDE to control disk, while I tried to use AHCI with MSI to make it easier and more efficient.

I successfully read/write information and issued MSI interrupt. But I do not know how to read the disk configuration, especially numbers of total sectors available.

Thanks a lot!

Shore
  • 827
  • 9
  • 24
  • Are you trying to read from a CD/DVD (i.e. ATAPI device) or a HDD (ATA)? – CRoemheld May 20 '20 at 19:16
  • @CRoemheld it's a HDD, emulated by qemu. I actually tested it and simply send a IDENTIFY_DEVICE(0xEC) FIS with a proper buff will do....... – Shore May 22 '20 at 02:34
  • Is your question still valid? Do you still need some help? – CRoemheld May 22 '20 at 09:39
  • @CRoemheld currently my question is solved, thanks mate. – Shore May 23 '20 at 12:26
  • if you are familiar with AHCI and SATAPI, maybe you could help me out? I found your question while looking for an answer for mine. – CRoemheld May 23 '20 at 15:20
  • @CRoemheld I did read the intel's mannual, but cannot say that I'm faminliar...... but post ur's and give me a link, I'll try lol...... – Shore May 28 '20 at 01:13

0 Answers0