Questions about BIOS configuring AHCI controllers
Posted: Sat Aug 19, 2023 2:22 pm
Hello, I have 3 questions about how the BIOS configures AHCI controllers:
1. The wiki says “BIOS may have already configured all the necessary AHCI memory spaces. But the OS usually needs to reconfigure them to make them fit its requirements”. What are these ‘requirements’? As far as I can see, the BIOS can be fully trusted with its allocations (unless its buggy, but thats unlikely, isn’t it? AHCI is pretty crucial to boot the OS, if its installed on a SATA drive).
2. I’m assuming that these ‘memory spaces’ that the BIOS configures are the ABAR, the command lists and the received FISes. What about command tables? I mean, I’m assuming NOT because they are variable length (the PRDT can have different amounts of entries). I have to allocate my own command tables, correct?
3. When I allocate my command tables, do I need to set the memory region to uncached? I know AHCI uses DMA for data transfers, and so it participates in the cache coherency protocol, but does it use it for reading the command tables aswell?
1. The wiki says “BIOS may have already configured all the necessary AHCI memory spaces. But the OS usually needs to reconfigure them to make them fit its requirements”. What are these ‘requirements’? As far as I can see, the BIOS can be fully trusted with its allocations (unless its buggy, but thats unlikely, isn’t it? AHCI is pretty crucial to boot the OS, if its installed on a SATA drive).
2. I’m assuming that these ‘memory spaces’ that the BIOS configures are the ABAR, the command lists and the received FISes. What about command tables? I mean, I’m assuming NOT because they are variable length (the PRDT can have different amounts of entries). I have to allocate my own command tables, correct?
3. When I allocate my command tables, do I need to set the memory region to uncached? I know AHCI uses DMA for data transfers, and so it participates in the cache coherency protocol, but does it use it for reading the command tables aswell?