转自:http://blogs.msdn.com/ce_base/archive/2007/02/07/hal-flat-display-driver-demystified.aspx

Let's talk about display drivers, particularly HAL Flat ones. HAL stands for Hardware Abstraction Layer and is also known as OEM Adaptation Layer (OAL).

What is a HAL Flat display driver?

In brief, it is yet another implementation of a GPE (Graphics Primitive Engine) based display driver, but with a twist: The driver itself does not contain any hardware dependent code and therefore it is totally platform independent. The hardware dependent code is pushed down to OAL. It communicates with OAL through I/O control (IOCTL) messages.

As its name suggests it requires a flat (contiguous) frame buffer either on the display hardware or in memory.

The driver source is under %_WINCEROOT%\Public\Common\OAK\Drivers\Display\hflat.

Why care about writing a HAL Flat display driver?

A HAL Flat driver is a good choice to quickly make the display work on a new platform.

HAL Flat driver is based on GPE technology only and not on DirectDraw (DDGPE). Therefore, it is much simpler and easier to implement. Writing the hardware dependent code in OAL is straightforward: just right the basic hardware initialization code and data transfer routines for the frame buffer (if needed at all). You don't need to write any DMA or HW acceleration code unless the HAL Flat driver will be the final display driver for your platform. Either way your efforts in developing the hardware routines won't go wasted, you can put them into a DDGPE based driver if you choose to implement one later.

How do I implement a HAL Flat display driver?

Here are the steps to make the HAL Flat driver to work with your hardware:

1. Add the following line to into the IOCTL table in %_WINCEROOT%\Platform\%_TGTPLAT%\src\inc\ioctl_tab.h:

{ IOCTL_HAL_DDI, 0, OALIoCtlHalDDI },

IOCTL_HAL_DDI is the IOCTL message for HAL Flat services that enter OAL at OALIoCtlHalDDI function.

2. Add OALIoCtlHalDDI function to OAL code. Write the necessary hardware initialization and power management code and call it from OALIoCtlHalDDI.

Sample code for how to write OAL part of the HAL Flat display driver can be found under:

Windows CE 5.0:

%_WINCEROOT%\Platform\DBAu1100\src\kernel\oal\lcd.c

Windows CE 6.0:

%_WINCEROOT%\Platform\Aspen7750R\src\oal\oallib\ddi.c

Build OAL without any warnings or errors.

3. Add the following section to %_WINCEROOT%\Platform\%_TGTPLAT%\Files\Platform.bib:

Windows CE 5.0:

; @CESYSGEN IF CE_MODULES_DISPLAY

IF BSP_NODISPLAY !

IF BSP_DISPLAY_HFLAT

ddi_hflat.dll $(_FLATRELEASEDIR)\ddi_hflat.dll NK SH

ENDIF BSP_DISPLAY_HFLAT

ENDIF BSP_NODISPLAY !

; @CESYSGEN ENDIF CE_MODULES_DISPLAY

Windows CE 6.0:

; @CESYSGEN IF CE_MODULES_DISPLAY

IF BSP_NODISPLAY !

IF BSP_DISPLAY_HFLAT

ddi_hflat.dll $(_FLATRELEASEDIR)\ddi_hflat.dll NK SHK

ENDIF BSP_DISPLAY_HFLAT

ENDIF BSP_NODISPLAY !

; @CESYSGEN ENDIF CE_MODULES_DISPLAY

4. Add the following section to %_WINCEROOT%\Platform\%_TGTPLAT%\Files\Platform.reg:

Windows CE 5.0 and Windows CE 6.0:

; @CESYSGEN IF CE_MODULES_DISPLAY

IF BSP_NODISPLAY !

IF BSP_DISPLAY_HFLAT

[HKEY_LOCAL_MACHINE\System\GDI\Drivers]

"Display"="ddi_hflat.dll" ; HAL FLAT driver uses hard coded configuration values

ENDIF BSP_DISPLAY_HFLAT

ENDIF BSP_NODISPLAY !

; @CESYSGEN ENDIF CE_MODULES_DISPLAY

5. Build the image with BSP_DISPLAY_HFLAT flag set and BSP_DISPLAY_NOP flag cleared.

转载于:https://www.cnblogs.com/harber/archive/2007/12/13/994175.html

HAL Flat Display Driver Demystified相关推荐

  1. Attempt to reset the display driver and recover from timeout failed

    前几天,我的华硕电脑K42J玩了一场战地1942之后正常关机,然后第二天之后开机,发现蓝屏,而且有点花屏,强制关机,再次开机,发现无法显示,硬盘灯,电源灯正常,连开机logo都没有显示,于是外接显示器 ...

  2. NVIDIA GPU Display Driver 越界写入漏洞(CVE-2022-28181)

    CVE-2022-28181 漏洞是 NVIDIA GPU Display Driver内核模式层中的漏洞,导致网络上的非特权普通用户可以通过crafted shader越界写入.该漏洞影响范围一般, ...

  3. Ubuntu 16.04 - GeForce RTX 2080 Ti 安装 GPU 显卡驱动 (Display Driver)

    Ubuntu 16.04 - GeForce RTX 2080 Ti 安装 GPU 显卡驱动 (Display Driver) NVIDIA 引领人工智能计算 - NVIDIA https://www ...

  4. Linux display driver 分析之 fb_find_mode函数

    写过或者了解linux display framebuffer 驱动的朋友应该都熟悉fb_find_mode这个函数, 我之前工作过程中接触过这个函数, 但了解不太深入,今天决定好好分析一下,做个比较 ...

  5. 【DRM】DRM Display Driver Guide

    https://zhuanlan.zhihu.com/p/534267979 ​ 目录 收起 1.显示子系统(DSS)概述 2.DRM概述 2.1基本概念 2.2显示通路 2.3 drm驱动和libd ...

  6. Ubuntu 16.04 install NVDIA display driver

    2019独角兽企业重金招聘Python工程师标准>>> 1. search and download the driver http://www.nvidia.cn/Download ...

  7. TM1637芯片驱动数码管 – play with TM1637 seven segment display driver

    因为一个项目要使用到数码管,所以今天研究了一下TM1637这款数码管驱动芯片,在这里做个记录,方便以后使用时参考. 最初以为芯片是I2C通信,想将几块不同的芯片挂在同一个I2C总线上,然后开始了研究. ...

  8. linux安装v100驱动,Nvidia Linux Display Driver v100.14.19

    NVIDIA最新发布的Linux驱动,发布日期为今日,同时支持x86和x64. 添加了对数款Quadro FX的支持,并提高了性能,修正了一些原有驱动在各种应用下的错误. Release Highli ...

  9. KernelIoControl和OEMIoControl的分析和使用(作者:wogoyixikexie@gliet)

    KernelIoControl和OEMIoControl的分析和使用(作者:wogoyixikexie@gliet) 对于KernelIoControl这个函数我们并不陌生,在2440 5.0BSP当 ...

最新文章

  1. angular 绑定自定义属性_Angular2实现自定义双向绑定属性
  2. dedeampz mysql启动不了_localhost打不开?dedeampz环境启动不了?本地php环境启动失败?...
  3. Gitlab+Gerrit+Ldap+nginx+mysql 之Gerrit搭建与配置(一)
  4. python中的装饰器-(重复阅读)
  5. 根据后序和中序求二叉树的层序
  6. 计算机网络中seq,计算机网络A卷及参考答案
  7. KaTeX|LaTeX数学公式编辑手册
  8. python飞机大战源码以及素材资源
  9. 为什么提倡面向接口编程
  10. excel两个表格数据对比_Excel跨表格数据对比
  11. Apple开发账号添加团队成员
  12. (CSA 共识评估调查问卷)CSA Consensus Assessments Initiative Questionnaire
  13. android app性能优化大汇总(UI渲染性能优化)
  14. 1、关于百兆口、千兆口、万兆口端口和网线的小常识
  15. D-HARRY2020春夏新品
  16. 【Java 面试合集】接口以及抽象类
  17. win10下的dos基本命令
  18. 知乎首页实战之背景与大体布局
  19. 智能运维和数字孪生赋能智慧城市管理服务平台
  20. 【半年总结】——2015.08

热门文章

  1. 将NetBIOS名称解析为IP地址的常用方法
  2. 655. Print Binary Tree 解题报告(树)
  3. Jtest 使用教程之代码标准违例修正与标准规则说明书访问
  4. AngularJS中的指令全面解析(必看)
  5. Mysqli的批量CRUD数据
  6. 分享阿里云SLB-负载均衡的实现基本原理架构
  7. 大家一起来《六顶思考帽》
  8. DBCP2配置详细说明(中文翻译)
  9. 浅谈C中的指针和数组(一)
  10. 在php.ini中safe_mode开启之后对于PHP系统函数有什么影响呢?