|
发表于 2020-4-25 12:30:06
18479 浏览 3 回复
MTK CCCI Channel Wakeup source reason
最近在调试MT6580平台的低功耗,发现会不定时的被CCIF_MD这个唤醒源唤醒,log提示如下:
- [ 139.718298] <0>-(0)[634:system_server][SPM] wake up byCCIF0_MD, timer_out = 3906593, r13 = 0xbc061238, debug_flag = 0x1f
- [ 139.718298] <0>-(0)[634:system_server][SPM] r12 = 0x100, raw_sta = 0x100, idle_sta = 0x93d, event_reg = 0x90100000, isr = 0x8
- [ 139.718298] <0>-(0)[634:system_server][SPM] suspend dormant state = 0, md32_flag = 0x0, md32_flag2 = 0
复制代码
没有找到相关解决方法,在MTK FAQ中找到如下说明:
[FAQ21806] CCCI Channel Wakeup source reason
1) 涉及到的相关知识 CCCI唤醒通常都是CCIF唤醒, 这是由于CCB(cross core buffer)也是走CCIF(CCCI interface)
而CLDMA(网络数据包使用的interface)发包之前都会先打CCIF唤醒AP。
通常kernel log 中看到的的“R12_CCIF0_EVENT_B”唤醒AP的case,有三种情况
- CCIF channel user唤醒,有wakeup channel/queue 信息
关键词"CCIF_MD wakeup source"
例如:
<6>[ 8396.256563] (1)[22048:kworker/u17:1][ccci1/cif]CCIF_MD wakeup source5/10/0)(100)
5: CCCI queque number
10: CCCI channel number,对应不同user,具体可以参考下面的CCCI user table
0: reserved data
100: 当前channel被唤醒次数 - CCB唤醒,一般是开MD log 情况下才有
例如:
<6>[ 139.927773] (2)[1308:system_server]active wakeup source: ccci_ccb_meta
<6>[ 139.927803] (2)[1308:system_server]active wakeup source: ccci_ccb_md_monitor
<6>[ 139.927814] (2)[1308:system_server]active wakeup source: ccci_ccb_dhl
log pattern: "CCIF_MD wakeup sourceCCB)" 一般都是开启了mdlogger引起的
预期测试low power要关掉mdlogger,所以如果看到有上面的log,可以先关闭mdlogger开关, 然后再测试, 如果问题依旧, 可以再找MTK for help - 93MD Net packet使用CLDMA, CLDMA给AP发数据包之前也会先发一个CCIF interrupt,一般netlog会看到对应的packet
关键词 “CLDMA_MD wakeup source” 或者“CLDMA_AP wakeup source”
例如:
<6>[ 1127.655025] (3)[0:swapper/3][ccci1/cldma]CLDMA_MD wakeup source0/0/0)
这种问题一般需要network team结合netlog来确定是哪个app在收发data[ccmni]
其中 CLDMA_MD wakeup source 是modem给AP 发数据导致的wakeup
其中 CLDMA_AP wakeup source 是AP给modem 发数据导致的wakeup
2) 实际问题中, CCIF MD wakeup 唤醒最多,以下举例说明wakeup source 具体含义
CCIF_MD wakeup source : (0/0/0) (3)
CCIF_MD wakeup source: (0/2/0) (2)
CCIF_MD wakeup source: (4/14/0) (8)
CCIF_MD wakeup source: (5/10/0) (76)
主要看其中的第二个参数和第四个参数, 第二个参数表示ccci channel, 表明当前是被哪个channel唤醒的
第四个参数,表示被当前channel唤醒的次数。
CCIF_MD wakeup source : (0/0/0) (3)
channel 0 ,system control rx : 系统控制channel,接收来自modem端的modem启动,异常(exception )等信息
CCIF_MD wakeup source: (0/2/0) (2)
ccci channel ,2 代表 sytem channel, system channel用来传输一个系统控制data,比如modem 端通知mipi clk change
CCIF_MD wakeup source: (4/14/0) (8)
channel 14 代表 CCCI_FS_RX channel,代表当前AP 接收到来自modem的FS(modem nvram) 相关操作,当前共接收到8次
CCIF_MD wakeup source: (5/10/0) (76)
channel 10,代表AT RX channel, 代表当前AP接收到一条来自modem 的AT指令上报 ,当前共接收到76次
->
所以解析后可以根据被唤醒的channel number来判定是被哪个user 唤醒的,因CCCI 只是提供interface供User使用, 具体唤醒原因还是需要找对应的user 确认唤醒是否符合预期。
如果channel 在表内, 找对应的User, 如果不在表内, 找CCCI owner来确认
特别说明部分:
如果发现有channel 32 每隔30s左右导致的频繁唤醒, 因这个是属于sim每隔30s救卡导致的唤醒,可以ask sim 相关owner for help
3)CCCI user table[经常遇到的]
RX channel num | user | channel name | description | CCCI Channel | 0 | CCCI drv | ccci_ctrl | Not export userspace, ccci driver internal use | CCCI_CONTROL_RX(0)/CCCI_CONTROL_TX(1) | 2 | CCCI drv | ccci_sys | Not export userspace, ccci driver internal use | CCCI_SYSTEM_RX(2)/CCCI_SYSTEM_TX(3) | 6 | MDlogger ioctl | ccci_md_log_ctrl | Mdlogger use it to send ioctrl | CCCI_UART1_RX(6)/CCCI_UART1_TX(8) | 10 | MUXD | ttyC0 | used to exchange AT data between AP muxd and MD cmux | CCCI_UART2_RX(10)/CCCI_UART2_TX(12) | 14 | CCCI_FSD | ccci_fs | used to write/read md nvram data | CCCI_FS_RX(14)/CCCI_FS_TX(15) | 20 | Network 0 | ccmni0 | used to control md state transition | CCCI_CCMNI1_RX(20)/CCCI_CCMNI1_TX(22) | 24 | Network 1 | ccmni1 | used to control md state transition | CCCI_CCMNI2_TX(26)/CCCI_CCMNI2_RX(24) | 28- | Network 2-20 | ccmni2~20 | used to control md state transition | CCCI_CCMNI3_RX(28)/CCCI_CCMNI3_TX(30)
CCCI_CCMNI4_RX = 69,
CCCI_CCMNI4_RX_ACK = 70,
CCCI_CCMNI4_TX = 71,
CCCI_CCMNI4_TX_ACK = 72,
CCCI_CCMNI4_DLACK_RX = 73,
CCCI_CCMNI5_RX = 74,
CCCI_CCMNI5_RX_ACK = 75,
CCCI_CCMNI5_TX = 76,
CCCI_CCMNI5_TX_ACK = 77,
CCCI_CCMNI5_DLACK_RX = 78,
CCCI_CCMNI6_RX = 79,
CCCI_CCMNI6_RX_ACK = 80,
CCCI_CCMNI6_TX = 81,
CCCI_CCMNI6_TX_ACK = 82,
CCCI_CCMNI6_DLACK_RX = 83,
CCCI_CCMNI7_RX = 84,
CCCI_CCMNI7_RX_ACK = 85,
CCCI_CCMNI7_TX = 86,
CCCI_CCMNI7_TX_ACK = 87,
CCCI_CCMNI7_DLACK_RX = 88,
CCCI_CCMNI8_RX = 89,
CCCI_CCMNI8_RX_ACK = 90,
CCCI_CCMNI8_TX = 91,
CCCI_CCMNI8_TX_ACK = 92,
CCCI_CCMNI8_DLACK_RX = 93,
| 32 | CCCI RPC | ccci_rpc | used to control md state transition | CCCI_RPC_RX(32)/CCCI_RPC_TX(33)
| 34 | CCCI IPC | ccci_ipc | WMT | CCCI_IPC_RX(34)/CCCI_IPC_RX_ACK(35)
| 42 | Mdlogger/meta data | ttyC1 | used to transfer mdlog/meta data | CCCI_MD_LOG_TX(43)/CCCI_MD_LOG_RX(42) | 53 | IMS VIDEO | ccci_imsv | used to exchange data between AP and MD IMS video driver | CCCI_IMSV_UL(52)/CCCI_IMSV_DL(53) | 54 | IMS CTRL | ccci_imsc | used to exchange data between AP and MD IMS ctrl driver | CCCI_IMSC_UL(54)/CCCI_IMSC_DL(55) | 67 | ccci_poll | ccci_poll | used to polling md status | CCCI_STATUS_TX(68)/CCCI_STATUS_RX(67) |
|
|