This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM365 - data Segment Error

Other Parts Discussed in Thread: TVP5158, THS7303

I ran into this problem when booting up our modified DM365 DVR RDK HW, which has

removed one TVP5158, one MDIN200, and changed Ethernet PHY as compared to the original HW design.

The bringup log showed the following and stopped at "data Segment Error":

 

Any help would be appreciated.

 

DM36x initialization passed!           
UBL Version: 0.3.0                     
Booting Catalog Boot Loader            
BootMode = NAND                        
Starting NAND Copy...                  
Valid magicnum, 0xA1ACED66, found in block 0x00000019.
   DONE                                
Jumping to entry point at 0x81080000.  
                                       
U-Boot 1.3.4 (May 23 2011 - 21:00:27)

I2C:   ready
DRAM:  128 MB
NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
128 MiB
ARM Clock : 297MHz
DDR Clock : 540MHz
Ethernet PHY: GENERIC @ 0x00
Set NTSC Video Standard!
Hit any key to stop autoboot:  0

Loading from NAND 128MiB 3,3V 8-bit, offset 0x680000
   Image Name:   Linux-2.6.18_pro500-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1998200 Bytes =  1.9 MB
   Load Address: 80008000
   Entry Point:  80008000
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.18_pro500-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1998200 Bytes =  1.9 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel Here ...

Uncompressing Linux.....................................................................................
Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (root@welson-desktop) (gcc version 4.2.0 (MontaVista1
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci DM365 DVR
Memory policy: ECC disabled, Data cache writeback
DaVinci DM0365 variant 0x8
PLL0: fixedrate: 24000000, commonrate: 135000000, vpssrate: 270000000
PLL0: vencrate_sd: 27000000, ddrrate: 270000000 mmcsdrate: 49090909
PLL1: armrate: 297000000, voicerate: 20482758, vencrate_hd: 27000000
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists.  Total pages: 8960
Kernel command line: mem=35M console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=yaffs2 video=davic
PID hash table entries: 256 (order: 8, 1024 bytes)
Clock event device timer0_0 configured with caps set: 07
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 35MB = 35MB total
Memory: 30300KB available (3413K code, 708K data, 916K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
DaVinci: 104 gpio irqs
DM365 IPIPE initialized in Single Shot mode
Generic PHY: Registered new driver
ch0 default output "COMPOSITE", mode "NTSC"
VPBE Encoder Initialized
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs Jun 20 2011 16:09:52 Installing.
SGI XFS with no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
LTT : ltt-facilities init
LTT : ltt-facility-core init in kernel
davincifb davincifb.0: dm_osd0_fb: 736x480x8@0,0 with framebuffer size 2500KB
DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
facedetect major#: 253, minor# 0
facedetect driver registered
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550A
serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
Davinci EMAC MII Bus: probed
MAC address is fc:fc:fc:fc:fc:fc
TI DaVinci EMAC Linux version updated 4.0
netconsole: not configured, aborting
Linux video capture interface: v2.00
ths7303.c: detecting client on address 0x58
chip found @ 0x58 (DaVinci I2C adapter)
Trying to register davinci display video device.
layer=c0bf3600,layer->video_dev=c0bf3760
Trying to register davinci display video device.
layer=c0bf3400,layer->video_dev=c0bf3560
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
i2c /dev entries driver
nand_davinci nand_davinci.0: Using soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 390 at 0x030c0000
Bad eraseblock 686 at 0x055c0000
Bad eraseblock 877 at 0x06da0000
Creating 4 MTD partitions on "nand_davinci.0":
0x00000000-0x00660000 : "bootloader"
0x00660000-0x00680000 : "params"
0x00680000-0x00a80000 : "kernel"
0x00a80000-0x07f00000 : "filesystem"
nand_davinci nand_davinci.0: hardware revision: 2.3
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbkbd
drivers/usb/input/usbkbd.c: :USB HID Boot Protocol keyboard driver
usbcore: registered new driver usbmouse
drivers/usb/input/usbmouse.c: v1.6:USB HID Boot Protocol mouse driver
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc: USB Host mode controller at c2866000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mice: PS/2 mouse device common for all mice
input: dm365_dvr_keypad as /class/input/input0
DVR_RTC:Found external RTC
dvr-rtc 0-0068: rtc intf: proc
dvr-rtc 0-0068: rtc intf: dev (254:0)
dvr-rtc 0-0068: rtc core: registered rtc-dvr as rtc0
Registered led device: func
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ASoC version 0.13.1
AIC3X Audio Codec 0.2
asoc: aic3x <-> davinci-i2s mapping ok
CQ0093 Voice Codec 0.1
asoc: cq93vc <-> davinci-vcif mapping ok
ALSA device list:
  #0: DaVinci DM365 EVM (aic3x)
  #1: On-chip voice codec (cq93vc)
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
dvr-rtc 0-0068: setting the system clock to 2000-01-01 00:00:09 (946684809)
Time: timer0_1 clocksource has been installed.
Clock event device timer0_0 configured with caps set: 08
Switched to high resolution mode on CPU 0
Sending DHCP and RARP requests .., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.2.102
IP-Config: Complete:
      device=eth0, addr=192.168.2.102, mask=255.255.255.0, gw=192.168.2.1,
     host=192.168.2.102, domain=, nis-domain=(none),
     bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
block 307 is bad
block 603 is bad
block 794 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs2 filesystem).
Freeing init memory: 916K
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Activating swap...done.
Remounting root filesystem...save exit: isCheckpointed 1
done.
Calculating module dependencies
Loading modules:
Checking all file systems: fsck
fsck 1.40 (29-Jun-2007)
Mounting local filesystems: mount nothing was mounted
Starting portmap daemon....
INIT: Entering runlevel: 3var/run
Starting internet superserver: inetd.
file open result
DHCP=0
MAC=FC:FC:FC:FC:FC:FC
IPADDR=192.168.1.200
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
BROADCAST=192.168.1.255
PORT=7620
Configured eth0 as 192.168.1.200 ...
Error, /sbin/dhcpcd-bin: not running
Stopping system log daemon: klogd syslogd.
CSL: Module install successful, device major num = 250
CSL: Module version 0.10.00, built on Jun 20 2011 16:29:55
I2C: Module install successful, device major num = 249
DMA: Module install successful, device major num = 248
DRV: Module install successful
DRV: Module built on Jun 20 2011 16:30:02
DRV: EDMACC.QUEPRI  = 00000777
DRV: SYSTEM.MSTPRI0 = 00550011
DRV: SYSTEM.MSTPRI1 = 00000144
DRV: SYSTEM.MISC = 00000399
DRV: ISP.BCR        = 00000002
CMEMK module: built on Jun 20 2011 at 16:28:51
  Reference Linux version 2.6.18
  File /home/welson/DM368DVR_RDK/DM368_RDK/dvr2/dvr/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdoc
allocated heap buffer 0xc3000000 of size 0x5d00000
CMEM Range Overlaps Kernel Physical - allowing overlap
CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x82300000)
cmemk initialized
EDMAK module: built on Jun 20 2011 at 16:28:56
  Reference Linux version 2.6.18
  File /home/welson/DM368DVR_RDK/DM368_RDK/dvr2/dvr/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdoc
IRQK module: built on Jun 20 2011 at 16:28:59
  Reference Linux version 2.6.18
  File /home/welson/DM368DVR_RDK/DM368_RDK/dvr2/dvr/dvsdk_2_10_01_18/linuxutils_2_24_03/packages/ti/sdoc
irqk initialized
NET: Registered protocol family 10
6WIND/LSIIT IPv6 multicast forwarding 0.1 plus PIM-SM/SSM with *BSD API
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
Mobile IPv6

MontaVista(R) Linux(R) Professional Edition 5.0.0 (0801921)

192.168.1.200 login:  [OSA_FILE ] Reading file [dvrSetting.udi] ... Done. [11332 bytes]
ProfileReadfile(11332)
First Init*********************
*************InitSystemModeSelect(0)
iDvrType = 8
InitCameraPositionChannel(ch=0,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=1,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=2,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=3,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=4,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=5,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=6,Xpos=0,Ypos=0)
InitCameraPositionChannel(ch=7,Xpos=0,Ypos=0)
LIBDVR365_InitBitrateType(0,0)
LIBDVR365_InitBitrateType(1,0)
LIBDVR365_InitBitrateType(2,0)
LIBDVR365_InitBitrateType(3,0)
LIBDVR365_InitBitrateType(4,0)
LIBDVR365_InitBitrateType(5,0)
LIBDVR365_InitBitrateType(6,0)
LIBDVR365_InitBitrateType(7,0)
LIBDVR365_initROIEnable(ch=0,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=1,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=2,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=3,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=4,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=5,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=6,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_initROIEnable(ch=7,enable=0,x=0,y=0,w=0,h=0)
LIBDVR365_setMotion(0)
LIBDVR365_setMotion(1)
LIBDVR365_setMotion(2)
LIBDVR365_setMotion(3)
LIBDVR365_setMotion(4)
LIBDVR365_setMotion(5)
LIBDVR365_setMotion(6)
LIBDVR365_setMotion(7)
LIBDVR365_initFaceDetection(0,0,4)
LIBDVR365_initFaceDetection(1,0,4)
LIBDVR365_initFaceDetection(2,0,4)
LIBDVR365_initFaceDetection(3,0,4)
LIBDVR365_initFaceDetection(4,0,4)
LIBDVR365_initFaceDetection(5,0,4)
LIBDVR365_initFaceDetection(6,0,4)
LIBDVR365_initFaceDetection(7,0,4)
[LIB365] - @@@@==LIBDVR365_initSensor(0 0 0)==@@@@
LIBDVR365_initSensor(0)
[LIB365] - @@@@==LIBDVR365_initSensor(1 0 0)==@@@@
LIBDVR365_initSensor(1)
[LIB365] - @@@@==LIBDVR365_initSensor(2 0 0)==@@@@
LIBDVR365_initSensor(2)
[LIB365] - @@@@==LIBDVR365_initSensor(3 0 0)==@@@@
LIBDVR365_initSensor(3)
[LIB365] - @@@@==LIBDVR365_initSensor(4 0 0)==@@@@
LIBDVR365_initSensor(4)
[LIB365] - @@@@==LIBDVR365_initSensor(5 0 0)==@@@@
LIBDVR365_initSensor(5)
[LIB365] - @@@@==LIBDVR365_initSensor(6 0 0)==@@@@
LIBDVR365_initSensor(6)
[LIB365] - @@@@==LIBDVR365_initSensor(7 0 0)==@@@@
LIBDVR365_initSensor(7)
[LIB365] - @@@@==LIBDVR365_initAlarmStatus(0 0 0 3)==@@@@
LIBDVR365_initAlarm(0)
[LIB365] - @@@@==LIBDVR365_initAlarmStatus(1 0 0 3)==@@@@
LIBDVR365_initAlarm(1)
[LIB365] - @@@@==LIBDVR365_initAlarmStatus(2 0 0 3)==@@@@
LIBDVR365_initAlarm(2)
[LIB365] - @@@@==LIBDVR365_initAlarmStatus(3 0 0 3)==@@@@
LIBDVR365_initAlarm(3)
LIBDVR365_setRecordingType(0)
Record Init****
We are in systemsignal
[NETWORK] - sockio.c(119):      TcpServerInit:TcpServerInit............
[NETWORK] - sockio.c(132):      Lsock:FIRMWARE VERSION 2.1A 2010.3.2
[NETWORK] - sockio.c(133):      Lsock:logon thread... run...
[NETWORK] - sockio.c(160):      Csock:control thread... run...
[NETWORK] - sockio.c(204):      Dsock:data thread... run...
[NETWORK] - sockio.c(230):      Ipset:localcast & ip setting...thread...run
 
 CLK Hz,
 ARM   Hz =  297000000
 DDR   Hz =  270000000
 VPSS  Hz =  270000000
 IMCOP Hz =  270000000
 
@@@@@@@@@@@@@@@@ SERIAL OPEN fd : 19 @@@@@@@@@@@@@@@
ptzIdx          : 0
ptzName         : DRX-500
ptzBaud         : 9600
ptzParity       : 0
ptzData         : 8
ptzStop         : 1
ptzIdx          : 1
ptzName         : PELCO-D
ptzBaud         : 4800
ptzParity       : 0
ptzData         : 8
ptzStop         : 1
 
=========Video Standard Status : 81 ============
[DVRSTART] CHIPSET TYPE === DAVINCI_DM365 ===
@@@@@@@@@@@@@ UI_sysStart() start system[0] mode[6] @@@@@@@@@@@@@@@@
 MCVIP: Starting. Please wait !!!
 MCVIP: Capture Starting !!!

===========DRV_faceDetectOpen()===============
 Reg:0x1c40038 : 399
 Reg & 0x04    : 1
==============================================
 
============GetChInfo[360x480]===========
 CAPTURE: Alloc info: numCh=8 numBuf=32, bufSize=368640, allocSize=11796480

 data Segment Error.....

MontaVista(R) Linux(R) Professional Edition 5.0.0 (0801921)

192.168.1.200 login:

  • The application you're runnung is making a segmentation fault, check your software configuration

    the file av_capture/application/dvr/dm365dvr/src/systemsignal.c has the " data Segment Error.....
    " print.

    The software does that when it receives a SIGSEGV signal I suppose.
    This means that there's a segmentation fault. The origin of this should be almost anything, usually not initialized variables, or buffers over run.

    Bye Daniele

  • Dear Daniele,

     

      Thanks for posting your reply.   As described, we have removed one TVP5158.   Correspondingly, i have changed SW to support such HW changes:

    1. #define MCVIP_TVP5158_MAX_CASCADE      (2) in /av_capture/framework/mcvip/inc/mcvip.h is changed to (1)

    2. #define MCVIP_VIDEO_INPUT_PORT_MAX  2  is  also changed to 1

    These are the only SW changes made to reflect  HW change, though may not be correct as I am new to TVP5158 and its code.

    I suppose this "data Segment Error" may refer to something related to it, though I have no clue of what might be missing (i.e. not properly initialized).

    Any suggestion would be greatly appreciated.

     

     

  • CC Lin,

    I think you have to go through the code looking for TVP5258 progrmming functions, maybe I2C funtions.
    Probably th eoriginal code is trying to program via I2C a "ghost" TVP on your board.

    Bye Daniele

  • Hi CC Lin,

    I agree with Daniele that we might have to see the exact place where the Seg Fault is getting generated. Ideally, the software should work with the changes you have done but there might be some non-initialized pointer that might still be getting accessed in a loop.

    Meanwhile, let me also look at the code if we missed out on uninitialized pointers somewhere. We will verify the changes for single TVP5158.

    Regards,

    Anshuman

     

     

  • are there any news about this problem?

    was it solved?

    if so, I'll really appreciate the answer ... :)

    Regards,

    Ran