小華的部落格: 2011

搜尋此網誌

網頁

星期三, 10月 19, 2011

UEFI #pragma intrinsic( function1 [, function2, ...] )

在UEFI C語言中使用 #pragma intrinsic( function1 [, function2, ...] )方式可以簡化你拉Library的動作,但是這個功能是與Compiler相關,因此當你不使用Microsoft Compiler時,可能就要注意原本的UEFI CODE中使用這些方法的地方可能會有問題!
使用方式是在任何xxx.c 中宣告函數原型跟 #pragma intrinsic(),之後就可以在你的CODE中使用他!
//宣告函數原型int            _inp (unsigned short port);
int            _outp (unsigned short port, int databyte );


#pragma intrinsic(_inp)
#pragma intrinsic(_outp)


VOID CMOSWrite(UINT8 Port,UINT8 databyte)
{
_outp(0×70, Port);
_outp(0×71, databyte);
}



參考網站 : 
http://msdn.microsoft.com/zh-tw/library/tzkfha43.aspx

星期二, 9月 06, 2011

UEFI Screenshot (Capture screen)

EFI Shell 底下螢幕抓圖(抓屏)方式:

1) 切換到Graphic mode
    ConsoleControl->SetMode(ConsoleControl, EfiConsoleControlScreenGraphics);

2)使用Gop->Blt將螢幕圖抓下來

  GraphicsOutput->Blt(GraphicsOutput,
                      Image.PixelData,
                      EfiBltVideoToBltBuffer,  <--此參數決定你要抓圖還是顯示圖
                      0,
                      0,
                      0,
                      0,
                      Image.Width,
                      Image.Height,
                      0);


3)切換回Text Mode

[Note] 單純在Text Mode呼叫GOP->Blt會抓不到東西.

星期五, 7月 15, 2011

鏈結Library/(XXX.LIB)到你的VC專案

一般我們在寫C語言程式的時候可能會使用到外部的函式庫(Library),那要如何Link Lib到你的專案中呢?!

其實,鏈結你自己的Common.lib到你的C專案中的方式有三種,但是第一步動作可能要先把
Common.lib複製到XXX.vcproj放同一個目錄中:


方式1: 直接在你的專案中的Source files那邊按右鍵選Add Exist file(選*.*),把Common.lib拉進來
方式2: 屬性->Linker->Commandline ->鍵入你的 Common.lib
方式3: 在你的.c/.cpp檔案中直接加入 #pragma comment(lib, "Common")  

星期二, 7月 12, 2011

C語言巨集定義技巧-#define

轉載自: http://stenlyho.blogspot.com/2007/04/c_04.html

文章中有詳細介紹#define的使用方式,還有範例可以查看。

此作者轉載的連結已經失效,所以我只能再轉載第二手資料:
原轉載:http://miaozl.spaces.live.com/?_c11_blogpart_blogpart=blogview&_c=blogpart&_c02_owner=1&partqs=amonth%3d2%26ayear%3d2007

而這篇文章中說的"宏"是指大陸用語,應該就是我們說的Macro(巨集)
所以在看這篇文章的時候,還是要先了解一下兩岸用詞的不同啦!

NMAKE(2)

NMAKE語法教學
今天要學的是INC語法:
Include dirs passed to all compilers
INC = -I Path

星期二, 7月 05, 2011

USB Class

底下這個網站記錄著一些跟USB有關的Class資訊,可以方便你查詢:

像是一般我們常會去使用Descriptor 去判斷這個DEVICE的類別是甚麼:



  Status = UsbIoPpi->UsbGetInterfaceDescriptor (
                 ...
                 &InterfaceDesc);
...

  if ((InterfaceDesc->InterfaceClass != 0x08) ...) {
    return EFI_NOT_FOUND;
  }


參考網站:

http://www.xat.nl/en/riscos/sw/usb/class.htm

星期四, 6月 30, 2011

EFI需要注意的一些C語言小細節

底下是節錄一些我們Team自己內部分享的一些心得,讓大家知道其實C語言有許許多多的小地方是需要大家注意的!

1.指標最大的問題是Compiler不會做邊界檢查

    ex: a[10];
          p=&a[0];
          *(p+13];  <--這種操作Compiler並不會跟你說有問題


2. Free(p) ;同一個指標只能free 一次,當free(p) 兩次就會出事情
 ...


3.memcopy(dst,src,size)時記得size不能比目的大
 ex:
      src[100],dsc[50];
      memcopy(dsc,src,sizeof(src));  <--溢位
      memcopy(dsc,src,sizeof(dsc));  <--沒事

...


UEFI 開發過程中最大的問題~

大家都知道UEFI已經變成這個世代中的BIOS代名詞,但是這個環境下在開發BIOS的時候最怕遇到甚麼事情呢?

答案就是: C語言指標的邊界檢查

指標這個東西在C的環境中讓人又愛又怕。愛的地方是因為指標可以任意的轉型態、任意的操作你想存取的記憶體區塊,但是往往致命的吸引力中就會有他無可避免的壞處!

例如,你可以宣告一個陣列 a[10]; 然後拿一個指標 p指向這個陣列
但是當你的code寫成 *(p+13) 時,就會是個大麻煩!

因為Compiler 並不會告訴你說,嘿! 兄弟你的指標超出存取範圍了! 然後當CODE執行到那邊的時候就出現當機或是難以解釋的事件發生! 往往悲劇就是出現在不注意的小地方~

所以BIOS工程師在撰寫CODE的時候就必須對於指標操作很清楚,不然在UEFI BIOS環境下一定會出現許許多多靈異事件的~ (以前Legacy BIOS最被忽略的是堆疊PUSH/POP沒對齊,現在變成指標 >.<)

不過可喜可賀的是我們家的BIOS工程師對於這一點都很講究啦~

Bluescreen 錯誤碼查詢

底下這個網站的資訊可以幫助你在發生BSOD的時候可以依照Error code來查詢微軟有沒有相關的說明,或是更新檔!

所以大家可以很方便的透過底下這個網站的資訊來解決問題,可以幫助你減少一些搜尋資料的時間:

http://www.bruchmann-web.de/zh-cn/support/windows/bluescreen/0x0000007b/kb-page/2/kb-sort/ms-description--asc/

星期一, 6月 20, 2011

SmmOEMInt15SmiDispatcher

今天在Debug USB問題的時候,設定了斷點在SmmOEMInt15SmiDispatcher中,結果發現進入DOS時這個SWSMI會被一直呼叫。

他的原因是因為CSM 在Hook INT15h的時候,並沒有先在Assembly內判斷任何的Signature,沒有利用任何的Signature來判斷要不要產生SWSMI,因此就變成了只要有人呼叫INT15h 就會產生SWSMI而跳到SmmOEMInt15SmiDispatcher內,然後再EFI 那邊再判斷要不要執行Sub function,如果沒有就退出SWSMI。

為了怕自己忘記有這個BUG所以在BLOG先記錄一下。

目前進入DOS時,有看到呼叫INT15h的人是CONFIG.SYS,而且每按一次Key,就會呼叫3次(SWSMI斷點可以攔到3次?) 這也是件奇怪的事情。

開機過程中攔截到的INT15h 時的AX值如下(依順序):
AX=5355
AX=4101
AX=0000
AX=133A
AX=0326 (此時已經出現Win98 Logo)
AX=3E00 <--我們自己的USB test Utility

進入DOS後,每按下一個Key都會產生下面這個INT15h,看起來跟Config.sys有關,不過尚未查證:  AX=5355h , INT15h  <--Config.sys

星期日, 6月 19, 2011

Win7右鍵新增記事本消失

Win7莫名其妙右鍵新增記事本消失了,所以自己找解決方式。

解決的方式就是自己寫一個XXX.Reg的檔案,內容如下,然後在給他點兩下執行後,消失的新增記事本就又回來啦~

不過微軟作業系統老是出現一些莫名其妙的事情,要怎麼在市場跟人家競爭啦>.<




Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.txt]
@="txtfile"
"Content Type"="text/plain"

[HKEY_CLASSES_ROOT\.txt\ShellNew]
"NullFile"=""

[HKEY_CLASSES_ROOT\txtfile]
@="Notepad"

[HKEY_CLASSES_ROOT\txtfile\shell]
[HKEY_CLASSES_ROOT\txtfile\shell\open]
[HKEY_CLASSES_ROOT\txtfile\shell\open\Command]
@="NOTEPAD.EXE %1"

星期四, 6月 16, 2011

關閉螢幕保護程式計時~

因為有些公司的網管有管制一些本機電腦的Policy...像是每隔一段時間到了,沒人使用電腦就要自動進入螢幕保護程式,以免你電腦資料被竊取。

但是,因為有時候會把工作機拿來打ONLINE GAME,尤其是掛網的時候突然給你斷線就真的OOXX了,因此想要手動關閉螢幕保護程式跟他的登入密碼,但卻發現直接修改Windows所提供的選項是無效的 ><
 
原來,有些網管可以透過你的電腦登入公司網域的時候,再偷偷幫你把一些設定調整回來,像是有些會透過WinExit.scr這個方式來強制系統每隔一段時間就跳出保護程式,看樣子我們家網管應該也是用這個方式不過鍵值被我刪除了^^Y

他調整的地方的鍵值是在:



所以只要輸入開始-->執行-->輸入regedit

把ScreenSaveActive那些值改成0就可以強制關閉螢幕保護程式每15分鐘跳出來的問題~

原來的值是:
ScreenSaveActive 1     (啟動螢幕保護程式)
ScreenSaverIsSecure 1  (螢幕保護程式結束後要詢問密碼)
ScreenSaveTimeOut 900 (15分鐘)
 
另外還有一個預設的scrnSave.scr的鍵值也被我刪除了,不過我想應該是跟這個沒有關係...

DIY-DEBUG.EXE

一直都覺得Debugger.exe 很好玩,不過都沒時間自己手動寫一個。
剛好趁最近有閒暇時間,就寫了一個搞笑版的Debug.exe 來測試它的原理。

我把我的主程式分成上圖中左半邊的那幾個區塊,一開始的時候先去把INT1/3中斷向量串走,讓他能夠被我控制,接著就去觸發一個INT 3h,我在自己的NewInt3hHandler內去把TF Flag設定起來,那麼離開INT 3h的時候,CPU自己每執行一行指令就會觸發一次INT 1h。

接著,我在自己的NewInt1hHanlder內去處理我的Command,從可以讓我控制我要的動作,而整個執行的畫面就會像是上圖中的右半邊一樣。

不過,寫到這邊時才發現原來反組譯才是最難的啦~

看起來接下來的功課就是去研究反組譯要怎麼做了 >.<

星期三, 6月 15, 2011

C語言Printf 自動補0

在一般的C語言中顯示HEX時總是會希望能夠補0,像是HEX: 0x10 顯示的時候就希望是0010
那要如何做呢?

其實很簡單,你只要控制printf 內的顯示控制就可以了。

例如:  
 printf ("%4X",MyHex);     <--4個字元,但不會補0
 printf ("%04X",MyHex);   <--會補0

從下圖中的黑色部分中可以看到AX的值會有兩種結果~

星期二, 6月 14, 2011

Win7 認不到USB HDD,出現"磁碟簽章發生衝突"

最近遇到Win7接了一個外接USB HDD結果卻看不到,但是在DeviceManager內可以看到。


查了一下這個錯誤訊息,發現出現"磁碟簽章發生衝突"所以離線,因此Google大神後找到了一個網站也遇過相同的問題,使用這邊的 "diskpart" 解決方式後就可以看到我的USB HDD了。


http://beddingmall.blogspot.com/2011/01/blog-post_04.html

Uninstall TrendMicro PC-cillin 方式

因為某些需求,所以希望把公司的掃毒程式移除,然後裝上自己喜歡的掃毒程式。

可是我並沒有反安裝的密碼,因此當我要反安裝的時候他會出現輸入密碼的對話框@@

但是沒關係,使用下面的方式可以達到我的需求:

1.執行一個批次檔先把掃毒程式停止,這樣子才能改註冊檔的機碼
先使用文字編輯器產生一個批次檔,我的Stop.bat內容如下:

net stop "OfficeScanNT RealTime Scan"
net stop "OfficeScan NT Listener"
taskkill /F /IM TmListen.exe
taskkill /F /IM PccNTMon.exe
taskkill /F /IM OfcPfwSvc.exe
taskkill /F /IM NTRtScan.exe

2.使用管理者權限執行stop.bat

3.開啟->執行 ,鍵入Regedit ,然後修改機碼Allow Uninstall = 1:
位置在: HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.\Allow Uninstall

4.. 開始->所有程式->TrendMicro ->uninstall trend micro officescan ...

Enjoy...

EFI教學(1)-Flashmap.fdf

在傳統的BIOS 中我們都會使用一些Build tool把一些需要的檔案(OPROM/VBIOS...etc)、BIOS程式碼依照一些"描述檔的設定"把它依序擺放在一個BIOS Image file中,而在EFI BIOS中又是如何操作這部分的動作呢?

在EFI環境中已經有現成的Build tool會去做這件事情,他會去參考一個描述檔內的設定來幫你打包好整個BIOS Image file,然後我們就可以把這個BIOS Image file燒進去SPI ROM裡面。

而這個描述的檔案就叫做Flashmap.fdf ,這個檔案可以分成上下兩部分(下圖左邊所示)

上半部為FlashDevice ,簡稱FD,他是用來先區分好整個BIOS Image file的區塊為何? 他就類似像說你先決定好整個抽屜的大小,然後幫這個抽屜放隔板,隔出一塊塊小區塊。

下半部為FlashDeviceImage,也就是當你把抽屜放隔板,隔出一塊塊小區塊後,你要放那些東西進去這些小區塊,這些東西你就要描述在這邊。

所以從範例圖中可以看到上半部先隔出一個區塊叫做NVSTORE,而這個區塊還可以再細分成更多小區塊,例如圖中的SLPKEY,接著在FlashDeviceImage中告訴Build tool說你幫我把Slpkey.bin放到NVSTORE->SLPKEY的這個小區塊中。

而一般我們的EC BIOS也是透過這種方式包進去BIOS Image file內的。

但是你可能會問說那VBIOS跟OPROM也是嗎? 這兩個東西目前是包在DXE code裡面(我們稱FV,firmware volume,有很多的FV,DXE code只是其中之一),所以VBIOSOPROM並非像上面的方式來打包,而是先經過軟體壓縮後放進去FV裡面(可以省Code size),然後再把檔名為XXX.FV依照上面的方式描述在FlashDeviceImage {...} 內,然後Build tool就會把他們打包進去BIOS Image file。

因此,在BIOS開機過程中會把DXE code解壓縮,然後再從裡面把VBIOS/OPROM撈出來。

希望以上的解說對於剛入門EFI的人有幫助啦~

星期二, 2月 22, 2011

BlueScreen

發現BlueScreen後,在求救前微軟希望你做的事情:


1. 按 "開始",在 "電腦" 按滑鼠右鍵,選擇 "內容"
2. 選擇 "進階系統設定"
3. 切換到 "進階" 索引標籤,在 "啟動及修復"的分類中,選擇 "設定"
4. 系統失敗分類打勾全選,當有錯誤時會產生Log在底下的路徑檔案中
%SystemRoot%\MEMORY.DMP

這邊有個工具 AppCrashView 讓你可以去分析Log

微軟網站也有一些說明:

另外一個工具 BlueScreenView

星期日, 1月 09, 2011

Microsoft PNPID

今天有同事來問我PNPID,我一直以為我有把這些資料放到部落格了,但是後來才在我的筆記本資料匣內找到,為了大家方便所以就順便放到部落格,給一些需要查資料的人使用。

我另一個同事的部落格也有相關資料,大家也可以去參考一下他的部落格:


WINDOWS GENERIC DEVICE IDs

----------------------------------------------------------------------
Many devices have no standard EISA ID, such as the interrupt controller
or keyboard controller. Also, a set of compatible devices, such as VGA
and Super VGA, are not actually devices, but define a compatibility
hardware subset. Yet another set of IDs needs to be used to identify
buses.

Microsoft has reserved an EISA prefix of "PNP" to identify various
devices that do not have an existing EISA ID, as well as defining
compatibility devices. The IDs are defined in the following tables.

DEVICE ID RANGES

ID range Category
-------- -------------
PNP0xxx System devices
PNP8xxx Network adapters
PNPAxxx SCSI, proprietary CD adapters
PNPBxxx Sound, video capture, multimedia
PNPCxxx - Dxxx Modems

The following device ID is provided only for compatibility
with earlier device ID lists:

Device ID Description
-------- -------------
PNP0802 Microsoft Sound System-compatible device
(obsolete; use PNPB0xx instead)

---------------------------------------------------------------------------
Device ID Description
-------- -------------
***** System Devices - PNP0xxx **************************
--Interrupt Controllers--
PNP0000 AT Interrupt Controller
PNP0001 EISA Interrupt Controller
PNP0002 MCA Interrupt Controller
PNP0003 APIC
PNP0004 Cyrix SLiC MP interrupt controller

--Timers--
PNP0100 AT Timer
PNP0101 EISA Timer
PNP0102 MCA Timer

--DMA--
PNP0200 AT DMA Controller
PNP0201 EISA DMA Controller
PNP0202 MCA DMA Controller

--Keyboards--
PNP0300 IBM PC/XT keyboard controller (83-key)
PNP0301 IBM PC/AT keyboard controller (86-key)
PNP0302 IBM PC/XT keyboard controller (84-key)
PNP0303 IBM Enhanced (101/102-key, PS/2 mouse support)
PNP0304 Olivetti Keyboard (83-key)
PNP0305 Olivetti Keyboard (102-key)
PNP0306 Olivetti Keyboard (86-key)
PNP0307 Microsoft Windows(R) Keyboard
PNP0308 General Input Device Emulation Interface (GIDEI) legacy
PNP0309 Olivetti Keyboard (A101/102 key)
PNP030A AT&T 302 keyboard
PNP030B Reserved by Microsoft
PNP0320 Japanese 106-key keyboard A01
PNP0321 Japanese 101-key keyboard
PNP0322 Japanese AX keyboard
PNP0323 Japanese 106-key keyboard 002/003
PNP0324 Japanese 106-key keyboard 001
PNP0325 Japanese Toshiba Desktop keyboard
PNP0326 Japanese Toshiba Laptop keyboard
PNP0327 Japanese Toshiba Notebook keyboard
PNP0340 Korean 84-key keyboard
PNP0341 Korean 86-key keyboard
PNP0342 Korean Enhanced keyboard
PNP0343 Korean Enhanced keyboard 101b
PNP0343 Korean Enhanced keyboard 101c
PNP0344 Korean Enhanced keyboard 103

--Parallel Devices--
PNP0400 Standard LPT printer port
PNP0401 ECP printer port

--Serial Devices--
PNP0500 Standard PC COM port
PNP0501 16550A-compatible COM port
PNP0510 Generic IRDA-compatible device

--Disk Controllers--
PNP0600 Generic ESDI/IDE/ATA compatible hard disk controller
PNP0601 Plus Hardcard II
PNP0602 Plus Hardcard IIXL/EZ
PNP0603 Generic IDE supporting Microsoft Device Bay Specification
PNP0700 PC standard floppy disk controller
PNP0701 Standard floppy controller supporting MS Device Bay Spec

--Compatibility with early device ID list--
PNP0802 Microsoft Sound System compatible device (obsolete, use
PNPB0xx instead)
--Display Adapters--
PNP0900 VGA Compatible
PNP0901 Video Seven VRAM/VRAM II/1024i
PNP0902 8514/A Compatible
PNP0903 Trident VGA
PNP0904 Cirrus Logic Laptop VGA
PNP0905 Cirrus Logic VGA
PNP0906 Tseng ET4000
PNP0907 Western Digital VGA
PNP0908 Western Digital Laptop VGA
PNP0909 S3 Inc. 911/924
PNP090A ATI Ultra Pro/Plus (Mach 32)
PNP090B ATI Ultra (Mach 8)
PNP090C XGA Compatible
PNP090D ATI VGA Wonder
PNP090E Weitek P9000 Graphics Adapter
PNP090F Oak Technology VGA
PNP0910 Compaq QVision
PNP0911 XGA/2
PNP0912 Tseng Labs W32/W32i/W32p
PNP0913 S3 Inc. 801/928/964
PNP0914 Cirrus Logic 5429/5434 (memory mapped)
PNP0915 Compaq Advanced VGA (AVGA)
PNP0916 ATI Ultra Pro Turbo (Mach64)
PNP0917 Reserved by Microsoft
PNP0918 Matrox MGA
PNP0919 Compaq QVision 2000
PNP091A Tseng W128
PNP0930 Chips & Technologies Super VGA
PNP0931 Chips & Technologies Accelerator
PNP0940 NCR 77c22e Super VGA
PNP0941 NCR 77c32blt
PNP09FF Plug and Play Monitors (VESA DDC)

--Peripheral Buses--
PNP0A00 ISA Bus
PNP0A01 EISA Bus
PNP0A02 MCA Bus
PNP0A03 PCI Bus
PNP0A04 VESA/VL Bus
PNP0A05 Generic ACPI Bus
PNP0A06 Generic ACPI Extended-IO Bus (EIO bus)


-- Real Time Clock, BIOS, System board devices--
PNP0800 AT-style speaker sound
PNP0B00 AT Real-Time Clock
PNP0C00 Plug and Play BIOS (only created by the root enumerator)
PNP0C01 System Board
PNP0C02 General ID for reserving resources required by Plug and Play
motherboard registers. (Not specific to a particular device.)
PNP0C03 Plug and Play BIOS Event Notification Interrupt
PNP0C04 Math Coprocessor
PNP0C05 APM BIOS (Version independent)
PNP0C06 Reserved for identification of early Plug and Play
BIOS implementation.
PNP0C07 Reserved for identification of early Plug and Play
BIOS implementation.
PNP0C08 ACPI system board hardware
PNP0C09 ACPI Embedded Controller
PNP0C0A ACPI Control Method Battery
PNP0C0B ACPI Fan
PNP0C0C ACPI power button device
PNP0C0D ACPI lid device
PNP0C0E ACPI sleep button device
PNP0C0F PCI interrupt link device
PNP0C10 ACPI system indicator device
PNP0C11 ACPI thermal zone
PNP0C12 Device Bay Controller

--PCMCIA Controller Chipsets--
PNP0E00 Intel 82365-Compatible PCMCIA Controller
PNP0E01 Cirrus Logic CL-PD6720 PCMCIA Controller
PNP0E02 VLSI VL82C146 PCMCIA Controller
PNP0E03 Intel 82365-compatible CardBus controller

--Mice--
PNP0F00 Microsoft Bus Mouse
PNP0F01 Microsoft Serial Mouse
PNP0F02 Microsoft InPort Mouse
PNP0F03 Microsoft PS/2-style Mouse
PNP0F04 Mouse Systems Mouse
PNP0F05 Mouse Systems 3-Button Mouse (COM2)
PNP0F06 Genius Mouse (COM1)
PNP0F07 Genius Mouse (COM2)
PNP0F08 Logitech Serial Mouse
PNP0F09 Microsoft BallPoint Serial Mouse
PNP0F0A Microsoft Plug and Play Mouse
PNP0F0B Microsoft Plug and Play BallPoint Mouse
PNP0F0C Microsoft-compatible Serial Mouse
PNP0F0D Microsoft-compatible InPort-compatible Mouse
PNP0F0E Microsoft-compatible PS/2-style Mouse
PNP0F0F Microsoft-compatible Serial BallPoint-compatible Mouse
PNP0F10 Texas Instruments QuickPort Mouse
PNP0F11 Microsoft-compatible Bus Mouse
PNP0F12 Logitech PS/2-style Mouse
PNP0F13 PS/2 Port for PS/2-style Mice
PNP0F14 Microsoft Kids Mouse
PNP0F15 Logitech bus mouse
PNP0F16 Logitech SWIFT device
PNP0F17 Logitech-compatible serial mouse
PNP0F18 Logitech-compatible bus mouse
PNP0F19 Logitech-compatible PS/2-style Mouse
PNP0F1A Logitech-compatible SWIFT Device
PNP0F1B HP Omnibook Mouse
PNP0F1C Compaq LTE Trackball PS/2-style Mouse
PNP0F1D Compaq LTE Trackball Serial Mouse
PNP0F1E Microsoft Kids Trackball Mouse
PNP0F1F Reserved by Microsoft Input Device Group
PNP0F20 Reserved by Microsoft Input Device Group
PNP0F21 Reserved by Microsoft Input Device Group
PNP0F22 Reserved by Microsoft Input Device Group
PNP0F23 Reserved by Microsoft Input Device Group
PNP0FFF Reserved by Microsoft Systems

***** Network Adapters - PNP8xxx ***********************
PNP8001 Novell/Anthem NE3200
PNP8004 Compaq NE3200
PNP8006 Intel EtherExpress/32
PNP8008 HP EtherTwist EISA LAN Adapter/32 (HP27248A)
PNP8065 Ungermann-Bass NIUps or NIUps/EOTP
PNP8072 DEC (DE211) EtherWorks MC/TP
PNP8073 DEC (DE212) EtherWorks MC/TP_BNC
PNP8078 DCA 10 Mb MCA
PNP8074 HP MC LAN Adapter/16 TP (PC27246)
PNP80c9 IBM Token Ring
PNP80ca IBM Token Ring II
PNP80cb IBM Token Ring II/Short
PNP80cc IBM Token Ring 4/16Mbs
PNP80d3 Novell/Anthem NE1000
PNP80d4 Novell/Anthem NE2000
PNP80d5 NE1000 Compatible
PNP80d6 NE2000 Compatible
PNP80d7 Novell/Anthem NE1500T
PNP80d8 Novell/Anthem NE2100
PNP80dd SMC ARCNETPC
PNP80de SMC ARCNET PC100, PC200
PNP80df SMC ARCNET PC110, PC210, PC250
PNP80e0 SMC ARCNET PC130/E
PNP80e1 SMC ARCNET PC120, PC220, PC260
PNP80e2 SMC ARCNET PC270/E
PNP80e5 SMC ARCNET PC600W, PC650W
PNP80e7 DEC DEPCA
PNP80e8 DEC (DE100) EtherWorks LC
PNP80e9 DEC (DE200) EtherWorks Turbo
PNP80ea DEC (DE101) EtherWorks LC/TP
PNP80eb DEC (DE201) EtherWorks Turbo/TP
PNP80ec DEC (DE202) EtherWorks Turbo/TP_BNC
PNP80ed DEC (DE102) EtherWorks LC/TP_BNC
PNP80ee DEC EE101 (Built-In)
PNP80ef DECpc 433 WS (Built-In)
PNP80f1 3Com EtherLink Plus
PNP80f3 3Com EtherLink II or IITP (8 or 16-bit)
PNP80f4 3Com TokenLink
PNP80f6 3Com EtherLink 16
PNP80f7 3Com EtherLink III
PNP80f8 3Com Generic Etherlink Plug and Play Device
PNP80fb Thomas Conrad TC6045
PNP80fc Thomas Conrad TC6042
PNP80fd Thomas Conrad TC6142
PNP80fe Thomas Conrad TC6145
PNP80ff Thomas Conrad TC6242
PNP8100 Thomas Conrad TC6245
PNP8105 DCA 10 MB
PNP8106 DCA 10 MB Fiber Optic
PNP8107 DCA 10 MB Twisted Pair
PNP8113 Racal NI6510
PNP811C Ungermann-Bass NIUpc
PNP8120 Ungermann-Bass NIUpc/EOTP
PNP8123 SMC StarCard PLUS (WD/8003S)
PNP8124 SMC StarCard PLUS With On Board Hub (WD/8003SH)
PNP8125 SMC EtherCard PLUS (WD/8003E)
PNP8126 SMC EtherCard PLUS With Boot ROM Socket (WD/8003EBT)
PNP8127 SMC EtherCard PLUS With Boot ROM Socket (WD/8003EB)
PNP8128 SMC EtherCard PLUS TP (WD/8003WT)
PNP812a SMC EtherCard PLUS 16 With Boot ROM Socket (WD/8013EBT)
PNP812d Intel EtherExpress 16 or 16TP
PNP812f Intel TokenExpress 16/4
PNP8130 Intel TokenExpress MCA 16/4
PNP8132 Intel EtherExpress 16 (MCA)
PNP8137 Artisoft AE-1
PNP8138 Artisoft AE-2 or AE-3
PNP8141 Amplicard AC 210/XT
PNP8142 Amplicard AC 210/AT
PNP814b Everex SpeedLink /PC16 (EV2027)
PNP8155 HP PC LAN Adapter/8 TP (HP27245)
PNP8156 HP PC LAN Adapter/16 TP (HP27247A)
PNP8157 HP PC LAN Adapter/8 TL (HP27250)
PNP8158 HP PC LAN Adapter/16 TP Plus (HP27247B)
PNP8159 HP PC LAN Adapter/16 TL Plus (HP27252)
PNP815f National Semiconductor Ethernode *16AT
PNP8160 National Semiconductor AT/LANTIC EtherNODE 16-AT3
PNP816a NCR Token-Ring 4 Mbs ISA
PNP816d NCR Token-Ring 16/4 Mbs ISA
PNP8191 Olicom 16/4 Token-Ring Adapter
PNP81c3 SMC EtherCard PLUS Elite (WD/8003EP)
PNP81c4 SMC EtherCard PLUS 10T (WD/8003W)
PNP81c5 SMC EtherCard PLUS Elite 16 (WD/8013EP)
PNP81c6 SMC EtherCard PLUS Elite 16T (WD/8013W)
PNP81c7 SMC EtherCard PLUS Elite 16 Combo (WD/8013EW or 8013EWC)
PNP81c8 SMC EtherElite Ultra 16
PNP81e4 Pure Data PDI9025-32 (Token Ring)
PNP81e6 Pure Data PDI508+ (ArcNet)
PNP81e7 Pure Data PDI516+ (ArcNet)
PNP81eb Proteon Token Ring (P1390)
PNP81ec Proteon Token Ring (P1392)
PNP81ed Proteon ISA Token Ring (1340)
PNP81ee Proteon ISA Token Ring (1342)
PNP81ef Proteon ISA Token Ring (1346)
PNP81f0 Proteon ISA Token Ring (1347)
PNP81ff Cabletron E2000 Series DNI
PNP8200 Cabletron E2100 Series DNI
PNP8209 Zenith Data Systems Z-Note
PNP820a Zenith Data Systems NE2000-Compatible
PNP8213 Xircom Pocket Ethernet II
PNP8214 Xircom Pocket Ethernet I
PNP821d RadiSys EXM-10
PNP8227 SMC 3000 Series
PNP8228 SMC 91C2 controller
PNP8231 Advanced Micro Devices AM2100/AM1500T
PNP8263 Tulip NCC-16
PNP8277 Exos 105
PNP828A Intel '595 based Ethernet
PNP828B TI2000-style Token Ring
PNP828C AMD PCNet Family cards
PNP828D AMD PCNet32 (VL version)
PNP8294 IrDA Infrared NDIS driver (Microsoft-supplied)
PNP82bd IBM PCMCIA-NIC
PNP82C2 Xircom CE10
PNP82C3 Xircom CEM2
PNP8321 DEC Ethernet (All Types)
PNP8323 SMC EtherCard (All Types except 8013/A)
PNP8324 ARCNET Compatible
PNP8326 Thomas Conrad (All Arcnet Types)
PNP8327 IBM Token Ring (All Types)
PNP8385 Remote Network Access Driver
PNP8387 RNA Point-to-point Protocol Driver
PNP8388 Reserved for Microsoft Networking components
PNP8389 Peer IrLAN infrared driver (Microsoft-supplied)

***** SCSI, Proprietary CD Adapters - PNPAxxx **********
PNPA002 Future Domain 16-700 compatible controller
PNPA003 Panasonic proprietary CD-ROM adapter (SBPro/SB16)
PNPA01B Trantor 128 SCSI Controller
PNPA01D Trantor T160 SCSI Controller
PNPA01E Trantor T338 Parallel SCSI controller
PNPA01F Trantor T348 Parallel SCSI controller
PNPA020 Trantor Media Vision SCSI controller
PNPA022 Always IN-2000 SCSI controller
PNPA02B Sony proprietary CD-ROM controller
PNPA02D Trantor T13b 8-bit SCSI controller
PNPA02F Trantor T358 Parallel SCSI controller
PNPA030 Mitsumi LU-005 Single Speed CD-ROM controller + drive
PNPA031 Mitsumi FX-001 Single Speed CD-ROM controller + drive
PNPA032 Mitsumi FX-001 Double Speed CD-ROM controller + drive

***** Sound/Video-capture, multimedia - PNPBxxx ********
PNPB000 Sound Blaster 1.5-compatible sound device
PNPB001 Sound Blaster 2.0-compatible sound device
PNPB002 Sound Blaster Pro-compatible sound device
PNPB003 Sound Blaster 16-compatible sound device
PNPB004 Thunderboard-compatible sound device
PNPB005 Adlib-compatible FM synthesizer device
PNPB006 MPU401 compatible
PNPB007 Microsoft Windows Sound System-compatible sound device
PNPB008 Compaq Business Audio
PNPB009 Plug and Play Microsoft Windows Sound System Device
PNPB00A MediaVision Pro Audio Spectrum
(Trantor SCSI enabled, Thunder Chip Disabled)
PNPB00B MediaVision Pro Audio 3D
PNPB00C MusicQuest MQX-32M
PNPB00D MediaVision Pro Audio Spectrum Basic
(No Trantor SCSI, Thunder Chip Enabled)
PNPB00E MediaVision Pro Audio Spectrum
(Trantor SCSI enabled, Thunder Chip Enabled)
PNPB00F MediaVision Jazz-16 chipset (OEM Versions)
PNPB010 Auravision VxP500 chipset - Orchid Videola
PNPB018 MediaVision Pro Audio Spectrum 8-bit
PNPB019 MediaVision Pro Audio Spectrum Basic
(no Trantor SCSI, Thunder chip Disabled)
PNPB020 Yamaha OPL3-compatible FM synthesizer device
PNPB02F Joystick/Game port

***** Modems - PNPCxxx-Dxxx****************************
PNPC000 Compaq 14400 Modem (TBD)
PNPC001 Compaq 2400/9600 Modem (TBD)

======================================================================

DEVICE TYPE CODES

-----------------------------------------------------------------------
Base Type = 0: Reserved
Base Type = 1: Mass Storage Device
Sub-Type = 0: SCSI Controller
Sub-Type = 1: IDE Controller (Standard ATA compatible)
Interface Type = 0: Generic IDE
Sub-Type = 2: Floppy Controller (Standard 765 compatible)
Interface Type = 0: Generic Floppy
Sub-Type = 3: IPI Controller
Interface Type = 0: General IPI
Sub-Type = 80h: Other Mass Storage Controller
Base Type = 2: Network Interface Controller
Sub-Type = 0: Ethernet
Interface Type = 0: General Ethernet
Sub-Type = 1: Token Ring Controller
Interface Type = 0: General Token Ring
Sub-Type = 2: FDDI Controller
Interface Type = 0: General FDDI
Sub-Type = 80h: Other Network Interface Controller

Base Type = 3: Display Controller
Sub-Type = 0: VGA Controller (Standard VGA compatible)
Interface Type = 0: Generic VGA compatible
Interface Type = 1: VESA SVGA Compatible Controller
Sub-Type = 1: XGA Compatible Controller
Interface Type = 0: General XGA Compatible Controller
Sub-Type = 80h: Other Display Controller
Base Type = 4: Multi-media Controller
Sub-Type = 0: Video Controller
Interface Type = 0: General Video
Sub-Type = 1: Audio Controller
Interface Type = 0: General Audio Controller
Sub-Type = 80h: Other Multi-media Controller
Base Type = 5: Memory
Sub-Type = 0: RAM
Interface Type = 0: General RAM
Sub-Type = 1: FLASH Memory
Interface Type = 0: General FLASH Memory
Sub-Type = 80h: Other Memory Device

Base Type = 6: Bridge Controller
Sub-Type = 0: Host Processor Bridge
Interface Type = 0: General Host Processor Bridge
Sub-Type = 1: ISA Bridge
Interface Type = 0: General ISA Bridge
Sub-Type = 2: EISA Bridge
Interface Type = 0: General EISA Bridge
Sub-Type = 3: MicroChannel Bridge
Interface Type = 0: General Micro-Channel Bridge
Sub-Type = 4: PCI Bridge
Interface Type = 0: General PCI Bridge
Sub-Type = 5: PCMCIA Bridge
Interface Type = 0: General PCMCIA Bridge
Sub-Type = 80h: Other Bridge Device
Base Type = 7: Communications Device
Sub-Type = 0: RS-232 Device (XT-compatible COM)
Interface Type = 0: Generic XT-compatible
Interface Type = 1: 16450-compatible
Interface Type = 2: 16550-compatible
Sub-Type = 1: AT-Compatible Parallel Port
Interface Type = 0: Generic AT Parallel Port
Interface Type = 1: Model-30 Bidirectional Port
Interface Type = 2: ECP 1.? compliant port
Sub-Type = 80h: Other Communications Device
Base Type = 8: System Peripherals
Sub-Type = 0: Programmable Interrupt Controller (8259 Compatible)
Interface Type = 0: Generic 8259 PIC
Interface Type = 1: ISA PIC (8259 Compatible)
Interface Type = 2: EISA PIC (8259 Compatible)
Sub-Type = 1: DMA Controller (8237 Compatible)
Interface Type = 0: Generic DMA Controller
Interface Type = 1: ISA DMA Controller
Interface Type = 2: EISA DMA Controller
Sub-Type = 2: System Timer (8254 Compatible)
Interface Type = 0: Generic System Timer
Interface Type = 1: ISA System Timer
Interface Type = 2: EISA System Timers (2 Timers)
Sub-Type = 3: Real Time Clock
Interface Type = 0: Generic RTC Controller
Interface Type = 1: ISA RTC Controller
Sub-Type = 80h: Other System Peripheral
Base Type = 9: Input Devices
Sub-Type = 0: Keyboard Controller
Interface Type = 0: Not applicable
Sub-Type = 1: Digitizer (Pen)
Interface Type = 0: Not applicable
Sub-Type = 2: Mouse Controller
Interface Type = 0: Not applicable
Sub-Type = 80h: Other Input Controller
Base Type = 0Ah: Docking Station
Sub-Type = 0: Generic Docking Station
Interface Type = 0: Not applicable
Sub-Type = 80h: Other type of Docking Station
Base Type = 0Bh: CPU Type
Sub-Type = 0: 386-based processor
Interface Type = 0: Not applicable
Sub-Type = 1: 486-based processor
Interface Type = 0: Not applicable
Sub-Type = 2: Pentium-based processor
Interface Type = 0: Not applicable


Reference