forked from fysnet/i440fx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpnp.asm
1735 lines (1510 loc) · 77.1 KB
/
pnp.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
comment |*******************************************************************
* Copyright (c) 1984-2025 Forever Young Software Benjamin David Lunt *
* *
* i440FX BIOS ROM v1.0 *
* FILE: pnp.asm *
* *
* This code is freeware, not public domain. Please use respectfully. *
* *
* You may: *
* - use this code for learning purposes only. *
* - use this code in your own Operating System development. *
* - distribute any code that you produce pertaining to this code *
* as long as it is for learning purposes only, not for profit, *
* and you give credit where credit is due. *
* *
* You may NOT: *
* - distribute this code for any purpose other than listed above. *
* - distribute this code for profit. *
* *
* You MUST: *
* - include this whole comment block at the top of this file. *
* - include contact information to where the original source is located. *
* https://github.com/fysnet/i440fx *
* *
* DESCRIPTION: *
* pnp include file *
* *
* BUILT WITH: NewBasic Assembler *
* http://www.fysnet/newbasic.htm *
* NBASM ver 00.27.14 *
* Command line: nbasm i440fx /z<enter> *
* *
* Last Updated: 5 Jan 2025 *
* *
****************************************************************************
* Notes: *
* *
***************************************************************************|
PNP_IS_REALMODE equ 0 ; guaranteed realmode (use for testing purposes only, otherwise must be 0)
PNP_SUCCESS equ 0x00 ; Function completed successfully
PNP_UNKNOWN_FUNCTION equ 0x81 ; Unknown, or invalid, function number passed
PNP_NOT_SUPPORTED equ 0x82 ; The function is not supported on this system
PNP_INVALID_HANDLE equ 0x83 ; Device node number/handle passed is invalid or out of range
PNP_BAD_PARAMETER equ 0x84 ; Function detected invalid resource descriptors or resource descriptors were specified out of order
PNP_SET_FAILED equ 0x85 ; Set Device Node function failed
PNP_EVENTS_NOT_PENDING equ 0x86 ; There are no events pending
PNP_SYSTEM_NOT_DOCKED equ 0x87 ; The system is currently not docked
PNP_NO_ISA_PNP_CARDS equ 0x88 ; Indicates that no ISA Plug and Play cards are installed in the system
PNP_UNABLE_DOCK_CAPS equ 0x89 ; Indicates that the system was not able to determine the capabilities of the docking station
PNP_NO_BATTERY equ 0x8A ; The system failed the undocking sequence because it detected that the system unit did not have a battery
PNP_RESOURCE_CONFLICT equ 0x8B ; The system failed to successfully dock because it detected a resource conflict with one of the primary boot devices; such as Input, Output, or the IPL device
PNP_BUFFER_TOO_SMALL equ 0x8C ; The memory buffer passed in by the caller was not large enough to hold the data to be returned by the system BIOS
PNP_USE_ESCD_SUPPORT equ 0x8D ; ...system BIOS must be handled through the interfaces defined by the ESCD Specification
PNP_MSG_NOT_SUPPORTED equ 0x8E ; The message passed to the system BIOS through function 04h, Send Message, is not supported on the system
PNP_HARDWARE_ERROR equ 0x8F ; The system BIOS detected a hardware failure
PNP_MSD_NODE_LEN equ 29 ; length of an MSD node (floppy, ide)
PNP_VGA_NODE_LEN equ 105 ; length of the VGA node (VGA, Banshee, Cirrus)
; ECP Parallel port
pnp_node_01:
dw 248 ; length 248
db 1 ; handle
db 41h, 0D0h, 04h, 00h ; 0_10000_01110_10000__0000_0100_0000_0000b = PNP0400 = Standard LPT printer port
db 7,1,2 ; ECP 1.? compliant port
dw 0x0080 ; bits 8:7 = 01b = can be configured at run time
; allocated resource configuration descriptor
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<7) ; IRQ 7
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0378 ; minimum IO base address
dw 0x0378 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0778 ; minimum IO base address
dw 0x0778 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0378 ; minimum IO base address
dw 0x0378 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0778 ; minimum IO base address
dw 0x0778 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0278 ; minimum IO base address
dw 0x0278 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0678 ; minimum IO base address
dw 0x0678 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03BC ; minimum IO base address
dw 0x03BC ; maximum IO base address
db 4 ; minimum alignment
db 4 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x07BC ; minimum IO base address
dw 0x07BC ; maximum IO base address
db 4 ; minimum alignment
db 4 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0378 ; minimum IO base address
dw 0x0378 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0778 ; minimum IO base address
dw 0x0778 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x0E ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0278 ; minimum IO base address
dw 0x0278 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0678 ; minimum IO base address
dw 0x0678 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x0E ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03BC ; minimum IO base address
dw 0x03BC ; maximum IO base address
db 4 ; minimum alignment
db 4 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x07BC ; minimum IO base address
dw 0x07BC ; maximum IO base address
db 4 ; minimum alignment
db 4 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw 0x0000
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0378 ; minimum IO base address
dw 0x0378 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0778 ; minimum IO base address
dw 0x0778 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw 0x0000
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0278 ; minimum IO base address
dw 0x0278 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0678 ; minimum IO base address
dw 0x0678 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0101_010b ; DMA format, 2 more bytes
db 0x00 ; DMA bitmask (bit 0 = channel 0)
db 0x08 ; compatibility mode, word mode
db 0_0100_010b ; IRQ format, 2 more bytes
dw 0x0000
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03BC ; minimum IO base address
dw 0x03BC ; maximum IO base address
db 4 ; minimum alignment
db 4 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x07BC ; minimum IO base address
dw 0x07BC ; maximum IO base address
db 4 ; minimum alignment
db 4 ; size of register space
db 0_0111_000b ; end dependent function
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; 16550A-compatible COM port
pnp_node_02:
dw 66 ; length 66
db 2 ; handle
db 41h, 0D0h, 05h, 01h ; 0_10000_01110_10000__0000_0101_0000_0001b = PNP0501 = 16550A-compatible COM port
db 7,0,2 ; 16550-compatible
dw 0x0080 ; bits 8:7 = 01b = can be configured at run time
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<4) ; IRQ 4
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03F8 ; minimum IO base address
dw 0x03F8 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<4) ; IRQ 4
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03F8 ; minimum IO base address
dw 0x03F8 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<3) ; IRQ 3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03E8 ; minimum IO base address
dw 0x03E8 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0100_010b ; IRQ format, 2 more bytes
dw ((1<<12) | (1<<7) | (1<<6) | (1<<5) | (1<<4) | (1<<3)) ; IRQ 12,7,6,5,4,3
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0110 ; minimum IO base address
dw 0x07F8 ; maximum IO base address
db 8 ; minimum alignment
db 8 ; size of register space
db 0_0111_000b ; end dependent function
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; APIC
pnp_node_03:
dw 42 ; length 42
db 3 ; handle
db 41h, 0D0h, 00h, 03h ; 0_10000_01110_10000__0000_0000_0000_0011b = PNP0003 = APIC
db 8,0x80,0 ; Other System Peripheral
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00011101b ; info: 32-bit supported, high-address, non-cacheable, writable
dd IOAPIC_BASE_ADDR ; base address (I/O APIC)
dd 0x00010000 ; length (64k)
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00011101b ; info: 32-bit supported, high-address, non-cacheable, writable
dd APIC_BASE_ADDR ; base address (APIC)
dd 0x00010000 ; length (64k)
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; HPET
pnp_node_04:
dw 30 ; length 30
db 4 ; handle
db 41h, 0D0h, 0Ch, 02h ; 0_10000_01110_10000__0000_1100_0000_0010b = PNP0C02 = General ID for system board device
db 8,0x80,0 ; Other System Peripheral
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00011101b ; info: 32-bit supported, high-address, non-cacheable, writable
dd 0xFED00000 ; base address (HPET)
dd 0x00001000 ; length
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; Mouse Controller
pnp_node_05:
dw 26 ; length 26
db 5 ; handle
db 41h, 0D0h, 0Fh, 13h ; 0_10000_01110_10000__0000_1111_0001_0011b = PNP0F13 = PS/2 Port for PS/2-style Mice
db 9,2,0 ; Mouse Controller
dw 0x0180 ; bits 8:7 = 11b = can only be configured at run time
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<12) ; IRQ 12
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_0110_000b ; start dependent function (default: acceptable)
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<12) ; IRQ 12
db 0_0111_000b ; end dependent function
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; System Board
pnp_node_06:
dw 94 ; length 94
db 6 ; handle
db 41h, 0D0h, 0Ch, 01h ; 0_10000_01110_10000__0000_1100_0000_0001b = PNP0C01 = System Board
db 5,0,0 ; General RAM
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00010011b ; info: 8- and 16-bit supported, read cache-write through, writable
dd 0x00000000 ; base address
dd 0x000A0000 ; length
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00110010b ; info: shadowable, 8- and 16-bit supported, read cache-write through, non-writable
dd 0x000E0000 ; base address
dd 0x00020000 ; length
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00010011b ; info: 8- and 16-bit supported, read cache-write through, writable
dd 0x00100000 ; base address
dd ? ; length (this length gets patched before we block shadowram) (** watch modifying this location **)
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0800 ; minimum IO base address
dw 0x0800 ; maximum IO base address
db 0 ; minimum alignment
db 224 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0C00 ; minimum IO base address
dw 0x0C00 ; maximum IO base address
db 0 ; minimum alignment
db 128 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0062 ; minimum IO base address
dw 0x0062 ; maximum IO base address
db 0 ; minimum alignment
db 2 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0065 ; minimum IO base address
dw 0x0065 ; maximum IO base address
db 0 ; minimum alignment
db 11 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x00E0 ; minimum IO base address
dw 0x00E0 ; maximum IO base address
db 0 ; minimum alignment
db 16 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; ISA PIC (8259 Compatible)
pnp_node_07:
dw 45 ; length 45
db 7 ; handle
db 41h, 0D0h, 00h, 00h ; 0_10000_01110_10000__0000_0000_0000_0000b = PNP0000 = AT Interrupt Controller
db 8,0,1 ; ISA PIC (8259 Compatible)
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<2) ; IRQ 2
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0020 ; minimum IO base address
dw 0x0020 ; maximum IO base address
db 0 ; minimum alignment
db 0x20 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x00A0 ; minimum IO base address
dw 0x00A0 ; maximum IO base address
db 0 ; minimum alignment
db 0x20 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x04D0 ; minimum IO base address
dw 0x04D0 ; maximum IO base address
db 0 ; minimum alignment
db 2 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; ISA System Timer
pnp_node_08:
dw 29 ; length 29
db 8 ; handle
db 41h, 0D0h, 01h, 00h ; 0_10000_01110_10000__0000_0001_0000_0000b = PNP0100 = AT Timer
db 8,2,1 ; ISA System Timer
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<0) ; IRQ 0
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0040 ; minimum IO base address
dw 0x0040 ; maximum IO base address
db 0 ; minimum alignment
db 32 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; ISA RTC Controller
pnp_node_09:
dw 29 ; length 29
db 9 ; handle
db 41h, 0D0h, 0Bh, 00h ; 0_10000_01110_10000__0000_1011_0000_0000b = PNP0B00 = AT Real-Time Clock
db 8,3,1 ; ISA RTC Controller
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<8) ; IRQ 8
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0070 ; minimum IO base address
dw 0x0070 ; maximum IO base address
db 0 ; minimum alignment
db 16 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; Keyboard Controller
pnp_node_10:
dw 37 ; length 37
db 10 ; handle
db 41h, 0D0h, 03h, 03h ; 0_10000_01110_10000__0000_0011_0000_0011b = PNP0303 = IBM Enhanced (101/102-key, PS/2 mouse support)
db 9,0,0 ; Keyboard Controller
dw 0x000B ; primary input device, is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<1) ; IRQ 1
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0060 ; minimum IO base address
dw 0x0060 ; maximum IO base address
db 0 ; minimum alignment
db 1 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0064 ; minimum IO base address
dw 0x0064 ; maximum IO base address
db 0 ; minimum alignment
db 1 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; Coprocessor
pnp_node_11:
dw 29 ; length 29
db 11 ; handle
db 41h, 0D0h, 0Ch, 04h ; 0_10000_01110_10000__0000_0011_0000_0011b = PNP0C04 = Math Coprocessor
db 8,0x80,0 ; Other System Peripheral
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_0100_010b ; IRQ format, 2 more bytes
dw (1<<13) ; IRQ 13
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x00F0 ; minimum IO base address
dw 0x00F0 ; maximum IO base address
db 0 ; minimum alignment
db 16 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; ISA DMA Controller
pnp_node_12:
dw 45 ; length 45
db 12 ; handle
db 41h, 0D0h, 02h, 00h ; 0_10000_01110_10000__0000_0010_0000_0000b = PNP0200 = AT DMA Controller
db 8,1,1 ; ISA DMA Controller
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_0101_010b ; DMA format, 2 more bytes
db 0x10 ; DMA bitmask (channel 4)
db 0x12 ; 16-bit and word count
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0000 ; minimum IO base address
dw 0x0000 ; maximum IO base address
db 0 ; minimum alignment
db 32 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0080 ; minimum IO base address
dw 0x0080 ; maximum IO base address
db 0 ; minimum alignment
db 32 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x00C0 ; minimum IO base address
dw 0x00C0 ; maximum IO base address
db 0 ; minimum alignment
db 32 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; AT-style speaker sound
pnp_node_13:
dw 26 ; length 26
db 13 ; handle
db 41h, 0D0h, 08h, 00h ; 0_10000_01110_10000__0000_1000_0000_0000b = PNP0800 = AT-style speaker sound
db 8,0x80,0 ; Other System Peripheral
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0061 ; minimum IO base address
dw 0x0061 ; maximum IO base address
db 0 ; minimum alignment
db 1 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; General PCI Bridge
pnp_node_14:
dw 26 ; length 26
db 14 ; handle
db 41h, 0D0h, 0Ah, 03h ; 0_10000_01110_10000__0000_1010_0000_0011b = PNP0A03 = PCI Bus
db 6,4,0 ; General PCI Bridge
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x0CF8 ; minimum IO base address
dw 0x0CF8 ; maximum IO base address
db 0 ; minimum alignment
db 8 ; size of register space
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; Standard VGA (only used if no PCI vga found) (if PCI vga found, the floppy or hdd will overwrite this area)
pnp_node_15:
dw 70 ; length 70
db 15 ; handle
db 41h, 0D0h, 09h, 00h ; 0_10000_01110_10000__0000_1001_0000_0000b = PNP0900 = VGA compatible
db 3,0,0 ; VGA Compatible Controller
dw 0x0003 ; is not configurable, cannot be disabled
; allocated resource configuration descriptor
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03B0 ; minimum IO base address
dw 0x03B0 ; maximum IO base address
db 0 ; minimum alignment
db 12 ; size of register space
db 0_1000_111b ; I/O Port descriptor, 7 more bytes
db 1 ; info: decodes all 16-bit ISA bus
dw 0x03C0 ; minimum IO base address
dw 0x03C0 ; maximum IO base address
db 0 ; minimum alignment
db 32 ; size of register space
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00010001b ; info: 8/16-bit supported, non-cacheable, writable
dd 0x000A0000 ; base address
dd 0x0000FFFF ; length
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00010001b ; info: 8/16-bit supported, non-cacheable, writable
dd 0x000B0000 ; base address
dd 0x0000FFFF ; length
db 1_0000110b ; 32-bit fixed location memory range descriptor
dw 0x0009 ; 9 bytes in length
db 00010001b ; info: 8/16-bit supported, non-cacheable, writable
dd 0x000C0000 ; base address
dd 0x00007FFF ; length
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
db 0_1111_001b ; end tag, 1 more byte
db 0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
pnp_node_16:
; we reserved enough room for one floppy drive and two ATA controllers, each PNP_MSD_NODE_LEN bytes
dup (PNP_MSD_NODE_LEN * 3),0
PNP_NODE_LIST_S struct
handle byte
next byte
size word
location word
PNP_NODE_LIST_S ends
; a list of the nodes we have
pnp_node_list db 1 ; handle
db 2 ; next handle (or 0xFF for none)
dw 248 ; size of node
dw offset pnp_node_01 ; offset of node
db 2 ; handle
db 3 ; next handle (or 0xFF for none)
dw 66 ; size of node
dw offset pnp_node_02 ; offset of node
db 3 ; handle
db 4 ; next handle (or 0xFF for none)
dw 42 ; size of node
dw offset pnp_node_03 ; offset of node
db 4 ; handle
db 5 ; next handle (or 0xFF for none)
dw 30 ; size of node
dw offset pnp_node_04 ; offset of node
db 5 ; handle
db 6 ; next handle (or 0xFF for none)
dw 26 ; size of node
dw offset pnp_node_05 ; offset of node
db 6 ; handle
db 7 ; next handle (or 0xFF for none)
dw 94 ; size of node
dw offset pnp_node_06 ; offset of node
db 7 ; handle
db 8 ; next handle (or 0xFF for none)
dw 45 ; size of node
dw offset pnp_node_07 ; offset of node
db 8 ; handle
db 9 ; next handle (or 0xFF for none)
dw 29 ; size of node
dw offset pnp_node_08 ; offset of node
db 9 ; handle
db 10 ; next handle (or 0xFF for none)
dw 29 ; size of node
dw offset pnp_node_09 ; offset of node
db 10 ; handle
db 11 ; next handle (or 0xFF for none)
dw 37 ; size of node
dw offset pnp_node_10 ; offset of node
db 11 ; handle
db 12 ; next handle (or 0xFF for none)
dw 29 ; size of node
dw offset pnp_node_11 ; offset of node
db 12 ; handle
db 13 ; next handle (or 0xFF for none)
dw 45 ; size of node
dw offset pnp_node_12 ; offset of node
db 13 ; handle
db 14 ; next handle (or 0xFF for none)
dw 26 ; size of node
dw offset pnp_node_13 ; offset of node
db 14 ; handle
db 0xFF ; next handle (or 0xFF for none)
dw 26 ; size of node
dw offset pnp_node_14 ; offset of node
; we save room to add up to four more entries
; (one VGA, one floppy drive, two ata controllers)
; these are added in 'pnp_initialize'
dup (4 * sizeof(PNP_NODE_LIST_S)),0
; during BIOS initialization, these will be read/write accessible.
; after initialization, they are read only
pnp_node_count db 14 ; count of valid nodes (before pnp_initialize call)
pnp_node_size dw 248 ; size of largest node
pnp_next_node dw offset pnp_node_15
pnp_next_idx dw (pnp_node_list + ((14 - 1) * sizeof(PNP_NODE_LIST_S))) ; *** points to the current last entry ***
; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
; Initialize the PNP
; Shaddow Ram is implemented. We can write to 0x000E0000->0x000FFFFF
; on entry:
; nothing
; on return
; nothing
; destroys nothing
pnp_initialize proc near uses eax bx cx dx ds
mov ax,EBDA_SEG
mov ds,ax
; we need to patch the extended memory value in our physical memory node
mov eax,[EBDA_DATA->mem_base_ram_size]
sub eax,0x00100000
mov cs:[pnp_node_06 + ((4*12) - sizeof(dword))],eax ; third 12-byte block, last dword of that block
; check if a pci vga card is found
; if not, add a standard VGA entry
call pnp_add_vga
; we add one floppy disk controller if we found one
cmp byte [EBDA_DATA->fdd_count],0
je short @f
mov eax,0x0007D041 ; little_endian(0_10000_01110_10000__0000_0111_0000_0000b) = PNP0700 = PC standard floppy disk controller
mov cx,0x0206 ; Generic Floppy / irq 6
mov dx,0x3F0
call pnp_add_msd
; go through the first two ata controllers
@@: mov cx,2
xor bx,bx
pnp_add_msd_0:
cmp byte [bx+EBDA_DATA->ata_0_iface],ATA_IFACE_NONE
je short @f
push cx
mov eax,0x0006D041 ; little_endian(0_10000_01110_10000__0000_0110_0000_0000b) = PNP0600 = Generic ESDI/IDE/ATA compatible hard disk controller
mov ch,0x01 ; Generic IDE
mov cl,[bx+EBDA_DATA->ata_0_irq]
mov dx,[bx+EBDA_DATA->ata_0_iobase1]
call pnp_add_msd
pop cx
@@: add bx,ATA_CHANNEL_SIZE
loop short pnp_add_msd_0
ret
pnp_initialize endp
; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
; add a floppy/hard disk/cdrom to the pnp node list
; on entry:
; eax = id (PNP0700 for floppy, PNP0600 for IDE)
; cl = irq (6 = irq 6)
; ch = type (2 = floppy, 1 = ide)
; dx = base0 IO address (0x3F0, 0x1F0, etc)
; on return
; nothing
; destroys none
pnp_add_msd proc near uses eax bx cx dx ds
mov bx,BIOS_BASE
mov ds,bx
mov bx,pnp_next_node ; offset to next available space for node data
inc byte pnp_node_count ; increment the count
push ax ; preserved the id
mov al,pnp_node_count ;
; build node
mov word [bx+0],PNP_MSD_NODE_LEN ; length
mov [bx+2],al ; handle
pop ax ; restore the id
mov [bx+3],eax ; id
mov byte [bx+7],1 ;
mov [bx+8],ch ; type
mov byte [bx+9],0 ;
mov word [bx+10],0x0090 ; is configurable at runtime, primary IPL device
; build IRQ format
mov byte [bx+12],0_0100_010b ; IRQ format, 2 more bytes
mov ax,1
shl ax,cl
mov [bx+13],ax ; IRQ cl
; allocated resource configuration descriptor
mov byte [bx+15],0_1000_111b ; I/O Port descriptor, 7 more bytes
mov byte [bx+16],1 ; info: decodes all 16-bit ISA bus
mov [bx+17],dx ; minimum IO base address
mov [bx+19],dx ; maximum IO base address
mov byte [bx+21],8 ; minimum alignment
mov byte [bx+22],8 ; size of register space
; floppy disk can have this added
; db 0_0101_010b ; DMA format, 2 more bytes
; db 0x04 ; DMA bitmask (bit 2 = channel 2)
; db 0x08 ; compatibility mode, word mode
; end tag
mov byte [bx+23],0_1111_001b ; end tag, 1 more byte
mov byte [bx+24],0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; possible resource configuration descriptor block:
; end tag
mov byte [bx+25],0_1111_001b ; end tag, 1 more byte
mov byte [bx+26],0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; compatible device identifiers
; end tag
mov byte [bx+27],0_1111_001b ; end tag, 1 more byte
mov byte [bx+28],0 ; 0 = no crc (!0 = zero byte crc from first byte in this block?)
; update the location, size, and count
add word pnp_next_node,PNP_MSD_NODE_LEN
; update the list
mov al,pnp_node_count
mov dx,bx ; save location of this node
mov bx,pnp_next_idx ; pointer to last used entry
mov [bx+PNP_NODE_LIST_S->next],al ; mark the current last with next node
add bx,sizeof(PNP_NODE_LIST_S)
mov [bx+PNP_NODE_LIST_S->handle],al
mov byte [bx+PNP_NODE_LIST_S->next],0xFF
mov word [bx+PNP_NODE_LIST_S->size],PNP_MSD_NODE_LEN
mov [bx+PNP_NODE_LIST_S->location],dx
; update to this entry
mov pnp_next_idx,bx
ret
pnp_add_msd endp
; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
; if a PCI VGA is not found, add a Standard VGA to the list
; on entry:
; nothing
; on return
; nothing
; destroys none
pnp_add_vga proc near uses ax bx dx si ds
; search the PCI for a VGA device
mov ax,0xB103
; unused class subclass prog int
mov ecx,00000000_00000011_00000000_00000000b