arjun.a
range data
5aefcf4
raw
history blame
No virus
10.2 kB
Ticket Name: Linux/TDA2: how to read DIE_ID
Query Text:
Part Number: TDA2 Tool/software: Linux I get the DIE_ID used the emulator。 but i have to read it on a15 , i use the physical address. int id=*(int*)(0x4AE0C200); printf("id=%d\n", id); when i run the program it have problem ,, ****** Segmentation fault caught .... Faulty address is 0x4ae0c200, called from 0x16083 Totally Obtained 0 stack frames. signal number =11 Signal number = 11, Signal errno = 0 SI code = 1 (Address not mapped to object) Fault addr = 0x4ae0c200 [bt] Execution path: what can i do ?? follow is the log insmod: ERROR: could not insert module ./bin/memcache.ko: File exists insmod: ERROR: could not load module ./bin/cmemk.ko: No such file or directory mknod: /dev/memcache: File exists ./disableDssInterruptsOnA15.sh: line 11: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 12: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 13: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 14: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 15: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 16: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 17: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 18: COMMANDS: command not found ./disableDssInterruptsOnA15.sh: line 19: COMMANDS: command not found updated value is COMMANDS ### WARNING ###: use the following [read | write | set bit | clear bit | dump] commands at your own risk! No address check done, may generate: - bus error (invalid or not accessible <physical address>, - platform crash/hang (bad <value>). Read any OMAP memory address (register), given its <physical address> or <name> as listed in TRM. Write <value> at any OMAP memory address (register), given its <physical address> or <name> as listed in TRM. Set bit at <position> into any OMAP memory address (register), given its <physical address> or <name> as listed in TRM. Clear bit at <position> into any OMAP memory address (register), given its <physical address> or <name> as listed in TRM. Dump a range of OMAP memory addresses, from <start address> to <end address>. Note all addresses within given range must be valid and accessible. ### WARNING ###: use the following I2C [read | write] commands at your own risk! No address check done, may generate: - I2C bus error (invalid or not accessible <physical address>, - platform crash/hang (bad <value>). Read I2C register at address <addr> from I2C chip at <chip-addr> on I2C <bus>. Write <value> in I2C register at address <addr> from I2C chip at <chip-addr> on I2C <bus>. [HOST] OSA: MEM: 0: Mapped 0xa0100000 to 0xb6a01000 of size 0x00100000 [HOST] OSA: MEM: 1: Mapped 0x84203000 to 0xa7001000 of size 0x0fa00000 [HOST] OSA: MEM: 2: Mapped 0xa0200000 to 0xa6f41000 of size 0x00040000 [HOST] OSA: MEM: 3: Mapped 0xa02c0000 to 0xa6f81000 of size 0x00080000 [HOST] OSA: MEM: 4: Mapped 0xa0440000 to 0xa6d41000 of size 0x00200000 [HOST] OSA: HOST Remote Log Shared Memory @ 0xa024f140 [HOST] OSA: DSP1 Remote Log Shared Memory @ 0xa02769e0 [HOST] OSA: DSP2 Remote Log Shared Memory @ 0xa029e280 [HOST] OSA: EVE1 Remote Log Shared Memory @ 0xa02c5b20 [HOST] OSA: EVE2 Remote Log Shared Memory @ 0xa02ed3c0 [HOST] OSA: EVE3 Remote Log Shared Memory @ 0xa0314c60 [HOST] OSA: EVE4 Remote Log Shared Memory @ 0xa033c500 [HOST] OSA: IPU2 Remote Log Shared Memory @ 0xa0363da0 [HOST] [HOST ] 2129.268771 s: SYSTEM: System A15 Init in progress !!! [HOST] [HOST ] 2129.268862 s: SYSTEM: IPC: Init in progress !!! [HOST] [HOST ] 2129.268862 s: SYSTEM: IPC: Notify init in progress !!! [HOST] [HOST ] 2129.269137 s: SYSTEM: IPC: [IPU2] socket bind success !!! (dst vproc = 1, endpt = 81) [HOST] [HOST ] 2129.269137 s: SYSTEM: IPC: [IPU2] socket info (family = 41, dst proc id = -1, endpt = 81) !!! [HOST] [HOST ] 2129.269167 s: SYSTEM: IPC: [IPU2] socket connect success !!! (dst vproc = 1, endpt = 80) [HOST] [HOST ] 2129.269198 s: SYSTEM: IPC: [IPU2] socket info (family = 41, dst proc id = -1, endpt = 1024) !!! [HOST] [HOST ] 2129.269381 s: SYSTEM: IPC: [DSP1] socket bind success !!! (dst vproc = 2, endpt = 81) [HOST] [HOST ] 2129.269381 s: SYSTEM: IPC: [DSP1] socket info (family = 41, dst proc id = -1, endpt = 81) !!! [HOST] [HOST ] 2129.269411 s: SYSTEM: IPC: [DSP1] socket connect success !!! (dst vproc = 2, endpt = 80) [HOST] [HOST ] 2129.269411 s: SYSTEM: IPC: [DSP1] socket info (family = 41, dst proc id = -1, endpt = 1024) !!! [HOST] [HOST ] 2129.269594 s: SYSTEM: IPC: [DSP2] socket bind success !!! (dst vproc = 3, endpt = 81) [HOST] [HOST ] 2129.269594 s: SYSTEM: IPC: [DSP2] socket info (family = 41, dst proc id = -1, endpt = 81) !!! [HOST] [HOST ] 2129.269625 s: SYSTEM: IPC: [DSP2] socket connect success !!! (dst vproc = 3, endpt = 80) [HOST] [HOST ] 2129.269625 s: SYSTEM: IPC: [DSP2] socket info (family = 41, dst proc id = -1, endpt = 1024) !!! [HOST] [HOST ] 2129.269777 s: SYSTEM: IPC: Notify init DONE !!! [HOST] [HOST ] 2129.269777 s: SYSTEM: MSGQ: MsgQ init in progress !!! [HOST] [HOST ] 2129.269869 s: SYSTEM: MSGQ: MsgQ init DONE !!! [HOST] [HOST ] 2129.269869 s: SYSTEM: IPC: Init DONE !!! [HOST] [HOST ] 2129.269869 s: SYSTEM: Initializing A15 Links !!! [HOST] [HOST ] 2129.269991 s: IPC_OUT_0 : Init done - linkid-0x2000000 [HOST] [HOST ] 2129.270082 s: IPC_OUT_1 : Init done - linkid-0x2000001 [HOST] [HOST ] 2129.270174 s: IPC_OUT_2 : Init done - linkid-0x2000002 [HOST] [HOST ] 2129.270235 s: IPC_OUT_3 : Init done - linkid-0x2000003 [HOST] [HOST ] 2129.270387 s: IPC_OUT_4 : Init done - linkid-0x2000004 [HOST] [HOST ] 2129.270540 s: IPC_IN_0 : Init done - linkid-0x200000a [HOST] [HOST ] 2129.270662 s: IPC_IN_1 : Init done - linkid-0x200000b [HOST] [HOST ] 2129.270784 s: IPC_IN_2 : Init done - linkid-0x200000c [HOST] [HOST ] 2129.270936 s: IPC_IN_3 : Init done - linkid-0x200000d [HOST] [HOST ] 2129.271058 s: IPC_IN_4 : Init done - linkid-0x200000e [HOST] [HOST ] 2129.271211 s: IPC_IN_5 : Init done - linkid-0x200000f [HOST] [HOST ] 2129.271333 s: IPC_IN_6 : Init done - linkid-0x2000010 [HOST] [HOST ] 2129.271516 s: NULL_0 : Init done - linkid-0x2000014 [HOST] [HOST ] 2129.271638 s: NULL_1 : Init done - linkid-0x2000015 [HOST] [HOST ] 2129.271790 s: NULL_SRC_0 : Init done - linkid-0x2000039 [HOST] [HOST ] 2129.271943 s: ALGORITHM_0 : Init done - linkid-0x2000031 [HOST] [HOST ] 2129.272095 s: ALGORITHM_1 : Init done - linkid-0x2000032 [HOST] [HOST ] 2129.272248 s: ALGORITHM_2 : Init done - linkid-0x2000033 [HOST] [HOST ] 2129.272370 s: ALGORITHM_3 : Init done - linkid-0x2000034 [HOST] [HOST ] 2129.272522 s: ALGORITHM_4 : Init done - linkid-0x2000035 [HOST] [HOST ] 2129.272675 s: ALGORITHM_5 : Init done - linkid-0x2000036 [HOST] [HOST ] 2129.272827 s: ALGORITHM_6 : Init done - linkid-0x2000037 [HOST] [HOST ] 2129.272949 s: ALGORITHM_7 : Init done - linkid-0x2000038 [HOST] [HOST ] 2129.273163 s: DUP0 : Init done - linkid-0x0 [HOST] [HOST ] 2129.273346 s: DUP1 : Init done - linkid-0x0 [HOST] [HOST ] 2129.273498 s: DUP2 : Init done - linkid-0x0 [HOST] [HOST ] 2129.273681 s: DUP3 : Init done - linkid-0x0 [HOST] [HOST ] 2129.273834 s: DUP4 : Init done - linkid-0x0 [HOST] [HOST ] 2129.273986 s: SYNC_0 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274108 s: SYNC_1 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274261 s: SYNC_2 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274413 s: SYNC_3 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274566 s: MERGE_0 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274718 s: MERGE_1 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274871 s: MERGE_2 : Init done - linkid-0x0 [HOST] [HOST ] 2129.274993 s: MERGE_3 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275084 s: MERGE_4 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275237 s: SELECT_0 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275328 s: SELECT_1 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275450 s: GATE_0 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275542 s: GATE_1 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275633 s: GATE_2 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275725 s: GATE_3 : Init done - linkid-0x0 [HOST] [HOST ] 2129.275847 s: SGXFRMCPY_0 : Init done - linkid-0x2000040 [HOST] [HOST ] 2129.275847 s: SYSTEM: Initializing A15 Links ... DONE !!! [HOST] [HOST ] 2129.280971 s: OSA: Adjusting global time, timeH by 0 units!!! VX_ZONE_INIT:Enabled VX_ZONE_ERROR:Enabled VX_ZONE_WARNING:Enabled [HOST] [HOST ] 2129.627094 s: SYSTEM: System A15 Init Done !!! AHR_CreateCallDetectionEngine=0!!! ****** Segmentation fault caught .... Faulty address is 0x4ae0c200, called from 0x16083 Totally Obtained 0 stack frames. signal number =11 Signal number = 11, Signal errno = 0 SI code = 1 (Address not mapped to object) Fault addr = 0x4ae0c200 [bt] Execution path:
Responses:
You have to mmap physical address to the process space and read it with virtual address. There is an easier way to read physical address in Linux by using "omapconf". omapconf tool should already be included in SDK targetfs. You can run omapconf from the console. # omapconf --help This will display the available command supported by omapconf. #omapconf read 0x4AE0C200 It will return the value of the physical address provided. Regards, Stanley
Hi Stanley i am using SDK_VISION_03_02_00_00 SDK now ,install followed VisionSDK_Linux_UserGuide.pdf. PROCESSOR_SDK_VISION_03_02_00_00/ti_components/os_tools/linux/kernel/omap$ this site have omap , is this omapconf tool ? PROCESSOR_SDK_VISION_03_02_00_00/vision_sdk/links_fw/src/hlos/links_a15/nullSrc$ i have to read chip id in this link! hancan@hancan-virtual-machine:~/PROCESSOR_SDK_VISION_03_02_00_00/vision_sdk/links_fw/src/hlos/links_a15/nullSrc$ omapconf --help omapconf: command not found BESTWISHES SHUAI
Hi Stanley root@dra7xx-evm:~# omapconf read 0x4AE0C200 0B014014 in console can read, but i want to read in this link ( PROCESSOR_SDK_VISION_03_02_00_00/vision_sdk/links_fw/src/hlos/links_a15/nullSrc) thanks shuai
You have to map the DIE_ID register address to nullSrc Link process space via calling mmap(). You can find the API doc for mmap() here. man7.org/.../mmap.2.html Some example can be found in ~/vision_sdk/links_fw/src/hlos/osa/src/osa_mem.c. Regards, Stanley
thanks alot!