使用imx6q
android4.4.3
内核启动到Galcore version 5.0.11.25762之后死掉。
跟踪显示:
进入内核,添加打印追踪信息,发现启动后挂在“\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;
}
添加打印信息:
Galcore version 5.0.11.25762
Galcore --------------------------------------------
IrqLine=41
RegisterMemBase=0x00130000
RegisterMemSize=0x4000
IrqLine2D=42
RegisterMemBase2D=0x00134000
RegisterMemSize2D=0x4000
IrqLineVG=43
RegisterMemBaseVG=0x02204000
RegisterMemSizeVG=0x4000
ContiguousBase=0x00000000
ContiguousSize=0x8000000
BankSize=0x0
FastClear=-1
Compression=-1
PhysBaseAddr=0x0
PhysSize=0
Signal=48
Galcore --------------------------------------------
Os=-901171200
Core=0
Address=0x0
Data=0x00000900
Os->device->registerBases[Core]=0xe6b88000
之后就死在writel(Data, (gctUINT8 *)Os->device->registerBases[Core] + Address);这个函数这了。
以下是我在android4.4.2中正常启动的时候打印的结果:
[ 3.915200] Galcore version 4.6.9.9754
[ 3.919012] Galcore --------------------------------------------
[ 3.925164] IrqLine=41
[ 3.925167] RegisterMemBase=0x00130000
[ 3.925170] RegisterMemSize=4000
[ 3.925173] IrqLine2D=42
[ 3.925175] RegisterMemBase2D=0x00134000
[ 3.925179] RegisterMemSize2D=4000
[ 3.925181] IrqLineVG=43
[ 3.925184] RegisterMemBaseVG=0x02204000
[ 3.925187] RegisterMemSizeVG=4000
[ 3.925190] ContiguousBase=0x75000000
[ 3.925193] ContiguousSize=b000000
[ 3.925195] BankSize=0
[ 3.925198] FastClear=-1
[ 3.925200] Compression=-1
[ 3.925203] PhysBaseAddr=0x10000000
[ 3.925205] PhysSize=0
[ 3.925208] Signal=48
[ 3.981153] Galcore --------------------------------------------
[ 3.989547] Os=-727299520
[ 3.994597] Core=0
[ 3.996846] Address=0x0
[ 3.999536] Data=0x00000900
[ 4.002544] Os->device->registerBases[Core]=0xd99d8000
[ 4.007855] Galcore --------------------------------------------
[ 4.016004] Os=-727299520
[ 4.020884] Core=0
[ 4.025142] Address=0x104
[ 4.030007] Data=0x00000000
[ 4.033026] Os->device->registerBases[Core]=0xd99d8000
[ 4.038319] Galcore --------------------------------------------
[ 4.044467] Os=-727299520
[ 4.047332] Core=0
[ 4.049579] Address=0x10c
[ 4.052445] Data=0x015b0880
[ 4.055448] Os->device->registerBases[Core]=0xd99d8000
[ 4.060748] Galcore --------------------------------------------
[ 4.066879] Os=-727299520
[ 4.069740] Core=0
[ 4.072007] Address=0x10c
[ 4.074861] Data=0x015b0881
[ 4.077802] Os->device->registerBases[Core]=0xd99d8000
[ 4.083153] Galcore -------------------------------------------- |