Kernel Panic

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kernel Panic

Jump to solution
1,236 Views
chandraevolute
Contributor V

I am using IMX6ULEVK board and 3.14.38 BSP version

Hi I am getting kernel panic, attached Log.txt is the boot log.

I wrote a small module as part of the kernel source tree. Switch.c is the module that I wanted to be loaded. It  will register the irq, whenever a switch press happens led should glow.

Below is my dts configurations for the pins I am using

&gpio3{

        interrupt-parent = <&gpio3>;

        interrupts = <22 8>;

};

&iomuxc {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_hog_1>;

        imx6ul-evk {

                pinctrl_hog_1: hoggrp-1 {

                        fsl,pins = <

                                MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY    0x30b0

                                MX6UL_PAD_UART1_RTS_B__GPIO1_IO19       0x17059 /* SD1 CD */

                                MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT    0x17059 /* SD1 VSELECT */

                                MX6UL_PAD_GPIO1_IO09__GPIO1_IO09        0x17059 /* SD1 RESET */

                                MX6UL_PAD_LCD_DATA16__GPIO3_IO21        0x010B0

                        >;

                };

 

the bold ones I have added.

why kernel panic is happening and also you can observe in the log below line. why the gpiod_direction_output is invalid gpio.

GPIO_TEST: Initializing the GPIO_TEST LKM

gpiod_direction_output: invalid GPIO

gpiod_direction_input: invalid GPIO

gpiod_set_debounce: invalid GPIO

Original Attachment has been moved to: Switch.c.zip

Original Attachment has been moved to: Log.txt.zip

Labels (3)
0 Kudos
1 Solution
785 Views
igorpadykov
NXP Employee
NXP Employee

HI chandra

one can check if LCD_DATA16 is already used as output

MX6UL_PAD_LCD_DATA16__LCDIF_DATA16 in uboot mx6ul_14x14_evk.c lcd_pads[] :

uboot-imx.git - Freescale i.MX u-boot Tree

and imx6ul-14x14-evk.dts pinctrl_lcdif_dat: lcdifdatgrp :

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
4 Replies
786 Views
igorpadykov
NXP Employee
NXP Employee

HI chandra

one can check if LCD_DATA16 is already used as output

MX6UL_PAD_LCD_DATA16__LCDIF_DATA16 in uboot mx6ul_14x14_evk.c lcd_pads[] :

uboot-imx.git - Freescale i.MX u-boot Tree

and imx6ul-14x14-evk.dts pinctrl_lcdif_dat: lcdifdatgrp :

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
785 Views
chandraevolute
Contributor V

Hi igo,

     I commented LCD data pins in uboot mx6ul_14x14_evk.c lcd_pads[] and also removed all the LCD based entries in dts and dtsi file. still the problem is present

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

GPIO_TEST: Initializing the GPIO_TEST LKM

gpiod_direction_output: invalid GPIO

gpiod_direction_input: invalid GPIO

gpiod_set_debounce: invalid GPIO

Unable to handle kernel NULL pointer dereference at virtual address 0000004c

pgd = 80004000

[0000004c] *pgd=00000000

Internal error: Oops: 5 [#1] PREEMPT SMP ARM

Modules linked in:

CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.14.38-6UL_ga+ge4944a5 #6

task: 88058000 ti: 8805c000 task.ti: 8805c000

PC is at gpiod_get_raw_value+0x14/0x7c

LR is at ebbgpio_init+0xa0/0x11c

pc : [<802b54d8>]    lr : [<808ae29c>]    psr: a0000113

sp : 8805ded8  ip : f42c407c  fp : 00000000

r10: 808bca44  r9 : 000000d3  r8 : 8091c680

r7 : 00000001  r6 : 00000001  r5 : 80798760  r4 : 8096dde8

r3 : 00000000  r2 : 00000001  r1 : 00000000  r0 : 00000000

Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Regards,

Chandra

0 Kudos
785 Views
igorpadykov
NXP Employee
NXP Employee

Hi Chandra

could you remove custom module to check

if error "Unable to handle kernel NULL pointer dereference"

was caused by that module (probably due to wrong building).

~igor

0 Kudos
785 Views
chandraevolute
Contributor V

i am able to handle it

0 Kudos