Hi,
I am currently working on adding a feature to the OV5647, but I am encountering some issues while writing this feature.
Here are my feature requirements and thoughts:
- Separate the register values table <Completed>
- Add a test mode (which can be "switched / added" at the user applications layer using register values, without re-compile kernel) <Currently attempting to write this feature>
The problem I am currently facing is as follows:
Attempting to read or write the address "0x3000" or "0x0100" (I guess every address will get same result) using "ioctl" and "debugfs" results in a Segmentation fault.
dmesg:
ioctl code:
https://github.com/raspberrypi/linux/co ... 1.y-ov5647
(This is my personal side project.)
I am currently working on adding a feature to the OV5647, but I am encountering some issues while writing this feature.
Here are my feature requirements and thoughts:
- Separate the register values table <Completed>
- Add a test mode (which can be "switched / added" at the user applications layer using register values, without re-compile kernel) <Currently attempting to write this feature>
The problem I am currently facing is as follows:
Attempting to read or write the address "0x3000" or "0x0100" (I guess every address will get same result) using "ioctl" and "debugfs" results in a Segmentation fault.
dmesg:
Code:
[ 300.878109] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000078[ 300.878131] Mem abort info:[ 300.878134] ESR = 0x0000000096000005[ 300.878137] EC = 0x25: DABT (current EL), IL = 32 bits[ 300.878142] SET = 0, FnV = 0[ 300.878145] EA = 0, S1PTW = 0[ 300.878148] FSC = 0x05: level 1 translation fault[ 300.878151] Data abort info:[ 300.878154] ISV = 0, ISS = 0x00000005[ 300.878157] CM = 0, WnR = 0[ 300.878160] user pgtable: 4k pages, 39-bit VAs, pgdp=000000006e93d000[ 300.878165] [0000000000000078] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000[ 300.878177] Internal error: Oops: 0000000096000005 [#4] PREEMPT SMP[ 300.878183] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep vc4 ov5647 snd_soc_hdmi_codec drm_display_helper cec drm_dma_helper brcmfmac brcmutil hci_uart rpivid_hevc(C) bcm2835_unicam bcm2835_codec(C) drm_kms_helper bcm2835_v4l2(C) bcm2835_isp(C) v4l2_dv_timings btbcm v4l2_mem2mem v4l2_fwnode v3d videobuf2_vmalloc cfg80211 bcm2835_mmal_vchiq(C) i2c_mux_pinctrl i2c_mux bluetooth videobuf2_dma_contig gpu_sched v4l2_async videobuf2_memops binfmt_misc snd_soc_core raspberrypi_hwmon drm_shmem_helper videobuf2_v4l2 videobuf2_common i2c_brcmstb ecdh_generic ecc videodev snd_compress rfkill libaes snd_bcm2835(C) snd_pcm_dmaengine snd_pcm snd_timer snd vc_sm_cma(C) mc fb_sys_fops raspberrypi_gpiomem i2c_bcm2835 syscopyarea sysfillrect sysimgblt nvmem_rmem uio_pdrv_genirq uio drm i2c_dev fuse dm_mod drm_panel_orientation_quirks backlight ip_tables x_tables ipv6[ 300.878316] CPU: 2 PID: 1926 Comm: ov5647_app Tainted: G D C 6.1.74-v8-Edward_Kernel+ #9[ 300.878322] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT)[ 300.878326] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)[ 300.878331] pc : ov5647_ioctl+0x34/0x2cc [ov5647][ 300.878348] lr : __arm64_sys_ioctl+0xb0/0xf4[ 300.878360] sp : ffffffc009fd3d90[ 300.878363] x29: ffffffc009fd3d90 x28: ffffff8043953d80 x27: 0000000000000000[ 300.878372] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000[ 300.878379] x23: 0000000000000003 x22: 0000007fe5907690 x21: ffffff804695b100[ 300.878386] x20: ffffff804695b100 x19: 0000000040045701 x18: 0000000000000000[ 300.878393] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000[ 300.878400] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000[ 300.878407] x11: 0000000000000000 x10: 0000000000000000 x9 : ffffffe68692ab00[ 300.878414] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000003[ 300.878420] x5 : 0000000000005452 x4 : 0000000000000000 x3 : ffffff8043953d80[ 300.878427] x2 : 0000007fe5907690 x1 : 0000000040045701 x0 : 0000000000000000[ 300.878435] Call trace:[ 300.878439] ov5647_ioctl+0x34/0x2cc [ov5647][ 300.878449] __arm64_sys_ioctl+0xb0/0xf4[ 300.878455] invoke_syscall+0x50/0x120[ 300.878463] el0_svc_common.constprop.0+0x4c/0x100[ 300.878469] do_el0_svc+0x38/0xe0[ 300.878475] el0_svc+0x2c/0x84[ 300.878483] el0t_64_sync_handler+0xbc/0x140[ 300.878489] el0t_64_sync+0x18c/0x190[ 300.878496] Code: f9001fe4 d2800004 f100801f 54001380 (f9403c14)[ 300.878500] ---[ end trace 0000000000000000 ]---
ioctl code:
https://github.com/raspberrypi/linux/co ... 1.y-ov5647
(This is my personal side project.)
Statistics: Posted by edward.wu — Mon Jan 29, 2024 7:25 am