SD cards, SPI, the BIOS
Posted: Sun Jan 27, 2013 9:44 pm
Sorry for posting 2 topics in a row, but I thought this might be interesting as I can't find any info on this topic.
Basically, I'd like to have an OS that boots from SD cards only (don't ask me why, I'll tell you guys later when I have something to show you... hope so )
I'd like to have your opinion about:
1) being sure that the boot device is an SD card (could be optional if impossible). Is there a (de facto) spec somewhere saying "SD cards have BIOS device codes formatted like this..."?
2) accessing the SD card using BIOS (I'm planning on using int 13h but if you know other SPI-specific access methods, let me know)
3) accessing the SD card in protected mode (no matter the slot)
I need most help concerning 3). The thing is, I'm totally lost when it comes to finding the memory map/IO port of a device I want to access. What is the standard method? There seems to be no SPI spec, and I'm not even sure that all the SD card readers are accessed in a same way for all PCs.
... No, I'm definitely not parsing ACPI tables
Thanks for your help, especially concerning the standard method for accessing a given device and finding MMIO info.
Basically, I'd like to have an OS that boots from SD cards only (don't ask me why, I'll tell you guys later when I have something to show you... hope so )
I'd like to have your opinion about:
1) being sure that the boot device is an SD card (could be optional if impossible). Is there a (de facto) spec somewhere saying "SD cards have BIOS device codes formatted like this..."?
2) accessing the SD card using BIOS (I'm planning on using int 13h but if you know other SPI-specific access methods, let me know)
3) accessing the SD card in protected mode (no matter the slot)
I need most help concerning 3). The thing is, I'm totally lost when it comes to finding the memory map/IO port of a device I want to access. What is the standard method? There seems to be no SPI spec, and I'm not even sure that all the SD card readers are accessed in a same way for all PCs.
... No, I'm definitely not parsing ACPI tables
Thanks for your help, especially concerning the standard method for accessing a given device and finding MMIO info.