Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disk access #7

Open
thejpster opened this issue Feb 19, 2021 · 1 comment
Open

Disk access #7

thejpster opened this issue Feb 19, 2021 · 1 comment

Comments

@thejpster
Copy link
Member

In 5d885cd I took out disk access from the BIOS API. On reflection, I think that might have been a mistake. This is because:

  • Some BIOSes will load the OS from disk, not find it in Flash. Therefore some BIOSes need disk access routines anyway.
  • Putting disk access at the OS layer makes the OS care whether you have SDMMC interface or an SPI interface to your SD card.
  • Putting disk access at the OS layer means the OS doesn't know how to read a Compact Flash card, or an IDE hard drive.

Basic enumeration of fixed and removable disks seems reasonable, along with functions to read/write 1 or more 512 byte sectors seems quite reasonable. Limiting to 2TB per device (2^32 sectors of 512 bytes each) also seems fine.

The downsides will be:

  • Your BIOS will need a way (e.g. a BIOS set-up program) to specify where the SD card lives and how many you have. Press F10 on boot!
@thejpster
Copy link
Member Author

Disk access has gone back into the BIOS API and so the book needs updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant