进入内核,添加打印追踪信息,发现启动后挂在“\drivers\mxc\gpu-viv\hal\os\linux\kernel\gc_hal_kernel_driver.c”中的
/* Create the GAL device. */
gcmkONERROR(gckGALDEVICE_Construct(
irqLine,
registerMemBase, registerMemSize,
irqLine2D,
registerMemBase2D, registerMemSize2D,
irqLineVG,
registerMemBaseVG, registerMemSizeVG,
contiguousBase, contiguousSize,
bankSize, fastClear, compression, baseAddress, physSize, signal,
logFileSize,
pdev,
powerManagement,
gpuProfiler,
&device
));
这个函数里面。
进一步跟踪内核,可知程序最终是进入 “\drivers\mxc\gpu-viv\hal\os\linux\kernel\gc_hal_kernel_os.c”的函数gckOS_WriteRegisterEx中的 writel(Data, (gctUINT8 *)Os->device->registerBases[Core] + Address)这一步挂掉的:
gckOS_WriteRegisterEx(
IN gckOS Os,
IN gceCORE Core,
IN gctUINT32 Address,
IN gctUINT32 Data
)
{
gcmkHEADER_ARG("Os=0x%X Core=%d Address=0x%X Data=0x%08x", Os, Core, Address, Data);
gcmkVERIFY_ARGUMENT(Address < Os->device->requestedRegisterMemSizes[Core]);
writel(Data, (gctUINT8 *)Os->device->registerBases[Core] + Address);
/* Success. */
gcmkFOOTER_NO();
return gcvSTATUS_OK;
}
|