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

news/2024/11/1 10:20:29/

   最近在调试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的描述,描述如下:



有关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.   


http://www.ppmy.cn/news/232607.html

相关文章

i7处理器好吗_i7笔记本电脑比i3和i5笔记本电脑好吗

通常是,但是具体取决于要比较的i3,i5和i7。 让我举一个例子说明事情可能令人困惑: 现在,英特尔出售双核i7 8500Y,该双核i7 8500Y用于超薄笔记本电脑。他们还出售i3 8100H,它是四核处理器,比i7 8…

酷睿i7计算机采用哪种类型,电脑英特尔酷睿I7六核cpu有几种

现阶段,六核I7处理器共有15种,具体为: Intel 酷睿i7 5820K,主频为3.3GHz,最大睿频为3.6GHz。 Intel 酷睿i7 3960X至尊版,主频为3.3GHz,最大睿频为3.9GHz。 Intel 酷睿i7 3790X,主频为…

计算机游戏的最新技术,搭载十代酷睿i7处理器 这台ROG冰刃4新锐拥有媲美台式游戏电脑的性能...

如果要问我今年哪款游戏本值得推荐的话,我认为ROG的冰刃4新锐是一款非常值得关注的产品。可以看到,作为“败家之眼”家族的一员,冰刃4系列绝对有举足轻重的地位。它不仅将工艺升级理念进一步升级,还搭载了第十代英特尔酷睿i7-1087…

i7处理器好吗_聊聊即将发布的十代酷睿低压处理器(1)——Comet Lake篇

系列文章第二篇已经发布,欢迎大家阅读: cotton:聊聊已经发布的十代酷睿处理器(2)——Ice Lake篇​zhuanlan.zhihu.com 看到这个标题,我想一定会有知友提出疑问: 十代酷睿不是已经发布了吗&#…

骁龙845和骁龙780g哪个好

骁龙780G:采用了6nm的制作工艺 骁龙845:采用的是10nm的制作工艺 我用的手机就是活动时7.5折抢购的 点击开抢 http://shouji.adiannao.cn/7 骁龙780G:“116”的八核架构,1Cortex A76 2.6GHz 1Cortex A76 2.4GHz 6*Cortex A55 2.0G…

一文知晓高通晓龙845

直接贴链接和首段吧,因此CSDN博客还需要每个图片保存。由于时间问题,今天就偷懒直接用微信的文章了 本篇总叙述Qualcomm晓龙845的整体架构和一些笔者比较感兴趣的Kryo 385和Hexagon DSP(即845的AI技术分析) https://mp.weixin.q…

雷神911MT黑武士3评测

新出雷神911MT黑武士3与旧版的区别主要是在处理器上,新版采用的11代酷睿处理器。11代酷睿i7 11800H,主频2.4GHz,睿频4.6GHz,八核心/十六线程,三级缓存24MB。11代酷睿i5 11260H,主频2.6GHz,睿频4…

哪款蓝牙耳机玩吃鸡延迟低?四款低延迟游戏蓝牙耳机推荐

近几年,枪战游戏受到了不少人的喜爱,但人们在玩游戏时总会有不方便外放的时候。在玩吃鸡游戏不方便外放时,如果戴有线耳机,会有约束感;戴蓝牙耳机,担心会有延迟。玩这种快节奏的游戏,最怕有延迟…