Hello again,
On 23.06.2015 14:58, Norman Feske wrote:
[init -> sd_card_drv] \0x1b[33mcapacity: 1107296256 MiB\0x1b[0m
This capacity value is obviously wrong. It is certainly a miscalculation in the '_sd_card_device_size' function:
https://github.com/genodelabs/genode/blob/master/repos/os/src/drivers/sd_car...
I definitely need to investigate the calculation with a larger test set of SD cards. That said, the wrong capacity is not the actual reason for the failing test.
I found the problem. The issue lies in the strange way the SDHCI controller returns 136-bit responses (for the CSD and CID registers). The following patch applies the needed quirk to our driver:
https://github.com/genodelabs/genode/commit/15cd7064fb841536af6b651c24fa24de...
With the patch, the driver correctly detects high-capacity cards and determines their capacity. Unfortunately, I cannot test the detection of standard-capacity cards because I don't have one at hand.
Cheers Norman