|
2440 5.0 串口移植到 6.0。
加载串口驱动后,启动出现INFO: CReg2440Uart::CReg2440Uart using processor frequency reported by the OAL (0).
然后系统就死了。
也就是这一段
CReg2440Uart::CReg2440Uart()中
if (!KernelIoControl(IOCTL_PROCESSOR_INFORMATION, NULL, 0, &procInfo, sizeof(PROCESSOR_INFO), &dwBytesReturned))
{
m_s3c2440_pclk = DEFAULT_S3C2440A_PCLK;
RETAILMSG(TRUE, (TEXT("WARNING: CReg2440Uart::CReg2440Uart failed to obtain processor frequency - using default value (%d).\r\n"), m_s3c2440_pclk));
}
else
{
m_s3c2440_pclk = procInfo.dwClockSpeed;
RETAILMSG(TRUE, (TEXT("INFO: CReg2440Uart::CReg2440Uart using processor frequency reported by the OAL (%d).\r\n"), m_s3c2440_pclk));
}
问题是KernelIoControl 通过OALIoCtlProcessorInformation 这个函数获取信息。为什么 procInfo.dwClockSpeed 会是0?是获取失败么? 要怎么改?
|
|