기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.
찾다 찾다 도저히 못찾아서 여기에 글을 올립니다.
삼성 SDMK6410 보드입니다.
커널 2.6.29 입니다.
alsa를 포팅했는데 아무래도 DMA설정이 잘 못된것 같습니다.
alsa_aplay를 실행하면 memory dump가 납니다.
아래는 부팅 로고입니다.(sound관련 부분만)
...............
s3c64xx_dma_init: Registering DMA channels
s3c64xx_dma_init1: registering DMA 0 (c8808100)
s3c64xx_dma_init1: registering DMA 1 (c8808120)
s3c64xx_dma_init1: registering DMA 2 (c8808140)
s3c64xx_dma_init1: registering DMA 3 (c8808160)
s3c64xx_dma_init1: registering DMA 4 (c8808180)
s3c64xx_dma_init1: registering DMA 5 (c88081a0)
s3c64xx_dma_init1: registering DMA 6 (c88081c0)
s3c64xx_dma_init1: registering DMA 7 (c88081e0)
PL080: IRQ 73, at c8808000
s3c64xx_dma_init1: registering DMA 8 (c880c100)
s3c64xx_dma_init1: registering DMA 9 (c880c120)
s3c64xx_dma_init1: registering DMA 10 (c880c140)
s3c64xx_dma_init1: registering DMA 11 (c880c160)
s3c64xx_dma_init1: registering DMA 12 (c880c180)
s3c64xx_dma_init1: registering DMA 13 (c880c1a0)
s3c64xx_dma_init1: registering DMA 14 (c880c1c0)
s3c64xx_dma_init1: registering DMA 15 (c880c1e0)
PL080: IRQ 74, at c880c000
S3C6410: Initialising architecture
...............
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI s3c64xx-ac97
Entered s3c6400_ac97_probe
WM9713/WM9714 SoC Audio Codec 0.15
Entered s3c24xx_pcm_new
Entered s3c24xx_pcm_preallocate_dma_buffer
Entered s3c24xx_pcm_preallocate_dma_buffer
asoc: AC97 HiFi <-> s3c64xx-ac97 mapping ok
Entered s3c6400_ac97_cold_reset
mmc0: new high speed SDHC card at address a125
mmcblk0: mmc0:a125 SD04G 3.69 GiB
mmcblk0:<7>mmc0: starting CMD18 arg 00000000 flags 000000b5
p1
Cold Reset: [00000000]
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_warm_reset
Warm Reset: [00002a0c]
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_warm_reset
Warm Reset: [00002a0c]
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400002
Entered s3c6400_ac97_cold_reset
Cold Reset: [00000000]
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_warm_reset
Warm Reset: [00002a0c]
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_read: reg=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x3c, val=0x3aff
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x26, val=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_read: reg=0x12
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x12, val=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
ALSA device list:
#0: SMDK6400 (WM9713)
oprofile: using arm/armv6
....
아래를 에러 로고입니다.
# alsa_aplay w.wav
Entered s3c24xx_pcm_open
Playing WAVE 'w.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Stereo
Entered s3c6400_ac97_hw_params
Entered s3c24xx_pcm_hw_params, params = (null)
params c04c3a80, client c04c3ae0, channel 22
failed to get dma channel
Entered s3c24xx_pcm_prepare
Entered s3c24xx_pcm_enqueue
Entered s3c6400_ac97_write: reg=0x2a, val=0x411
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x2c, val=0x5622
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_hifi_prepare
Entered s3c6400_ac97_write: reg=0x26, val=0x0
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0xc, val=0x808
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x18, val=0x606
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x2, val=0x8080
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x4, val=0x606
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Entered s3c6400_ac97_write: reg=0x3c, val=0x1aff
Entered s3c6400_ac97_irq: AC_GLBSTAT = 0x400003
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c659c000
[00000000] *pgd=57bb3031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT
Modules linked in:
CPU: 0 Not tainted (2.6.29 #14)
PC is at __copy_from_user+0x70/0x3b8
LR is at 0xfffe
pc : [<c019d0b8>] lr : [<0000fffe>] psr: 20000013
sp : c7bb1ddc ip : 00000001 fp : c7bb1e24
r10: 00000000 r9 : c79fbe98 r8 : 0000fffd
r7 : 00000003 r6 : 0000fffc r5 : 00000005 r4 : 0000fff3
r3 : 0000005e r2 : 00001f60 r1 : 00023808 r0 : 00000000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 00c5387d Table: 5659c008 DAC: 00000015
위의 빨간 색 부분의 params이 null이라 에러가 나는 것 같은데 고견 부탁합니다.
ALSA의 경우 사운드 드라이버의 등록 구조가 2.6.29에서 바뀌었습니다.
기존의 드라이버를 사용했을 경우 동작하지 않을 가능성이 높습니다.
이솝 자료실에 올라온 이솝 6410용 커널과 비교해 보시면 될 것 같습니다.
Unable to handle kernel NULL pointer dereference 에러의 경우 커널이 어떤 코드 또는 데이터를 를 찾는데 MMU 테이블에서 불러온 물리 주소에 해당 데이터가 위치하지 않았을 경우 발생 합니다.
보통 저런 경우는 디바이스 설계나 메모리 문제 또는 타이밍 문제를 한 번 의심해 보시는것이 어떨지 싶습니다. :)