当前位置: 代码迷 >> 综合 >> Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述
  详细解决方案

Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

热度:68   发布时间:2023-09-11 13:25:19.0

   最近在调试Inter平台core i7,基于X86架构的工控产品,在移植驱动的过程中,发现GPIO和I2C的device ID添加到pnp驱动框架后无法进入probe函数,后面找了下原因,因为pnp遵循的是ACPI规范,是由于如下Hardware ID字段是需要从BIOS中进行描述的,而目前的驱动匹配不到对应的字段,自然就不可能注册成功了。

   PNP是什么东西?不是三极管的那个PNP啦,这个PNP表示的是:Plug-and-Play,译文为即插即用。

   PnP的作用是自动配置底层计算机中的板卡和其他设备,然后告诉对应设备都做了什么。PnP的任务是把物理设备和软件设备驱动程序相配合,并操作设备,在每个设备和它的驱动程序之间建立通信信道。然后,PnP分配下列资源给设备和硬件:I/O地址、IRQ、DMA通道和内存段。即插即用设备配置的控制权将从系统BIOS传递到系统
软件,所以驱动中一定会有代码进行描述,到时可以跟一下这部分的代码深入了解一下。
由于PNP遵循ACPI的规范,那么既然是规范,那肯定要照着做了,规范怎么说,那就怎么做。

以下是关于ACPI Spec中对Hardware ID的描述,描述如下:

Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

有关ASL语言可以参考ACPI SPEC手册的ACPI Source Language (ASL)Reference章节。

如上,关于Hardware ID手册中的意思大致如下:

      该对象用于向OSPM提供设备的PNP ID或ACPI ID。 在描述平台时,任何_HID对象的使用都是可选的。但是,_HID对象必须是用于描述将由OSPM枚举的任何设备。 当总线枚举器不能检测到设备ID时,OSPM只枚举一个设备。当总线枚举器不能检测到设备ID时。例如,ISA总线上的设备是由OSPM列举。除了OSPM使用_ADR对象来描述总线枚举器枚举的设备。

    其中OPSM是:OSPM(OS-directed Power Management) :OSPM 操作系统支持 ACPI 的一个部分,操作系统 (OS)可以从操作系统下驱动程序的角度控制 ACPI 子模块,同时支持 ACPI 包括 SCI 中断,设备事件,系统事件模式,这些事件模式可以充分支持 Hot-plug 方式。

    所以解决驱动匹配不上的问题,只要在BIOS中的ASL工程中对应Hardware描述的部分添加一个字段描述,确保驱动中的字段和BIOS中的字段一致,这样就可以匹配成功了。

OSPM 

操作系统支持

 ACPI 

的一个部分,操作系统

 

OS

)可以从操作系统下驱动程

序的角度控制

 

ACPI 

子模块,

同时支持

 

ACPI 

包括

 SCI 

中断,

设备事件,

系统事件模式,

这些事件模式可以充分支持

 

Hot-pl

ug 

方式。

以下是ACPI中关于PNP ID和ACPI ID的规范信息:

网址:http://www.uefi.org/PNP_ACPI_Registry

PNP ID AND ACPI ID REGISTRY

This is an industry registry of PNP ID and ACPI ID used in the _HID (Hardware ID), _CID (Compatibility ID) or _SUB (Subsystem ID) objects as described in the ACPI Specification for devices that do not have standard enumeration mechanism.  All these devices must contain a _HID (and possibly _CID and _SUB as well) in order to allow the operating system to uniquely recognize the device so that it can load the appropriate driver software. Each device manufacturer is responsible for assigning the PNP ID or ACPI ID for each of these products.

Both PNP ID and ACPI ID consist of two parts: a Vendor ID, followed by a product identifier. Each manufacturer of these devices must be assigned an industry-unique Vendor ID. Your company may already have a Vendor ID from previous work, such as EISA boards or other Plug and Play devices (PNPISA cards, PNP serial devices, PNP monitors, and so on). If you do not have a vendor ID, or do not know if you have one, the UEFI Forum can assign one for you as described on this page, or can verify an existing ID.

The format of Vendor IDs varies depending on the form of ID you choose:

  • PNP ID: PNP Vendor IDs consist of 3 characters, each character being an uppercase letter (A-Z).
  • ACPI ID: ACPI Vendor IDs consist of 4 characters, each character being either an uppercase letter (A-Z) or a numeral (0-9).


It is important to note that the use of PNP ID and ACPI ID are completely interchangeable for use with ACPI. The decision is strictly related to the availability of the characters you want. The PNP ID is legacy, intended for the Plug and Play Specifications that could not support 4 characters, but is still supported in ACPI. ACPI ID enables a much bigger namespace for the ecosystem.

Vendor IDs are subject to uniqueness requirements and some ID requests may not be available. For instance, Microsoft has reserved the PNP ID’s Vendor ID "PNP" to identify various devices that do not have an existing EISA ID, as well as defining compatibility devices. These IDs are defined in the file. The ACPI Specification reserves the ACPI ID’s Vendor ID “ACPI” for use only with devices defined in that specification. Additionally, Vendor IDs consisting only of valid hexadecimal characters (0-9 and A-F) are reserved for assignment by the PCI SIG (these Vendor IDs must be registered with the PCI SIG but can still be used in ACPI). Finally, it may simply be that the character string you request has previously been assigned to another company.

Product Identifiers are always four-character hexadecimal numbers (0-9 and A-F). The Device Manufacturer is responsible for assigning this identifier to each individual product MODEL. Once an identifier is assigned to a product model, it must not be assigned to any other product model manufactured by the same company (that is, that uses the same Vendor ID).

The registry aims to ensure fair, orderly, consistent and conflict free naming of the Vendor IDs.  Originally implemented by Microsoft, this registry is used to help companies avoid unnecessary collisions in implementation.

TO REGISTER A NEW UNIQUE VENDOR ID FOR THE PNP ID OR ACPI ID

Send a request to the ACPI Specification Workgroup Chairperson specifying whether the Vendor ID is for PNP ID or ACPI ID. All requests are subject to Work Group approval based on the objectives noted above.

The list of currently approved Vendor IDs for PNP ID and ACPI ID.  Please note, due to the size of the PNP ID List, your internet browser may take a minute to for the page to load.   

相关文章

Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

Linux 下 GPIO驱动模型

转载地址:http://blog.chinaunix.net/uid-27717694-id-3624294.html一、概述GPIO是嵌入式系统最简单、最常用的资源了,比如点亮LED,控制蜂鸣器,输出高低电平,检测按键,等等。GPIO分输入和输出,在…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

Linux下用文件IO的方式操作GPIO(/sys/class/gpio)

转载地址:http://blog.csdn.net/lu_embedded/article/details/53061901 一、概述通过 sysfs 方式控制 GPIO,先访问 /sys/class/gpio 目录,向 export 文件写入 GPIO 编号,使得该 GPIO 的操作接口从内核空间暴露到用户空间,GPIO 的操…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

Linux下BSP学习

转载地址:https://www.cnblogs.com/yanghong-hnu/p/5747769.html1. BSP概述BSP即Board Support Package,板级支持包。它来源于嵌入式操作系统与硬件无关的设计思想,操作系统被设计为运行在虚拟的硬件平台上。对于具体的硬件平台,与…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

WIFI环境搭建与测试

文章转载自:http://blog.csdn.net/linweig/article/details/5194761 1.WIFI介绍 Wi-Fi(WirelessFidelity),即无线保真,与蓝牙技术一样,同属于在办公室和家庭中使用的短距离无线技术。 该技术使用的使2.4GHz…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

蓝牙配置相关的文章

How to setup Bluetooth:http://www.thinkwiki.org/wiki/How_to_setup_Bluetooth 转载:http://blog.csdn.net/Archer1991/article/details/62233164?locationNum16&fps1BlueZ5 1. Bluez介绍 BlueZ 是官方 Linux Bluetooth 栈,由主机控制接口&#x…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

C语言宏定义的妙用之法

最近看了intel在linux内核中的驱动,学习到了一个非常有用的小技巧,如下代码:#define IN #define OUT #define UAdress volatile unsigned int * #define Raw_buffer void *void SetHwiPortsDataReg(IN UAdress Register , IN int value) {_Se…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

Linux x86架构下ACPI PNP Hardware ID的识别机制

参考博客: http://blog.csdn.net/jiangwei0512 参考文章: http://blog.csdn.net/morixinguan/article/details/79138325 http://blog.chinaunix.net/uid-27717694-id-3624294.html http://blog.csdn.net/wh_19910525/article/details/16370863 https://w…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

iMX6 yocto平台QT交叉编译环境搭建

1、安装ubuntu上必备的库文件:如果无法安装请依次执行以下两个命令: apt-get upgrade apt-get update 再安装以上的库文件。 2、搭建JDK开发环境 下载jdk1.6.0_45,然后安装jdk相关的库文件以及设置环境变量3、安装yocto交叉编译工具以及QT开发…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

wifi tool工具的使用(iw与wpa_supplicant)(持续更新中)

wifi 驱动还有app tool移植可参考如下链接,写得非常好,韦东山老师写的东西就是牛逼。 http://www.100ask.org/bbs/forum.php?modviewthread&tid14626&extrapage%3D1 WIFI tool主要有:wpa_supplicant(依赖于libnl、openssl库) 、host…
阅读更多...
Inter core i7处理器中(x86架构)驱动开发:关于APCI Hardware ID的描述

QT5使用问题:Cannot read /xxxxx/oe-device-extra.pri: No such file or directory

编译APP的时候出现:oe-device-extra.pri: No such file or directory 但又可以编译出app且可以在平台上运行,没什么影响,但我还是看不惯,一定要把它解决掉: 参考解决方案: https://github.com/meta-qt5/meta-qt5/commi…
阅读更多...
最新文章
  相关解决方案