BareMetal icon indicating copy to clipboard operation
BareMetal copied to clipboard

Public function for drive_id

Open IanSeyler opened this issue 8 years ago • 6 comments

IanSeyler avatar Dec 12 '17 14:12 IanSeyler

How about a function for getting the number of drives in the system?

ghost avatar Dec 12 '17 16:12 ghost

@IanSeyler what do you mean drive ID? Would that be the device ID in the PCI register? Or an ID in the AHCI spec? What it be used for the b_disk_read and b_disk_write functions (instead of the drive index?)

ghost avatar May 18 '18 22:05 ghost

This would be the AHCI drive number (as in which SATA port the drive is connected to).

IanSeyler avatar May 22 '18 12:05 IanSeyler

What if there are two AHCI controllers? The same port index could refer to two or more ports, depending on how many AHCI controllers there are.

ghost avatar May 22 '18 14:05 ghost

Right now the kernel only supports one AHCI device so currently that isn't an issue. However the driver and API will need to be adjusted for this in the future. Currently the AHCI driver stops looking for devices after the first one is found.

IanSeyler avatar May 22 '18 18:05 IanSeyler

This will be closed once #57 is complete.

IanSeyler avatar May 23 '18 19:05 IanSeyler