Skip to main content

Timeline for Disk addressing

Current License: CC BY-SA 4.0

6 events
when toggle format what by license comment
Jun 13, 2023 at 5:15 comment added user129393192 I see. I'd actually heard of the IDE disk interface. So you talk to a disk controller that responds to inb and outb loads and stores to its device registers and you poll it as necessary, busy waiting for the data to be read ... and then you manage those sectors as "blocks" on some higher level and expose it to the higher levels of the kernel (filesystem, etc)
Jun 13, 2023 at 5:10 comment added Pseudonym @user129393192 Correct. And yes, Linux code can be a little tricky; you might find the IDE driver from xv6 easier to read, though it's much simpler because it doesn't use DMA. github.com/mit-pdos/xv6-public/blob/master/ide.c
Jun 13, 2023 at 4:54 comment added user129393192 I've always found Linux code difficult to digest. So it seems like the driver communicates with the firmware and implements the "block" interface for the rest of the kernel.
Jun 13, 2023 at 4:51 comment added Pseudonym @user129393192 Here's the API in Linux as one example. elixir.bootlin.com/linux/latest/source/include/linux/… The submit_bio operation starts a block I/O operation. This is sometimes called the "strategy" operation; I believe Unix used that term for some reason).
Jun 13, 2023 at 4:33 comment added user129393192 So from my understanding, there is a specific protocol (that you mention in the other answer) for doing so, and you are saying that is the typical interface (what exactly is this interface? Is it like programmed I/O?)? What about the disk controller and "block" interface? Is the kernel driver responsible for that, or the firmware in the disk controller? Does the rest of the operating system then address these blocks? I know you can view them in \dev in Linux ...
Jun 12, 2023 at 7:54 history answered Pseudonym CC BY-SA 4.0