原因是framebuffer还没有正确映射.
A4,掌微,跟你的一样,新增文件 BufInfo.h 、 halio.h 、 utldrv.h 放在common根目录下面,这几个文件系统驱动提供的.
* BufInfo.h *
* SiRF Technology, Inc. Platform Software *
* *
* Copyright (c) 2008 by SiRF Technology, Inc. All rights reserved. *
* *
* This Software is protected by United States copyright laws and *
* international treaties. You may not reverse engineer, decompile *
* or disassemble this Software. *
* *
* WARNING: *
* This Software contains SiRF Technology, Inc.'s confidential and *
* proprietary information. UNAUTHORIZED COPYING, USE, DISTRIBUTION, *
* PUBLICATION, TRANSFER, SALE, RENTAL OR DISCLOSURE IS PROHIBITED *
* AND MAY RESULT IN SERIOUS LEGAL CONSEQUENCES. Do not copy this *
* Software without SiRF Technology, Inc.'s express written *
* permission. Use of any portion of the contents of this Software *
* is subject to and restricted by your written agreement with *
* SiRF Technology, Inc. *
* *
***************************************************************************/
//utldrv.h
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/***************************************************************************
* *
* SiRF Technology, Inc. Platform Software *
* *
* Copyright (c) 2008 by SiRF Technology, Inc. All rights reserved. *
* *
* This Software is protected by United States copyright laws and *
* international treaties. You may not reverse engineer, decompile *
* or disassemble this Software. *
* *
* WARNING: *
* This Software contains SiRF Technology, Inc.'s confidential and *
* proprietary information. UNAUTHORIZED COPYING, USE, DISTRIBUTION, *
* PUBLICATION, TRANSFER, SALE, RENTAL OR DISCLOSURE IS PROHIBITED *
* AND MAY RESULT IN SERIOUS LEGAL CONSEQUENCES. Do not copy this *
* Software without SiRF Technology, Inc.'s express written *
* permission. Use of any portion of the contents of this Software *
* is subject to and restricted by your written agreement with *
* SiRF Technology, Inc. *
* *
***************************************************************************/
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Module Name:
utldrv.h
Abstract:
Private header file. Defines the data structure for utility driver
This function helps drivers to get the virtual address for the CPU registers they
specified.
dwAddr : is the address of the register you want to get virtual address. Depending
on the bPA flag, it could be the K-Mode virtuall address or physical
address.
dwSize : Size of the memory.
bPA : TRUE if the dwAddr is physical address. FALSE if it is K-Mode virtual
address.
pVA : is the pointer to the process virtual address you want to use in your driver.
This function helps drivers to get the virtual address for the specified SDRAM.
dwAddr : the address for the SDRAM you want to get virtual address. Depending on
the bPA flag, it could be the K-Mode virtual address or physical address.
dwSize : size of the memory
bPA : TRUE if the dwAddr is physical addresss. FALSE if it is K-Mode virtual
address.
dwFlags : Memory flags as you would pass to VirtualCopy.
pVA : pointer to the process virtual address you requested.
Return Value: ERROR_SUCCESS if it is succeeds.
DWORD FreeMemVA(PVOID pContext, DWORD pVA);
This function frees the allocated process virtual memory.
pVA : this is the process virtual memory returned by GetMemVA function call.
(*) For registers, UTLDRV won't free the virtual address until UTLDRV itself exits.
This function registers the block driver to the UTL driver for PowerOn notification.
pfnCallback: the callback function for UTLDRV to call when we come back from PowerOff.
Return Value: 0xFFFFFFFF if the function failed. Use GetLastError() for error code.
Otherwise, it returns an ID which can be used to call UnRegisterStorageDrv
function.
// define OEM Function start
// Function codes 0-2047 are reserved for Microsoft; codes 2048-4095 are reserved for OEMs and IHVs
// A function code can be no larger than 4095
#define OEM_HAL_IO_CODE_START 2048
// get Display data buf address
#define IOCTL_HAL_GET_DISPLAY_DATA_BUF CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 60, METHOD_BUFFERED, FILE_ANY_ACCESS)
// get VideoCodec data buf address
#define IOCTL_HAL_GET_VCODEC_DATA_BUF CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 61, METHOD_BUFFERED, FILE_ANY_ACCESS)
// This IOCTL code is used by I2C driver to submit an i2c transaction to the
// kernel for processing.
#define IOCTL_KERNELI2C_SUBMIT CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 62, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_SET_RTC_WAKEUP_TIME CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 63, METHOD_BUFFERED, FILE_ANY_ACCESS)
// get OEM specific value in EFuse
#define IOCTL_HAL_GET_BTMACADDR CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 64, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_GET_CUSTOMERNUM CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 65, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_GET_FURTURENUM CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 66, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_HAL_GET_OEMVALUE CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 67, METHOD_BUFFERED, FILE_ANY_ACCESS)
// get OEM data buf address
#define IOCTL_HAL_GET_OEM_DATA_BUF CTL_CODE(FILE_DEVICE_HAL, OEM_HAL_IO_CODE_START + 68, METHOD_BUFFERED, FILE_ANY_ACCESS)