File indexing completed on 2025-05-11 08:23:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef _PNP_
0019 #define _PNP_
0020
0021 #ifndef ASM
0022 #define MAX_MEM_REGISTERS 9
0023 #define MAX_IO_PORTS 20
0024 #define MAX_IRQS 7
0025
0026
0027
0028
0029 #define PNPinterrupt0 "PNP0000"
0030 #define PNPinterrupt1 "PNP0001"
0031 #define PNPinterrupt2 "PNP0002"
0032 #define PNPinterrupt3 "PNP0003"
0033 #define PNPExtInt "IBM000D"
0034
0035
0036
0037 #define PNPtimer0 "PNP0100"
0038 #define PNPtimer1 "PNP0101"
0039 #define PNPtimer2 "PNP0102"
0040
0041
0042
0043 #define PNPdma0 "PNP0200"
0044 #define PNPdma1 "PNP0201"
0045 #define PNPdma2 "PNP0202"
0046
0047
0048
0049 #define PNPCMOS "IBM0009"
0050
0051
0052 #define PNPL2 "IBM0007"
0053
0054
0055 #define PNPNVRAM "IBM0008"
0056
0057
0058 #define PNPPM "IBM0005"
0059
0060
0061
0062
0063 #define PNPkeyboard0 "PNP0300"
0064 #define PNPkeyboard1 "PNP0301"
0065 #define PNPkeyboard2 "PNP0302"
0066 #define PNPkeyboard3 "PNP0303"
0067 #define PNPkeyboard4 "PNP0304"
0068 #define PNPkeyboard5 "PNP0305"
0069 #define PNPkeyboard6 "PNP0306"
0070 #define PNPkeyboard7 "PNP0307"
0071
0072
0073
0074 #define PNPparallel0 "PNP0400"
0075 #define PNPparallel1 "PNP0401"
0076 #define PNPepp "IBM001C"
0077
0078
0079
0080 #define PNPserial0 "PNP0500"
0081 #define PNPSerial1 "PNP0501"
0082
0083
0084
0085 #define PNPdisk0 "PNP0600"
0086 #define PNPdisk1 "PNP0601"
0087 #define PNPdisk2 "PNP0602"
0088
0089
0090
0091 #define PNPdiskette0 "PNP0700"
0092
0093
0094
0095 #define PNPdisplay0 "PNP0900"
0096 #define PNPdisplay1 "PNP0901"
0097 #define PNPdisplay2 "PNP0902"
0098 #define PNPdisplay3 "PNP0903"
0099 #define PNPdisplay4 "PNP0904"
0100 #define PNPdisplay5 "PNP0905"
0101 #define PNPdisplay6 "PNP0906"
0102 #define PNPdisplay7 "PNP0907"
0103 #define PNPdisplay8 "PNP0908"
0104 #define PNPdisplay9 "PNP0909"
0105 #define PNPdisplayA "PNP090A"
0106 #define PNPdisplayB "PNP090B"
0107 #define PNPdisplayC "PNP090C"
0108 #define PNPdisplayD "PNP090D"
0109 #define PNPdisplayE "PNP090E"
0110 #define PNPdisplayF "PNP090F"
0111
0112
0113
0114 #define PNPbuses0 "PNP0A00"
0115 #define PNPbuses1 "PNP0A01"
0116 #define PNPbuses2 "PNP0A02"
0117 #define PNPbuses3 "PNP0A03"
0118 #define PNPbuses4 "PNP0A04"
0119
0120
0121
0122 #define PNPspeaker0 "PNP0800"
0123 #define PNPrtc0 "PNP0B00"
0124 #define PNPpnpbios0 "PNP0C00"
0125 #define PNPpnpbios1 "PNP0C01"
0126 #define PNPpnpbios2 "PNP0C02"
0127 #define PNPpnpbios3 "PNP0C03"
0128
0129
0130
0131 #define PNPpcmcia0 "PNP0E00"
0132
0133
0134
0135 #define PNPmouse0 "PNP0F00"
0136 #define PNPmouse1 "PNP0F01"
0137 #define PNPmouse2 "PNP0F02"
0138 #define PNPmouse3 "PNP0F03"
0139 #define PNPmouse4 "PNP0F04"
0140 #define PNPmouse5 "PNP0F05"
0141 #define PNPmouse6 "PNP0F06"
0142 #define PNPmouse7 "PNP0F07"
0143 #define PNPmouse8 "PNP0F08"
0144 #define PNPmouse9 "PNP0F09"
0145 #define PNPmouseA "PNP0F0A"
0146 #define PNPmouseB "PNP0F0B"
0147
0148
0149
0150 #define PNPmodem0 "PNP9000"
0151
0152
0153
0154 #define PNPnetworkC9 "PNP80C9"
0155 #define PNPnetworkCA "PNP80CA"
0156 #define PNPnetworkCB "PNP80CB"
0157 #define PNPnetworkCC "PNP80CC"
0158 #define PNPnetwork27 "PNP8327"
0159 #define PNPnetworket "IBM0010"
0160 #define PNPneteisaet "IBM2001"
0161 #define PNPAMD79C970 "IBM0016"
0162
0163
0164
0165 #define PNPscsi0 "PNPA000"
0166 #define PNPscsi1 "PNPA001"
0167 #define PNPscsi2 "PNPA002"
0168 #define PNPscsi3 "PNPA003"
0169 #define PNPscsiF "IBM000F"
0170 #define PNPscsi825 "IBM001B"
0171 #define PNPscsi875 "IBM0018"
0172
0173
0174
0175 #define PNPmm0 "PNPB000"
0176 #define PNPmm1 "PNPB001"
0177 #define PNPmmF "IBM000E"
0178 #define PNPv7310 "IBM0015"
0179 #define PNPmm4232 "IBM0017"
0180 #define PNPpmsyn "IBM001D"
0181 #define PNPgp4232 "IBM0012"
0182 #define PNPmidi4232 "IBM0013"
0183
0184
0185 #define PNPopctl "IBM000B"
0186
0187
0188 #define PNPsp "IBM0011"
0189 #define PNPLTsp "IBM001E"
0190 #define PNPLTmsp "IBM001F"
0191
0192
0193 #define PNPmemctl "IBM000A"
0194
0195
0196 #define PNPg_assist "IBM0014"
0197
0198
0199 #define PNPtablet "IBM0019"
0200
0201
0202
0203 #define S1_Packet 0x0A
0204 #define S2_Packet 0x15
0205 #define S2_Packet_flags 0x16
0206 #define S3_Packet 0x1C
0207 #define S4_Packet 0x22
0208 #define S4_Packet_flags 0x23
0209 #define S5_Packet 0x2A
0210 #define S6_Packet 0x30
0211 #define S6_Packet_priority 0x31
0212 #define S7_Packet 0x38
0213 #define S8_Packet 0x47
0214 #define S9_Packet_fixed 0x4B
0215 #define S14_Packet 0x71
0216 #define S15_Packet 0x78
0217 #define S15_Packet_checksum 0x79
0218 #define L1_Packet 0x81
0219 #define L1_Shadow 0x20
0220 #define L1_32bit_mem 0x18
0221 #define L1_8_16bit_mem 0x10
0222 #define L1_Decode_Hi 0x04
0223 #define L1_Cache 0x02
0224 #define L1_Writeable 0x01
0225 #define L2_Packet 0x82
0226 #define L3_Packet 0x83
0227 #define L4_Packet 0x84
0228 #define L5_Packet 0x85
0229 #define L6_Packet 0x86
0230 #define END_TAG 0x78
0231 #define DF_START_TAG 0x30
0232 #define DF_START_TAG_priority 0x31
0233 #define DF_END_TAG 0x38
0234 #define SUBOPTIMAL_CONFIGURATION 0x2
0235
0236
0237
0238 typedef enum _PnP_BASE_TYPE {
0239 Reserved = 0,
0240 MassStorageDevice = 1,
0241 NetworkInterfaceController = 2,
0242 DisplayController = 3,
0243 MultimediaController = 4,
0244 MemoryController = 5,
0245 BridgeController = 6,
0246 CommunicationsDevice = 7,
0247 SystemPeripheral = 8,
0248 InputDevice = 9,
0249 ServiceProcessor = 0x0A,
0250 } PnP_BASE_TYPE;
0251
0252
0253
0254 typedef enum _PnP_SUB_TYPE {
0255 SCSIController = 0,
0256 IDEController = 1,
0257 FloppyController = 2,
0258 IPIController = 3,
0259 OtherMassStorageController = 0x80,
0260
0261 EthernetController = 0,
0262 TokenRingController = 1,
0263 FDDIController = 2,
0264 OtherNetworkController = 0x80,
0265
0266 VGAController= 0,
0267 SVGAController= 1,
0268 XGAController= 2,
0269 OtherDisplayController = 0x80,
0270
0271 VideoController = 0,
0272 AudioController = 1,
0273 OtherMultimediaController = 0x80,
0274
0275 RAM = 0,
0276 FLASH = 1,
0277 OtherMemoryDevice = 0x80,
0278
0279 HostProcessorBridge = 0,
0280 ISABridge = 1,
0281 EISABridge = 2,
0282 MicroChannelBridge = 3,
0283 PCIBridge = 4,
0284 PCMCIABridge = 5,
0285 VMEBridge = 6,
0286 OtherBridgeDevice = 0x80,
0287
0288 RS232Device = 0,
0289 ATCompatibleParallelPort = 1,
0290 OtherCommunicationsDevice = 0x80,
0291
0292 ProgrammableInterruptController = 0,
0293 DMAController = 1,
0294 SystemTimer = 2,
0295 RealTimeClock = 3,
0296 L2Cache = 4,
0297 NVRAM = 5,
0298 PowerManagement = 6,
0299 CMOS = 7,
0300 OperatorPanel = 8,
0301 ServiceProcessorClass1 = 9,
0302 ServiceProcessorClass2 = 0xA,
0303 ServiceProcessorClass3 = 0xB,
0304 GraphicAssist = 0xC,
0305 SystemPlanar = 0xF,
0306 OtherSystemPeripheral = 0x80,
0307
0308 KeyboardController = 0,
0309 Digitizer = 1,
0310 MouseController = 2,
0311 TabletController = 3,
0312 OtherInputController = 0x80,
0313
0314 GeneralMemoryController = 0,
0315 } PnP_SUB_TYPE;
0316
0317
0318
0319 typedef enum _PnP_INTERFACE {
0320 General = 0,
0321 GeneralSCSI = 0,
0322 GeneralIDE = 0,
0323 ATACompatible = 1,
0324
0325 GeneralFloppy = 0,
0326 Compatible765 = 1,
0327 NS398_Floppy = 2,
0328
0329
0330 NS26E_Floppy = 3,
0331 NS15C_Floppy = 4,
0332 NS2E_Floppy = 5,
0333 CHRP_Floppy = 6,
0334
0335 GeneralIPI = 0,
0336
0337 GeneralEther = 0,
0338 GeneralToken = 0,
0339 GeneralFDDI = 0,
0340
0341 GeneralVGA = 0,
0342 GeneralSVGA = 0,
0343 GeneralXGA = 0,
0344
0345 GeneralVideo = 0,
0346 GeneralAudio = 0,
0347 CS4232Audio = 1,
0348
0349 GeneralRAM = 0,
0350 GeneralFLASH = 0,
0351 PCIMemoryController = 0,
0352 RS6KMemoryController = 1,
0353
0354 GeneralHostBridge = 0,
0355 GeneralISABridge = 0,
0356 GeneralEISABridge = 0,
0357 GeneralMCABridge = 0,
0358 GeneralPCIBridge = 0,
0359 PCIBridgeDirect = 0,
0360 PCIBridgeIndirect = 1,
0361 PCIBridgeRS6K = 2,
0362 GeneralPCMCIABridge = 0,
0363 GeneralVMEBridge = 0,
0364
0365 GeneralRS232 = 0,
0366 COMx = 1,
0367 Compatible16450 = 2,
0368 Compatible16550 = 3,
0369 NS398SerPort = 4,
0370
0371
0372 NS26ESerPort = 5,
0373 NS15CSerPort = 6,
0374 NS2ESerPort = 7,
0375
0376 GeneralParPort = 0,
0377 LPTx = 1,
0378 NS398ParPort = 2,
0379
0380
0381 NS26EParPort = 3,
0382 NS15CParPort = 4,
0383 NS2EParPort = 5,
0384
0385 GeneralPIC = 0,
0386 ISA_PIC = 1,
0387 EISA_PIC = 2,
0388 MPIC = 3,
0389 RS6K_PIC = 4,
0390
0391 GeneralDMA = 0,
0392 ISA_DMA = 1,
0393 EISA_DMA = 2,
0394
0395 GeneralTimer = 0,
0396 ISA_Timer = 1,
0397 EISA_Timer = 2,
0398 GeneralRTC = 0,
0399 ISA_RTC = 1,
0400
0401 StoreThruOnly = 1,
0402 StoreInEnabled = 2,
0403 RS6KL2Cache = 3,
0404
0405 IndirectNVRAM = 0,
0406 DirectNVRAM = 1,
0407 IndirectNVRAM24 = 2,
0408
0409 GeneralPowerManagement = 0,
0410 EPOWPowerManagement = 1,
0411 PowerControl = 2,
0412
0413 GeneralCMOS = 0,
0414
0415 GeneralOPPanel = 0,
0416 HarddiskLight = 1,
0417 CDROMLight = 2,
0418 PowerLight = 3,
0419 KeyLock = 4,
0420 ANDisplay = 5,
0421 SystemStatusLED = 6,
0422 CHRP_SystemStatusLED = 7,
0423
0424 GeneralServiceProcessor = 0,
0425
0426 TransferData = 1,
0427 IGMC32 = 2,
0428 IGMC64 = 3,
0429
0430 GeneralSystemPlanar = 0,
0431
0432 } PnP_INTERFACE;
0433
0434
0435
0436
0437
0438 typedef struct _SERIAL_ID {
0439 unsigned char VendorID0;
0440
0441
0442
0443
0444 unsigned char VendorID1;
0445
0446
0447
0448 unsigned char VendorID2;
0449 unsigned char VendorID3;
0450
0451
0452
0453
0454 unsigned char Serial0;
0455 unsigned char Serial1;
0456 unsigned char Serial2;
0457 unsigned char Serial3;
0458 unsigned char Checksum;
0459 } SERIAL_ID;
0460
0461 typedef enum _PnPItemName {
0462 Unused = 0,
0463 PnPVersion = 1,
0464 LogicalDevice = 2,
0465 CompatibleDevice = 3,
0466 IRQFormat = 4,
0467 DMAFormat = 5,
0468 StartDepFunc = 6,
0469 EndDepFunc = 7,
0470 IOPort = 8,
0471 FixedIOPort = 9,
0472 Res1 = 10,
0473 Res2 = 11,
0474 Res3 = 12,
0475 SmallVendorItem = 14,
0476 EndTag = 15,
0477 MemoryRange = 1,
0478 ANSIIdentifier = 2,
0479 UnicodeIdentifier = 3,
0480 LargeVendorItem = 4,
0481 MemoryRange32 = 5,
0482 MemoryRangeFixed32 = 6,
0483 } PnPItemName;
0484
0485
0486
0487
0488 #define tag_type(t) (((t) & 0x80)>>7)
0489 #define set_tag_type(t,v) (t = (t & 0x7f) | ((v)<<7))
0490
0491
0492 #define tag_small_item_name(t) (((t) & 0x78)>>3)
0493 #define set_tag_small_item_name(t,v) (t = (t & 0x07) | ((v)<<3))
0494
0495
0496 #define tag_small_count(t) ((t) & 0x07)
0497 #define set_tag_count(t,v) (t = (t & 0x78) | (v))
0498
0499
0500 #define tag_large_item_name(t) ((t) & 0x7f)
0501 #define set_tag_large_item_name(t,v) (t = (t | 0x80) | (v))
0502
0503
0504
0505 typedef union _PnP_TAG_PACKET {
0506 struct _S1_Pack{
0507 unsigned char Tag;
0508 unsigned char Version[2];
0509 } S1_Pack;
0510
0511 struct _S2_Pack{
0512 unsigned char Tag;
0513 unsigned char DevId[4];
0514 unsigned char Flags[2];
0515
0516
0517 } S2_Pack;
0518
0519 struct _S3_Pack{
0520 unsigned char Tag;
0521 unsigned char CompatId[4];
0522 } S3_Pack;
0523
0524 struct _S4_Pack{
0525 unsigned char Tag;
0526 unsigned char IRQMask[2];
0527
0528 unsigned char IRQInfo;
0529
0530
0531
0532
0533
0534 } S4_Pack;
0535
0536 struct _S5_Pack{
0537 unsigned char Tag;
0538 unsigned char DMAMask;
0539 unsigned char DMAInfo;
0540 } S5_Pack;
0541
0542 struct _S6_Pack{
0543 unsigned char Tag;
0544 unsigned char Priority;
0545
0546
0547
0548 } S6_Pack;
0549
0550 struct _S7_Pack{
0551 unsigned char Tag;
0552 } S7_Pack;
0553
0554 struct _S8_Pack{
0555 unsigned char Tag;
0556 unsigned char IOInfo;
0557 #define ISAAddr16bit 0x01
0558 unsigned char RangeMin[2];
0559 unsigned char RangeMax[2];
0560 unsigned char IOAlign;
0561 unsigned char IONum;
0562 } S8_Pack;
0563
0564 struct _S9_Pack{
0565 unsigned char Tag;
0566 unsigned char Range[2];
0567 unsigned char IONum;
0568 } S9_Pack;
0569
0570 struct _S14_Pack{
0571 unsigned char Tag;
0572 union _S14_Data{
0573 unsigned char Data[7];
0574 struct _S14_PPCPack{
0575 unsigned char Type;
0576 unsigned char PPCData[6];
0577 } S14_PPCPack;
0578 } S14_Data;
0579 } S14_Pack;
0580
0581 struct _S15_Pack{
0582 unsigned char Tag;
0583 unsigned char Check;
0584 } S15_Pack;
0585
0586 struct _L1_Pack{
0587 unsigned char Tag;
0588 unsigned char Count0;
0589 unsigned char Count1;
0590 unsigned char Data[9];
0591
0592 } L1_Pack;
0593
0594 struct _L2_Pack{
0595 unsigned char Tag;
0596 unsigned char Count0;
0597 unsigned char Count1;
0598 unsigned char Identifier[1];
0599
0600 } L2_Pack;
0601
0602 struct _L3_Pack{
0603 unsigned char Tag;
0604 unsigned char Count0;
0605 unsigned char Count1;
0606 unsigned char Country0;
0607 unsigned char Country1;
0608 unsigned char Identifier[1];
0609
0610 } L3_Pack;
0611
0612 struct _L4_Pack{
0613 unsigned char Tag;
0614 unsigned char Count0;
0615 unsigned char Count1;
0616 union _L4_Data{
0617 unsigned char Data[1];
0618
0619 struct _L4_PPCPack{
0620 unsigned char Type;
0621 unsigned char PPCData[1];
0622
0623 } L4_PPCPack;
0624 } L4_Data;
0625 } L4_Pack;
0626
0627 struct _L5_Pack{
0628 unsigned char Tag;
0629 unsigned char Count0;
0630 unsigned char Count1;
0631 unsigned char Data[17];
0632 } L5_Pack;
0633
0634 struct _L6_Pack{
0635 unsigned char Tag;
0636 unsigned char Count0;
0637 unsigned char Count1;
0638 unsigned char Data[9];
0639 } L6_Pack;
0640
0641 } PnP_TAG_PACKET;
0642
0643 #endif
0644 #endif