Hi Genode Community,
I'm working on the implementation of SD card driver in ODROID-X2 (exynos4412) platform. I decided to reuse the implementation of SDHCI controller implemented by Norman Feske and Christian Helmuth. Essentially I only updated the memory map. I ran the sd_card and sd_card_bench tests, which ran successfully after making some arrangements in the corresponding .run files.
I'm interested in trying this driver using the FAT32 file system, but running the libc_ffat example, an error occurs. Apparently the test attempts to create a directory and then open it, but fails when trying to open it. The serial output is as follows:
L4 Bootstrapper Build: #32 Tue Sep 1 15:31:27 CDT 2015, 4.9.2 Scanning up to 2047 MB RAM Memory size is 2047MB (40000000 - bfefffff) RAM: 0000000040000000 - 00000000bfefffff: 2096128kB Total RAM: 2047MB mod11: 4130c000-413434c4: genode/platform_drv mod10: 412ce000-4130b640: genode/sd_card_drv mod09: 412b8000-412cd4b4: genode/libc_ffat.lib.so mod08: 412ab000-412b76f4: genode/test-libc_ffat mod07: 411ea000-412aa358: genode/libc.lib.so mod06: 4117b000-411e9068: genode/ld.lib.so mod05: 4113f000-4117aca8: genode/timer mod04: 410fd000-4113ec40: genode/init mod03: 410fc000-410fc4b6: genode/config mod02: 41097000-410fbe90: genode/core mod01: 41085000-41096368: sigma0 mod00: 41015000-4108431c: /home/humberto/SO/Genode/Repo_genode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco Moving up to 12 modules behind 41100000 moving module 00 { 41015000-4108431b } -> { 4142f000-4149e31b } [455452] moving module 01 { 41085000-41096367 } -> { 4149f000-414b0367 } [70504] moving module 02 { 41097000-410fbe8f } -> { 414b1000-41515e8f } [413328] moving module 03 { 410fc000-410fc4b5 } -> { 41344000-413444b5 } [1206] moving module 04 { 410fd000-4113ec3f } -> { 41345000-41386c3f } [269376] moving module 05 { 4113f000-4117aca7 } -> { 41100000-4113bca7 } [244904] moving module 06 { 4117b000-411e9067 } -> { 4113c000-411aa067 } [450664] moving module 07 { 411ea000-412aa357 } -> { 411ab000-4126b357 } [787288] moving module 08 { 412ab000-412b76f3 } -> { 4126c000-412786f3 } [50932] moving module 09 { 412b8000-412cd4b3 } -> { 41279000-4128e4b3 } [87220] moving module 10 { 412ce000-4130b63f } -> { 4128f000-412cc63f } [251456] moving module 11 { 4130c000-413434c3 } -> { 412cd000-413044c3 } [226500] moving module 03 { 41344000-413444b5 } -> { 41305000-413054b5 } [1206] moving module 04 { 41345000-41386c3f } -> { 41306000-41347c3f } [269376] Scanning /home/humberto/SO/Genode/Repo_genode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco -serial_esc Scanning sigma0 Scanning genode/core Relocated mbi to [0x4100e000-0x4100e232] Loading ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco Loading sigma0 Loading genode/core find kernel info page... found kernel info page at 0x40002000 Regions of list 'regions' [ 40001000, 40001a3f] { a40} Kern ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco [ 40002000, 4007efff] { 7d000} Kern ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco [ 400a0000, 400a5fdf] { 5fe0} Sigma0 sigma0 [ 400b0000, 400b617b] { 617c} Sigma0 sigma0 [ 41000000, 410143f7] { 143f8} Boot bootstrap [ 4100e000, 4100e32f] { 330} Root Multiboot info [ 41100000, 41347c3f] { 247c40} Root Module [ 80100000, 80246663] { 146664} Root genode/core API Version: (87) experimental Sigma0 config ip:400a0100 sp:41013de4 Roottask config ip:80100000 sp:00000000 Starting kernel ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco at 40001208 Hello from Startup::stage2 Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Number of IRQs available at this GIC: 160 Cache config: ON ID_PFR[01]: 00001231 00000011 ID_[DA]FR0: 00010444 00000000 ID_MMFR[04]: 00100103 20000000 01230000 00102111 FPU0: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl L2: ID=4100c4c8 Type=1a340340 Aux=7e470001 WMask=ffff S=0 L2: Type L2C-310 Size = 1024kB Watchdog initialized SERIAL ESC: allocated IRQ 85 for serial uart Not using serial hack in slow timer handler. Welcome to Fiasco.OC (arm)! L4/Fiasco.OC arm microkernel (C) 1998-2013 TU Dresden Rev: b6fac81 compiled with gcc 4.9.2 for Samsung Exynos [] Build: #31 Tue Sep 1 15:31:24 CDT 2015
Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Allocate 2640 bytes (3KB) for CPU[4] local storage (offset=1179f28, 0xf11e6000-0xf11e6a50) Timer for CPU0 is at IRQ 28 Number of CPUs: 4 Calibrating timer loop... Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) done. Allocate 2640 bytes (3KB) for CPU[1] local storage (offset=117af28, 0xf11e7000-0xf11e7a50) SCache config: ON IID_PFR[01]: 00001231 00000011G ID_[DA]FR0: 00010444 00000000 MID_MMFR[04]: 00100103 20000000 01230000 00102111 AFPU1: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl 0Timer for CPU1 is at IRQ 28 :CPU[1]: goes to idle loop Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) HAllocate 2640 bytes (3KB) for CPU[2] local storage (offset=1161f28, 0xf11ce000-0xf11cea50) eCache config: ON lID_PFR[01]: 00001231 00000011l ID_[DA]FR0: 00010444 00000000 oID_MMFR[04]: 00100103 20000000 01230000 00102111 !FPU2: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
Timer for CPU2 is at IRQ 28 CPU[2]: goes to idle loop Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) KAllocate 2640 bytes (3KB) for CPU[3] local storage (offset=1164f28, 0xf11d1000-0xf11d1a50) ICache config: ON PID_PFR[01]: 00001231 00000011 ID_[DA]FR0: 00010444 00000000 @ID_MMFR[04]: 00100103 20000000 01230000 00102111 FPU3: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl 4Timer for CPU3 is at IRQ 28 0CPU[3]: goes to idle loop 002000 allocated 4KB for maintenance structures SIGMA0: Dump of all resource maps RAM:------------------------ [0:40000000;40000fff] [0:4007f000;4009ffff] [0:400a6000;400affff] [0:400b7000;4100dfff] [4:4100e000;4100efff] [0:4100f000;410fffff] [4:41100000;41347fff] [0:41348000;800fffff] [4:80100000;80246fff] [0:80247000;beefffff] IOMEM:---------------------- [0:0;3fffffff] [0:bff00000;ffffffff]
KIP @ 40002000 magic: 4be6344c version: 87024444 sigma0 esp: 41013de4 eip: 400a0100 sigma1 esp: 00000000 eip: 00000000 root esp: 00000000 eip: 80100000 MBI @ 4100e000 mod[3] [41305000,413054b6) config mod[4] [41306000,41347c40) init mod[5] [41100000,4113bca8) timer mod[6] [4113c000,411aa068) ld.lib.so mod[7] [411ab000,4126b358) libc.lib.so mod[8] [4126c000,412786f4) test-libc_ffat mod[9] [41279000,4128e4b4) libc_ffat.lib.so mod[10] [4128f000,412cc640) sd_card_drv mod[11] [412cd000,413044c4) platform_drv :ram_alloc: Allocator 80235f68 dump: Block: [40000000,40001000) size=00001000 avail=00001000 max_avail=00001000 Block: [4007f000,400a0000) size=00021000 avail=00021000 max_avail=00021000 Block: [400a6000,400a601c) size=0000001c avail=00000000 max_avail=00021000 Block: [400a601c,400a6038) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6038,400a6054) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6054,400a6070) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6070,400a608c) size=0000001c avail=00000000 max_avail=00021000 Block: [400a608c,400a60a8) size=0000001c avail=00000000 max_avail=00000000 Block: [400a60a8,400a60c4) size=0000001c avail=00000000 max_avail=00009f04 Block: [400a60c4,400a60e0) size=0000001c avail=00000000 max_avail=00000000 Block: [400a60e0,400a60fc) size=0000001c avail=00000000 max_avail=00009f04 Block: [400a60fc,400b0000) size=00009f04 avail=00009f04 max_avail=00009f04 Block: [400b7000,400b701c) size=0000001c avail=00000000 max_avail=3edb8000 Block: [400b701c,4100e000) size=00f56fe4 avail=00f56fe4 max_avail=00f56fe4 Block: [4100f000,41100000) size=000f1000 avail=000f1000 max_avail=3edb8000 Block: [41348000,80100000) size=3edb8000 avail=3edb8000 max_avail=3edb8000 Block: [80247000,bef00000) size=3ecb9000 avail=3ecb9000 max_avail=3ecb9000 => mem_size=2125352960 (2026 MB) / mem_avail=2125352680 (2026 MB) :region_alloc: Allocator 802370d8 dump: Block: [00001000,20000000) size=1ffff000 avail=1ffff000 max_avail=1ffff000 Block: [30000000,40000000) size=10000000 avail=10000000 max_avail=1ffff000 Block: [40001000,40002000) size=00001000 avail=00001000 max_avail=1ffff000 Block: [40003000,4007f000) size=0007c000 avail=0007c000 max_avail=0007c000 Block: [400a0000,400a6000) size=00006000 avail=00006000 max_avail=1ffff000 Block: [400b0000,400b7000) size=00007000 avail=00007000 max_avail=010f0000 Block: [bef00000,bfff0000) size=010f0000 avail=010f0000 max_avail=010f0000 => mem_size=823627776 (785 MB) / mem_avail=823627776 (785 MB) :io_mem: Allocator 802363c4 dump: Block: [00000000,40000000) size=40000000 avail=40000000 max_avail=40000000 Block: [40001000,40002000) size=00001000 avail=00001000 max_avail=40000000 Block: [40003000,4007f000) size=0007c000 avail=0007c000 max_avail=0007c000 Block: [400a0000,400a6000) size=00006000 avail=00006000 max_avail=0007c000 Block: [400b0000,400b7000) size=00007000 avail=00007000 max_avail=410fffff Block: [bef00000,ffffffff) size=410fffff avail=410fffff max_avail=410fffff => mem_size=2165874687 (2065 MB) / mem_avail=2165874687 (2065 MB) :io_port: Allocator 80236820 dump: :irq: Allocator 80236c7c dump: Block: [00000000,00000260) size=00000260 avail=00000260 max_avail=00000260 => mem_size=608 (0 MB) / mem_avail=608 (0 MB) :rom_fs: Rom_fs 8023798c dump: Rom: [4113c000,411aa068) ld.lib.so Rom: [41306000,41347c40) init Rom: [41305000,413054b6) config Rom: [40002000,40003000) l4v2_kip Rom: [40002000,40003000) kip Rom: [4128f000,412cc640) sd_card_drv Rom: [41279000,4128e4b4) libc_ffat.lib.so Rom: [411ab000,4126b358) libc.lib.so Rom: [412cd000,413044c4) platform_drv Rom: [4126c000,412786f4) test-libc_ffat Rom: [41100000,4113bca8) timer :core ranges: Allocator 8023a260 dump: Block: [40000000,40001000) size=00001000 avail=00001000 max_avail=00001000 Block: [4007f000,400a0000) size=00021000 avail=00021000 max_avail=00021000 Block: [400a6000,400b0000) size=0000a000 avail=0000a000 max_avail=7def1000 Block: [400b7000,4100e000) size=00f57000 avail=00f57000 max_avail=7def1000 Block: [4100f000,bef00000) size=7def1000 avail=7def1000 max_avail=7def1000 => mem_size=2129084416 (2030 MB) / mem_avail=2129084416 (2030 MB) Genode 15.05-173-gb6fac81 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 2026 MB to init int main(): --- init created, waiting for exit condition --- [init] parent provides [init] service "ROM" [init] service "RAM" [init] service "IRQ" [init] service "IO_MEM" [init] service "IO_PORT" [init] service "CAP" [init] service "PD" [init] service "RM" [init] service "CPU" [init] service "LOG" [init] service "SIGNAL" [init] child "timer" [init] RAM quota: 876544 [init] ELF binary: timer [init] priority: 0 [init] provides service Timer [init] child "test-libc_ffat" [init] RAM quota: 8216576 [init] ELF binary: test-libc_ffat [init] priority: 0 [init] child "platform_drv" [init] RAM quota: 2973696 [init] ELF binary: platform_drv [init] priority: 0 [init] provides service Platform [init] provides service Regulator [init] child "sd_card_drv" [init] RAM quota: 876544 [init] ELF binary: sd_card_drv [init] priority: 0 [init] provides service Block [init -> platform_drv] --- Odroid-x2 platform driver --- [init -> platform_drv] Dentro del constructor CMU [init -> platform_drv] Changing CPU frequency to 1400000000 [init -> platform_drv] End of Changing CPU frequency to 1400000000 [init -> platform_drv] Saliendo del constructor CMU [init] child "timer" announces service "Timer" [init -> platform_drv] Entrando del constructor PMU [init -> platform_drv] Saliendo del constructor PMU [init] child "platform_drv" announces service "Regulator" [init -> sd_card_drv] --- SD card driver --- [init] child "sd_card_drv" announces service "Block" [init -> platform_drv] --- Odroid-x2 platform driver. Done --- [init -> test-libc_ffat] void init_libc_ffat(): using the libc_ffat plugin [init -> test-libc_ffat] calling mkdir(dir_name, 0777) dir_name=testdir [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-libc_ffat] get_fattime() called - not yet implemented. [init -> test-libc_ffat] disk_ioctl(drv=0, ctrl=0, buff=0) called - not yet implemented. [init -> test-libc_ffat] mkdir(dir_name, 0777) succeeded [init -> test-libc_ffat] calling chdir(dir_name) dir_name=testdir [init -> test-libc_ffat] chdir(dir_name) failed, ret=-1, errno=20 [init] virtual void Genode::Child_policy::exit(int): child "test-libc_ffat" exited with exit value -1
Anyone have any idea what might be happening?
Hi Humberto,
I'm wondering if the content of the SD card changed after running the demo. Could you please check, that mkdir() actually succeeded and a directory appeared on the file system?
Greets Christian
Am 1. September 2015 22:21:20 MESZ, schrieb "Humberto López León" <humberto@...210...>:
Hi Genode Community,
I'm working on the implementation of SD card driver in ODROID-X2 (exynos4412) platform. I decided to reuse the implementation of SDHCI controller implemented by Norman Feske and Christian Helmuth. Essentially I only updated the memory map. I ran the sd_card and sd_card_bench tests, which ran successfully after making some arrangements in the corresponding .run files.
I'm interested in trying this driver using the FAT32 file system, but running the libc_ffat example, an error occurs. Apparently the test attempts to create a directory and then open it, but fails when trying to open it. The serial output is as follows:
L4 Bootstrapper Build: #32 Tue Sep 1 15:31:27 CDT 2015, 4.9.2 Scanning up to 2047 MB RAM Memory size is 2047MB (40000000 - bfefffff) RAM: 0000000040000000 - 00000000bfefffff: 2096128kB Total RAM: 2047MB mod11: 4130c000-413434c4: genode/platform_drv mod10: 412ce000-4130b640: genode/sd_card_drv mod09: 412b8000-412cd4b4: genode/libc_ffat.lib.so mod08: 412ab000-412b76f4: genode/test-libc_ffat mod07: 411ea000-412aa358: genode/libc.lib.so mod06: 4117b000-411e9068: genode/ld.lib.so mod05: 4113f000-4117aca8: genode/timer mod04: 410fd000-4113ec40: genode/init mod03: 410fc000-410fc4b6: genode/config mod02: 41097000-410fbe90: genode/core mod01: 41085000-41096368: sigma0 mod00: 41015000-4108431c: /home/humberto/SO/Genode/Repo_genode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco Moving up to 12 modules behind 41100000 moving module 00 { 41015000-4108431b } -> { 4142f000-4149e31b } [455452] moving module 01 { 41085000-41096367 } -> { 4149f000-414b0367 } [70504] moving module 02 { 41097000-410fbe8f } -> { 414b1000-41515e8f } [413328] moving module 03 { 410fc000-410fc4b5 } -> { 41344000-413444b5 } [1206] moving module 04 { 410fd000-4113ec3f } -> { 41345000-41386c3f } [269376] moving module 05 { 4113f000-4117aca7 } -> { 41100000-4113bca7 } [244904] moving module 06 { 4117b000-411e9067 } -> { 4113c000-411aa067 } [450664] moving module 07 { 411ea000-412aa357 } -> { 411ab000-4126b357 } [787288] moving module 08 { 412ab000-412b76f3 } -> { 4126c000-412786f3 } [50932] moving module 09 { 412b8000-412cd4b3 } -> { 41279000-4128e4b3 } [87220] moving module 10 { 412ce000-4130b63f } -> { 4128f000-412cc63f } [251456] moving module 11 { 4130c000-413434c3 } -> { 412cd000-413044c3 } [226500] moving module 03 { 41344000-413444b5 } -> { 41305000-413054b5 } [1206] moving module 04 { 41345000-41386c3f } -> { 41306000-41347c3f } [269376] Scanning /home/humberto/SO/Genode/Repo_genode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco
-serial_esc Scanning sigma0 Scanning genode/core Relocated mbi to [0x4100e000-0x4100e232] Loading ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco Loading sigma0 Loading genode/core find kernel info page... found kernel info page at 0x40002000 Regions of list 'regions' [ 40001000, 40001a3f] { a40} Kern ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco [ 40002000, 4007efff] { 7d000} Kern ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco [ 400a0000, 400a5fdf] { 5fe0} Sigma0 sigma0 [ 400b0000, 400b617b] { 617c} Sigma0 sigma0 [ 41000000, 410143f7] { 143f8} Boot bootstrap [ 4100e000, 4100e32f] { 330} Root Multiboot info [ 41100000, 41347c3f] { 247c40} Root Module [ 80100000, 80246663] { 146664} Root genode/core API Version: (87) experimental Sigma0 config ip:400a0100 sp:41013de4 Roottask config ip:80100000 sp:00000000 Starting kernel ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco at 40001208 Hello from Startup::stage2 Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Number of IRQs available at this GIC: 160 Cache config: ON ID_PFR[01]: 00001231 00000011 ID_[DA]FR0: 00010444 00000000 ID_MMFR[04]: 00100103 20000000 01230000 00102111 FPU0: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl L2: ID=4100c4c8 Type=1a340340 Aux=7e470001 WMask=ffff S=0 L2: Type L2C-310 Size = 1024kB Watchdog initialized SERIAL ESC: allocated IRQ 85 for serial uart Not using serial hack in slow timer handler. Welcome to Fiasco.OC (arm)! L4/Fiasco.OC arm microkernel (C) 1998-2013 TU Dresden Rev: b6fac81 compiled with gcc 4.9.2 for Samsung Exynos [] Build: #31 Tue Sep 1 15:31:24 CDT 2015
Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Allocate 2640 bytes (3KB) for CPU[4] local storage (offset=1179f28, 0xf11e6000-0xf11e6a50) Timer for CPU0 is at IRQ 28 Number of CPUs: 4 Calibrating timer loop... Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) done. Allocate 2640 bytes (3KB) for CPU[1] local storage (offset=117af28, 0xf11e7000-0xf11e7a50) SCache config: ON IID_PFR[01]: 00001231 00000011G ID_[DA]FR0: 00010444 00000000 MID_MMFR[04]: 00100103 20000000 01230000 00102111 AFPU1: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl 0Timer for CPU1 is at IRQ 28 :CPU[1]: goes to idle loop Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) HAllocate 2640 bytes (3KB) for CPU[2] local storage (offset=1161f28, 0xf11ce000-0xf11cea50) eCache config: ON lID_PFR[01]: 00001231 00000011l ID_[DA]FR0: 00010444 00000000 oID_MMFR[04]: 00100103 20000000 01230000 00102111 !FPU2: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
Timer for CPU2 is at IRQ 28 CPU[2]: goes to idle loop Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) KAllocate 2640 bytes (3KB) for CPU[3] local storage (offset=1164f28, 0xf11d1000-0xf11d1a50) ICache config: ON PID_PFR[01]: 00001231 00000011 ID_[DA]FR0: 00010444 00000000 @ID_MMFR[04]: 00100103 20000000 01230000 00102111 FPU3: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl 4Timer for CPU3 is at IRQ 28 0CPU[3]: goes to idle loop 002000 allocated 4KB for maintenance structures SIGMA0: Dump of all resource maps RAM:------------------------ [0:40000000;40000fff] [0:4007f000;4009ffff] [0:400a6000;400affff] [0:400b7000;4100dfff] [4:4100e000;4100efff] [0:4100f000;410fffff] [4:41100000;41347fff] [0:41348000;800fffff] [4:80100000;80246fff] [0:80247000;beefffff] IOMEM:---------------------- [0:0;3fffffff] [0:bff00000;ffffffff]
KIP @ 40002000 magic: 4be6344c version: 87024444 sigma0 esp: 41013de4 eip: 400a0100 sigma1 esp: 00000000 eip: 00000000 root esp: 00000000 eip: 80100000 MBI @ 4100e000 mod[3] [41305000,413054b6) config mod[4] [41306000,41347c40) init mod[5] [41100000,4113bca8) timer mod[6] [4113c000,411aa068) ld.lib.so mod[7] [411ab000,4126b358) libc.lib.so mod[8] [4126c000,412786f4) test-libc_ffat mod[9] [41279000,4128e4b4) libc_ffat.lib.so mod[10] [4128f000,412cc640) sd_card_drv mod[11] [412cd000,413044c4) platform_drv :ram_alloc: Allocator 80235f68 dump: Block: [40000000,40001000) size=00001000 avail=00001000 max_avail=00001000 Block: [4007f000,400a0000) size=00021000 avail=00021000 max_avail=00021000 Block: [400a6000,400a601c) size=0000001c avail=00000000 max_avail=00021000 Block: [400a601c,400a6038) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6038,400a6054) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6054,400a6070) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6070,400a608c) size=0000001c avail=00000000 max_avail=00021000 Block: [400a608c,400a60a8) size=0000001c avail=00000000 max_avail=00000000 Block: [400a60a8,400a60c4) size=0000001c avail=00000000 max_avail=00009f04 Block: [400a60c4,400a60e0) size=0000001c avail=00000000 max_avail=00000000 Block: [400a60e0,400a60fc) size=0000001c avail=00000000 max_avail=00009f04 Block: [400a60fc,400b0000) size=00009f04 avail=00009f04 max_avail=00009f04 Block: [400b7000,400b701c) size=0000001c avail=00000000 max_avail=3edb8000 Block: [400b701c,4100e000) size=00f56fe4 avail=00f56fe4 max_avail=00f56fe4 Block: [4100f000,41100000) size=000f1000 avail=000f1000 max_avail=3edb8000 Block: [41348000,80100000) size=3edb8000 avail=3edb8000 max_avail=3edb8000 Block: [80247000,bef00000) size=3ecb9000 avail=3ecb9000 max_avail=3ecb9000 => mem_size=2125352960 (2026 MB) / mem_avail=2125352680 (2026 MB) :region_alloc: Allocator 802370d8 dump: Block: [00001000,20000000) size=1ffff000 avail=1ffff000 max_avail=1ffff000 Block: [30000000,40000000) size=10000000 avail=10000000 max_avail=1ffff000 Block: [40001000,40002000) size=00001000 avail=00001000 max_avail=1ffff000 Block: [40003000,4007f000) size=0007c000 avail=0007c000 max_avail=0007c000 Block: [400a0000,400a6000) size=00006000 avail=00006000 max_avail=1ffff000 Block: [400b0000,400b7000) size=00007000 avail=00007000 max_avail=010f0000 Block: [bef00000,bfff0000) size=010f0000 avail=010f0000 max_avail=010f0000 => mem_size=823627776 (785 MB) / mem_avail=823627776 (785 MB) :io_mem: Allocator 802363c4 dump: Block: [00000000,40000000) size=40000000 avail=40000000 max_avail=40000000 Block: [40001000,40002000) size=00001000 avail=00001000 max_avail=40000000 Block: [40003000,4007f000) size=0007c000 avail=0007c000 max_avail=0007c000 Block: [400a0000,400a6000) size=00006000 avail=00006000 max_avail=0007c000 Block: [400b0000,400b7000) size=00007000 avail=00007000 max_avail=410fffff Block: [bef00000,ffffffff) size=410fffff avail=410fffff max_avail=410fffff => mem_size=2165874687 (2065 MB) / mem_avail=2165874687 (2065 MB) :io_port: Allocator 80236820 dump: :irq: Allocator 80236c7c dump: Block: [00000000,00000260) size=00000260 avail=00000260 max_avail=00000260 => mem_size=608 (0 MB) / mem_avail=608 (0 MB) :rom_fs: Rom_fs 8023798c dump: Rom: [4113c000,411aa068) ld.lib.so Rom: [41306000,41347c40) init Rom: [41305000,413054b6) config Rom: [40002000,40003000) l4v2_kip Rom: [40002000,40003000) kip Rom: [4128f000,412cc640) sd_card_drv Rom: [41279000,4128e4b4) libc_ffat.lib.so Rom: [411ab000,4126b358) libc.lib.so Rom: [412cd000,413044c4) platform_drv Rom: [4126c000,412786f4) test-libc_ffat Rom: [41100000,4113bca8) timer :core ranges: Allocator 8023a260 dump: Block: [40000000,40001000) size=00001000 avail=00001000 max_avail=00001000 Block: [4007f000,400a0000) size=00021000 avail=00021000 max_avail=00021000 Block: [400a6000,400b0000) size=0000a000 avail=0000a000 max_avail=7def1000 Block: [400b7000,4100e000) size=00f57000 avail=00f57000 max_avail=7def1000 Block: [4100f000,bef00000) size=7def1000 avail=7def1000 max_avail=7def1000 => mem_size=2129084416 (2030 MB) / mem_avail=2129084416 (2030 MB) Genode 15.05-173-gb6fac81 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 2026 MB to init int main(): --- init created, waiting for exit condition --- [init] parent provides [init] service "ROM" [init] service "RAM" [init] service "IRQ" [init] service "IO_MEM" [init] service "IO_PORT" [init] service "CAP" [init] service "PD" [init] service "RM" [init] service "CPU" [init] service "LOG" [init] service "SIGNAL" [init] child "timer" [init] RAM quota: 876544 [init] ELF binary: timer [init] priority: 0 [init] provides service Timer [init] child "test-libc_ffat" [init] RAM quota: 8216576 [init] ELF binary: test-libc_ffat [init] priority: 0 [init] child "platform_drv" [init] RAM quota: 2973696 [init] ELF binary: platform_drv [init] priority: 0 [init] provides service Platform [init] provides service Regulator [init] child "sd_card_drv" [init] RAM quota: 876544 [init] ELF binary: sd_card_drv [init] priority: 0 [init] provides service Block [init -> platform_drv] --- Odroid-x2 platform driver --- [init -> platform_drv] Dentro del constructor CMU [init -> platform_drv] Changing CPU frequency to 1400000000 [init -> platform_drv] End of Changing CPU frequency to 1400000000 [init -> platform_drv] Saliendo del constructor CMU [init] child "timer" announces service "Timer" [init -> platform_drv] Entrando del constructor PMU [init -> platform_drv] Saliendo del constructor PMU [init] child "platform_drv" announces service "Regulator" [init -> sd_card_drv] --- SD card driver --- [init] child "sd_card_drv" announces service "Block" [init -> platform_drv] --- Odroid-x2 platform driver. Done --- [init -> test-libc_ffat] void init_libc_ffat(): using the libc_ffat plugin [init -> test-libc_ffat] calling mkdir(dir_name, 0777) dir_name=testdir [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-libc_ffat] get_fattime() called - not yet implemented. [init -> test-libc_ffat] disk_ioctl(drv=0, ctrl=0, buff=0) called - not
yet implemented. [init -> test-libc_ffat] mkdir(dir_name, 0777) succeeded [init -> test-libc_ffat] calling chdir(dir_name) dir_name=testdir [init -> test-libc_ffat] chdir(dir_name) failed, ret=-1, errno=20 [init] virtual void Genode::Child_policy::exit(int): child "test-libc_ffat" exited with exit value -1
Anyone have any idea what might be happening?
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Christian,
On 09/02/2015 01:25 AM, Christian Helmuth wrote:
Hi Humberto,
I'm wondering if the content of the SD card changed after running the demo. Could you please check, that mkdir() actually succeeded and a directory appeared on the file system?
After running the libc_ffat test, the directory is not displayed in the file system. Definitely the mkdir() function was not successful, but I wonder if it's a problem of SD card driver or if any incorrect settings to indicate the execution of the test.
any ideas? Thanks
Hello Humberto,
maybe we should first get the file system out of way for testing your driver. There is the sd_card.run script, which serves exactly this purpose. So please try "make run/sd_card" in your scenario. You may limit the scope of the block test by adjusted the config node as in the attached patch.
Regards
Hello Christian,
Thanks for the recommendation.
On 09/03/2015 04:23 AM, Christian Helmuth wrote:
Hello Humberto,
maybe we should first get the file system out of way for testing your driver. There is the sd_card.run script, which serves exactly this purpose. So please try "make run/sd_card" in your scenario. You may limit the scope of the block test by adjusted the config node as in the attached patch.
When I try "make run/sd_card" with the configuration of patch I get the following output:
Starting kernel ...
L4 Bootstrapper Build: #77 Thu Sep 3 13:40:56 CDT 2015, 4.9.2 Scanning up to 2047 MB RAM Memory size is 2047MB (40000000 - bfefffff) RAM: 0000000040000000 - 00000000bfefffff: 2096128kB Total RAM: 2047MB mod08: 411fa000-412314c4: genode/platform_drv mod07: 411b9000-411f9a98: genode/test-blk-cli mod06: 4117b000-411b8640: genode/sd_card_drv mod05: 4113f000-4117aca8: genode/timer mod04: 410fd000-4113ec40: genode/init mod03: 410fc000-410fc412: genode/config mod02: 41097000-410fbe90: genode/core mod01: 41085000-41096368: sigma0 mod00: 41015000-4108431c: /home/humberto/SO/Genode/Repo_genode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco Moving up to 9 modules behind 41100000 moving module 00 { 41015000-4108431b } -> { 4131d000-4138c31b } [455452] moving module 01 { 41085000-41096367 } -> { 4138d000-4139e367 } [70504] moving module 02 { 41097000-410fbe8f } -> { 4139f000-41403e8f } [413328] moving module 03 { 410fc000-410fc411 } -> { 41232000-41232411 } [1042] moving module 04 { 410fd000-4113ec3f } -> { 41233000-41274c3f } [269376] moving module 05 { 4113f000-4117aca7 } -> { 41100000-4113bca7 } [244904] moving module 06 { 4117b000-411b863f } -> { 4113c000-4117963f } [251456] moving module 07 { 411b9000-411f9a97 } -> { 4117a000-411baa97 } [264856] moving module 08 { 411fa000-412314c3 } -> { 411bb000-411f24c3 } [226500] moving module 03 { 41232000-41232411 } -> { 411f3000-411f3411 } [1042] moving module 04 { 41233000-41274c3f } -> { 411f4000-41235c3f } [269376] Scanning /home/humberto/SO/Genode/Repo_genode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco -serial_esc Scanning sigma0 Scanning genode/core Relocated mbi to [0x4100e000-0x4100e1c4] Loading ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco Loading sigma0 Loading genode/core find kernel info page... found kernel info page at 0x40002000 Regions of list 'regions' [ 40001000, 40001a3f] { a40} Kern ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco [ 40002000, 4007efff] { 7d000} Kern ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco [ 400a0000, 400a5fdf] { 5fe0} Sigma0 sigma0 [ 400b0000, 400b617b] { 617c} Sigma0 sigma0 [ 41000000, 410143f7] { 143f8} Boot bootstrap [ 4100e000, 4100e2c1] { 2c2} Root Multiboot info [ 41100000, 41235c3f] { 135c40} Root Module [ 80100000, 80246663] { 146664} Root genode/core API Version: (87) experimental Sigma0 config ip:400a0100 sp:41013de4 Roottask config ip:80100000 sp:00000000 Starting kernel ode/GenodeOS/build/foc_odroid_x2/kernel/fiasco.oc/fiasco at 40001208 Hello from Startup::stage2 Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Number of IRQs available at this GIC: 160 Cache config: ON ID_PFR[01]: 00001231 00000011 ID_[DA]FR0: 00010444 00000000 ID_MMFR[04]: 00100103 20000000 01230000 00102111 FPU0: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl L2: ID=4100c4c8 Type=1a340340 Aux=7e470001 WMask=ffff S=0 L2: Type L2C-310 Size = 1024kB Watchdog initialized SERIAL ESC: allocated IRQ 85 for serial uart Not using serial hack in slow timer handler. Welcome to Fiasco.OC (arm)! L4/Fiasco.OC arm microkernel (C) 1998-2013 TU Dresden Rev: b6fac81 compiled with gcc 4.9.2 for Samsung Exynos [] Build: #42 Thu Sep 3 13:40:53 CDT 2015
Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Allocate 2640 bytes (3KB) for CPU[4] local storage (offset=1179f28, 0xf11e6000-0xf11e6a50) Timer for CPU0 is at IRQ 28 Number of CPUs: 4 Calibrating timer loop... Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) done. Allocate 2640 bytes (3KB) for CPU[1] local storage (offset=117af28, 0xf11e7000-0xf11e7a50) SCache config: ON IID_PFR[01]: 00001231 00000011G ID_[DA]FR0: 00010444 00000000 MID_MMFR[04]: 00100103 20000000 01230000 00102111 AFPU1: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl 0Timer for CPU1 is at IRQ 28 :Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) CPU[1]: goes to idle loop HAllocate 2640 bytes (3KB) for CPU[2] local storage (offset=1161f28, 0xf11ce000-0xf11cea50) eCache config: ON lID_PFR[01]: 00001231 00000011l ID_[DA]FR0: 00010444 00000000 oID_MMFR[04]: 00100103 20000000 01230000 00102111 !FPU2: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl
Per_cpu_data_alloc: (orig: 0xf006c0d8-0xf006cb28) Timer for CPU2 is at IRQ 28 CPU[2]: goes to idle loop KAllocate 2640 bytes (3KB) for CPU[3] local storage (offset=1164f28, 0xf11d1000-0xf11d1a50) ICache config: ON PID_PFR[01]: 00001231 00000011 ID_[DA]FR0: 00010444 00000000 @ID_MMFR[04]: 00100103 20000000 01230000 00102111 FPU3: Arch: VFPv3(3), Part: VFPv3(30), r: 4, v: 9, i: 41, t: hard, p: dbl/sngl 4Timer for CPU3 is at IRQ 28 0CPU[3]: goes to idle loop 002000 allocated 4KB for maintenance structures SIGMA0: Dump of all resource maps RAM:------------------------ [0:40000000;40000fff] [0:4007f000;4009ffff] [0:400a6000;400affff] [0:400b7000;4100dfff] [4:4100e000;4100efff] [0:4100f000;410fffff] [4:41100000;41235fff] [0:41236000;800fffff] [4:80100000;80246fff] [0:80247000;beefffff] IOMEM:---------------------- [0:0;3fffffff] [0:bff00000;ffffffff]
KIP @ 40002000 magic: 4be6344c version: 87024444 sigma0 esp: 41013de4 eip: 400a0100 sigma1 esp: 00000000 eip: 00000000 root esp: 00000000 eip: 80100000 MBI @ 4100e000 mod[3] [411f3000,411f3412) config mod[4] [411f4000,41235c40) init mod[5] [41100000,4113bca8) timer mod[6] [4113c000,41179640) sd_card_drv mod[7] [4117a000,411baa98) test-blk-cli mod[8] [411bb000,411f24c4) platform_drv :ram_alloc: Allocator 80235f68 dump: Block: [40000000,40001000) size=00001000 avail=00001000 max_avail=00001000 Block: [4007f000,400a0000) size=00021000 avail=00021000 max_avail=00021000 Block: [400a6000,400a601c) size=0000001c avail=00000000 max_avail=00021000 Block: [400a601c,400a6038) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6038,400a6054) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6054,400a6070) size=0000001c avail=00000000 max_avail=00000000 Block: [400a6070,400a608c) size=0000001c avail=00000000 max_avail=00009f58 Block: [400a608c,400a60a8) size=0000001c avail=00000000 max_avail=00000000 Block: [400a60a8,400b0000) size=00009f58 avail=00009f58 max_avail=00009f58 Block: [400b7000,400b701c) size=0000001c avail=00000000 max_avail=3eeca000 Block: [400b701c,4100e000) size=00f56fe4 avail=00f56fe4 max_avail=00f56fe4 Block: [4100f000,41100000) size=000f1000 avail=000f1000 max_avail=3eeca000 Block: [41236000,80100000) size=3eeca000 avail=3eeca000 max_avail=3eeca000 Block: [80247000,bef00000) size=3ecb9000 avail=3ecb9000 max_avail=3ecb9000 => mem_size=2126475264 (2027 MB) / mem_avail=2126475068 (2027 MB) :region_alloc: Allocator 802370d8 dump: Block: [00001000,20000000) size=1ffff000 avail=1ffff000 max_avail=1ffff000 Block: [30000000,40000000) size=10000000 avail=10000000 max_avail=1ffff000 Block: [40001000,40002000) size=00001000 avail=00001000 max_avail=1ffff000 Block: [40003000,4007f000) size=0007c000 avail=0007c000 max_avail=0007c000 Block: [400a0000,400a6000) size=00006000 avail=00006000 max_avail=1ffff000 Block: [400b0000,400b7000) size=00007000 avail=00007000 max_avail=010f0000 Block: [bef00000,bfff0000) size=010f0000 avail=010f0000 max_avail=010f0000 => mem_size=823627776 (785 MB) / mem_avail=823627776 (785 MB) :io_mem: Allocator 802363c4 dump: Block: [00000000,40000000) size=40000000 avail=40000000 max_avail=40000000 Block: [40001000,40002000) size=00001000 avail=00001000 max_avail=40000000 Block: [40003000,4007f000) size=0007c000 avail=0007c000 max_avail=0007c000 Block: [400a0000,400a6000) size=00006000 avail=00006000 max_avail=0007c000 Block: [400b0000,400b7000) size=00007000 avail=00007000 max_avail=410fffff Block: [bef00000,ffffffff) size=410fffff avail=410fffff max_avail=410fffff => mem_size=2165874687 (2065 MB) / mem_avail=2165874687 (2065 MB) :io_port: Allocator 80236820 dump: :irq: Allocator 80236c7c dump: Block: [00000000,00000260) size=00000260 avail=00000260 max_avail=00000260 => mem_size=608 (0 MB) / mem_avail=608 (0 MB) :rom_fs: Rom_fs 8023798c dump: Rom: [4113c000,41179640) sd_card_drv Rom: [411f4000,41235c40) init Rom: [411f3000,411f3412) config Rom: [40002000,40003000) l4v2_kip Rom: [40002000,40003000) kip Rom: [411bb000,411f24c4) platform_drv Rom: [41100000,4113bca8) timer Rom: [4117a000,411baa98) test-blk-cli :core ranges: Allocator 8023a260 dump: Block: [40000000,40001000) size=00001000 avail=00001000 max_avail=00001000 Block: [4007f000,400a0000) size=00021000 avail=00021000 max_avail=00021000 Block: [400a6000,400b0000) size=0000a000 avail=0000a000 max_avail=7def1000 Block: [400b7000,4100e000) size=00f57000 avail=00f57000 max_avail=7def1000 Block: [4100f000,bef00000) size=7def1000 avail=7def1000 max_avail=7def1000 => mem_size=2129084416 (2030 MB) / mem_avail=2129084416 (2030 MB) Genode 15.05-173-gb6fac81 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 2027 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open ROM session for module "ld.lib.so" [init -> platform_drv] --- Odroid-x2 platform driver --- [init -> platform_drv] Dentro del constructor CMU [init -> platform_drv] Changing CPU frequency to 1400000000 [init -> platform_drv] End of Changing CPU frequency to 1400000000 [init -> platform_drv] Saliendo del constructor CMU [init -> platform_drv] Entrando del constructor PMU [init -> platform_drv] Saliendo del constructor PMU [init -> platform_drv] --- Odroid-x2 platform driver. Done --- [init -> sd_card_drv] --- SD card driver --- [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-blk-cli] block device with block size 512 sector count 15759360 (testing 131072 sectors) [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-blk-cli] reading block 0 - 131071, 246 per request Insufficient quota for transfer: init -> test-blk-cli have 520192, need 686095 [init] not enough quota for a donation of 686095 bytes [init -> test-blk-cli] resource_request: ram_quota=686095 [init -> test-blk-cli] virtual void Genode::Platform_env::release(): used before freeing emergency=262144 [init -> test-blk-cli] virtual void Genode::Platform_env::release(): used after freeing emergency=253952 [init] child "test-blk-cli" requests resources: ram_quota=686095 [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-blk-cli] reading block 0 - 131071, 1 per request [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-blk-cli] reading block 0 - 131071, 1 per request [init -> sd_card_drv] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_drv] RCA: 0xb368 [init -> sd_card_drv] SD card detected [init -> sd_card_drv] capacity: 7695 MiB [init -> test-blk-cli] read/write/compare block 0 - 131071, 8 per request [init -> test-blk-cli] Test failed! [init -> test-blk-cli] Integrity check failed: block 0 - 8 [init] virtual void Genode::Child_policy::exit(int): child "test-blk-cli" exited with exit value -2
Apparently the test fails to make the comparison between the read and written. Personally I think the problem is in writing, using the FAT32 port could read from a file that was on the SD card without problems, but the test failed when trying to create a file.
Anyone have any suggestions of what may be affecting writing?
Regards
Humberto
On Thu, Sep 3, 2015 at 11:21 AM, Humberto López León <humberto@...141....210...> wrote:
Apparently the test fails to make the comparison between the read and written. Personally I think the problem is in writing, using the FAT32 port could read from a file that was on the SD card without problems, but the test failed when trying to create a file.
Anyone have any suggestions of what may be affecting writing?
SD cards can have a physical write-protect switch on them, right? Have you checked if your card is write-protected?
Jamey
Hi Jamey,
On 09/03/2015 04:40 PM, Jamey Sharp wrote:
On Thu, Sep 3, 2015 at 11:21 AM, Humberto López León <humberto@...210...> wrote:
Apparently the test fails to make the comparison between the read and written. Personally I think the problem is in writing, using the FAT32 port could read from a file that was on the SD card without problems, but the test failed when trying to create a file.
Anyone have any suggestions of what may be affecting writing?
SD cards can have a physical write-protect switch on them, right? Have you checked if your card is write-protected?
I checked the physical write-protect switch and it is not activated. Also, I tried to write to the SD card with the "dd" command and it worked properly.
Based on the example "repos/os/src/drivers/sd_card/OMAP4/bench" I implemented an application to read from the SD Card and one for writing it. Both applications create an instance of the SDHCI driver and use the functions read and write respectively.
To check the read operation, I used the tool dd (Linux command: echo "MY TEXT" | sudo dd of=/dev/sdb bs=512 count=1) to write to the SD card the string "MY TEXT" which was printed correctly using the application that I implemented for reading from the SD card. Thus I checked that the reading operation in SDHCI protocol, implemented for Raspberry Pi, work properly in the ODROID-X2 (Exynos4412).
This is the serial output for read aplication after writing "MY TEXT" in the SD card with the tool dd (Linux command):
Genode 15.05-176-g7df72d4 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 2027 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open ROM session for module "ld.lib.so" [init -> platform_drv] --- Odroid-x2 platform driver --- [init -> sd_card_read] --- Exynos4 SD card read test --- [init -> platform_drv] Dentro del constructor CMU [init -> platform_drv] Changing CPU frequency to 1400000000 [init -> platform_drv] End of Changing CPU frequency to 1400000000 [init -> platform_drv] Saliendo del constructor CMU [init -> platform_drv] Entrando del constructor PMU [init -> platform_drv] Saliendo del constructor PMU [init -> platform_drv] --- Odroid-x2 platform driver. Done --- [init -> sd_card_read] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_read] RCA: 0xb368 [init -> sd_card_read] SD card detected [init -> sd_card_read] capacity: 7695 MiB [init -> sd_card_read] [init -> sd_card_read] -- Reading from SD card -- [init -> sd_card_read] [init -> sd_card_read] Card content: [init -> sd_card_read] Element 0: M [init -> sd_card_read] Element 1: Y [init -> sd_card_read] Element 2: [init -> sd_card_read] Element 3: T [init -> sd_card_read] Element 4: E [init -> sd_card_read] Element 5: X [init -> sd_card_read] Element 6: T [init -> sd_card_read] [init -> sd_card_read] --- Exynos4 SD card Read Test finished ---
To check the write operation, I used the tool dd (Linux command: sudo dd if=/dev/sdb bs=512 count=1 | od -a) to read the contents of the SD card. This command starts reading from the beginning of the SD card and the application that I implemented to write also writes from the beginning. In this case, the dd command output does not match what the application should write. Thus I find that the driver does not perform the write operation correctly.
This is the serial output for write aplication :
Genode 15.05-176-g7df72d4 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 2027 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open ROM session for module "ld.lib.so" [init -> platform_drv] --- Odroid-x2 platform driver --- [init -> sd_card_write] --- Exynos4 SD card write test --- [init -> platform_drv] Dentro del constructor CMU [init -> platform_drv] Changing CPU frequency to 1400000000 [init -> platform_drv] End of Changing CPU frequency to 1400000000 [init -> platform_drv] Saliendo del constructor CMU [init -> platform_drv] Entrando del constructor PMU [init -> platform_drv] Saliendo del constructor PMU [init -> platform_drv] --- Odroid-x2 platform driver. Done --- [init -> sd_card_write] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_write] RCA: 0xb368 [init -> sd_card_write] SD card detected [init -> sd_card_write] capacity: 7695 MiB [init -> sd_card_write] [init -> sd_card_write] -- Writing to SD card -- [init -> sd_card_write] [init -> sd_card_write] It was written in the SD card: [init -> sd_card_write] Elements to write 0: a [init -> sd_card_write] Elements to write 1: b [init -> sd_card_write] Elements to write 2: c [init -> sd_card_write] Elements to write 3: d [init -> sd_card_write] [init -> sd_card_write] --- Exynos4 SD card Read Test finished ---
This is the result of the tool dd (Linux command) to read from the SD card after running the write application:
0000000 V f v D nul nul nul nul nul nul nul nul nul nul nul nul
This is the serial output for read aplication after running the write application:
Genode 15.05-176-g7df72d4 <local changes> int main(): --- create local services --- int main(): --- start init --- int main(): transferred 2027 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open ROM session for module "ld.lib.so" [init -> platform_drv] --- Odroid-x2 platform driver --- [init -> sd_card_read] --- Exynos4 SD card read test --- [init -> platform_drv] Dentro del constructor CMU [init -> platform_drv] Changing CPU frequency to 1400000000 [init -> platform_drv] End of Changing CPU frequency to 1400000000 [init -> platform_drv] Saliendo del constructor CMU [init -> platform_drv] Entrando del constructor PMU [init -> platform_drv] Saliendo del constructor PMU [init -> platform_drv] --- Odroid-x2 platform driver. Done --- [init -> sd_card_read] CID: 0x744a4553 0x44432020 0x1033005b 0x8700e100 [init -> sd_card_read] RCA: 0xb368 [init -> sd_card_read] SD card detected [init -> sd_card_read] capacity: 7695 MiB [init -> sd_card_read] [init -> sd_card_read] -- Reading from SD card -- [init -> sd_card_read] [init -> sd_card_read] It was written in the SD card: [init -> sd_card_read] Elements to write 0: V [init -> sd_card_read] Elements to write 1: f [init -> sd_card_read] Elements to write 2: v [init -> sd_card_read] Elements to write 3: D [init -> sd_card_read] [init -> sd_card_read] --- Exynos4 SD card Read Test finished ---
Any recommendation?
Where I could study in depth the SDHCI controller specification?
The SDHCI controller in Genode was originally implemented for Raspberry Pi board, but I have not found any section of code that is platform-dependent, except the memory map. In addition to the memory map, I need to change something in the implementation of SDHCI?
Regards, Humberto.