学习scp和ap的共享内存:
kernel-4.14/drivers/misc/mediatek/scp/v01/scp_helper.c 中
scp_init() -> scp_reserve_memory_ioremap() 会打印一些预留的sensor 共享内存信息。
以x6810为例:
行 1329: <5>[ 1.918889] .(7)[1:swapper/0][SCP][rsrv_mem-0] phy:0x8b000000 - 0x8b0fffff, len:0x100000
行 1330: <5>[ 1.919953] .(7)[1:swapper/0][SCP][rsrv_mem-0] vir:0xffffff800d000000 - 0xffffff800d0fffff, len:0x100000
行 1331: <5>[ 1.921167] .(7)[1:swapper/0][SCP][rsrv_mem-1] phy:0x8b100000 - 0x8b100fff, len:0x1000
行 1332: <5>[ 1.922187] .(7)[1:swapper/0][SCP][rsrv_mem-1] vir:0xffffff800d100000 - 0xffffff800d100fff, len:0x1000
行 1333: <5>[ 1.923379] .(7)[1:swapper/0][SCP][rsrv_mem-2] phy:0x8b101000 - 0x8b280fff, len:0x180000
行 1334: <5>[ 1.924430] .(7)[1:swapper/0][SCP][rsrv_mem-2] vir:0xffffff800d101000 - 0xffffff800d280fff, len:0x180000
这些预留的共享内存在 kernel-4.14/drivers/misc/mediatek/scp/mt6785/scp_reservedmem_define.h 中定义</