Driver SD Card for Raspberry Pi

Norman Feske norman.feske at ...1...
Tue Jun 23 14:58:32 CEST 2015


Hello Waldo,

please excuse the late response. I haven't used the Raspberry Pi lately.

Your LOG output shows actually two problems. See below.

On 11.06.2015 21:46, Waldo Paz Rodriguez wrote:
> Hello genode comunity, I have been testing the sdcard driver for
> Raspberry Pi, I compile it fine, but when I test on RPi I get this result:
...
> [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_card/sd_card.h#L411

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.

> unavailable interrupt requested\0x1b
> 
> [init -> sd_card_drv] void* abort(): abort called

The "blk-test-cli" program repeatedly opens and closes a session to the
SD-card driver, which prompts the driver to obtain and release an IRQ
session for the device's interrupt each time. Even though the driver
opens the IRQ session, it does not actually uses IRQs yet. This specific
behavior triggered a corner case in the base-hw version of core, which
failed to mark the IRQ as free when closing the IRQ session. I fixed
this problem in the following commit (on our staging branch):


https://github.com/genodelabs/genode/commit/ff874f889866a4124eced23af490b4cbff53100c

I just tested the driver on the Raspberry Pi using the
'os/run/sd_card.run' script. To work around the capacity-detection
issue, I configured the test to operate on only a part of the block device:

  <start name="test-blk-cli">
    <resource name="RAM" quantum="1M" />
    <config test_size="32M"/>
  </start>

The problem did not trigger for me because I happened to use the driver
with a benchmark and a real scenario, but never with the blk-test-cli
program. Thanks for pointing out the problem!

Best regards
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list