The Option::ROM module now compares the Code Type in the PCIR header to 0x00 (PC-AT) in order to check the presence of other header types (PnP, UNDI, iPXE, etc). The validity of these headers are checked not only by offset, but by range and signature checks also. The image checksum and initial size also depends on Code Type. Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
| 116 |
|
116 |
|
| 117 |
|
117 |
|
| 118 |
|
118 |
|
| 119 |
|
|
|
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
| 120 |
|
122 |
|
| 121 |
|
123 |
|
| 122 |
|
124 |
|
|
|
||
| 172 |
|
174 |
|
| 173 |
|
175 |
|
| 174 |
|
176 |
|
|
177 |
|
|
| 175 |
|
178 |
|
| 176 |
|
179 |
|
| 177 |
|
180 |
|
| 178 |
|
|
|
|
181 |
|
|
| 179 |
|
182 |
|
| 180 |
|
183 |
|
| 181 |
|
184 |
|
|
|
||
| 210 |
|
213 |
|
| 211 |
|
214 |
|
| 212 |
|
215 |
|
| 213 |
|
|
|
|
216 |
|
|
|
217 |
|
|
| 214 |
|
218 |
|
| 215 |
|
219 |
|
| 216 |
|
220 |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
|
|
|
224 |
|
|
|
225 |
|
|
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
|
229 |
|
|
| 217 |
|
230 |
|
| 218 |
|
231 |
|
| 219 |
|
232 |
|
|
|
||
| 227 |
|
240 |
|
| 228 |
|
241 |
|
| 229 |
|
242 |
|
|
243 |
|
|
| 230 |
|
244 |
|
| 231 |
|
245 |
|
| 232 |
|
246 |
|
|
247 |
|
|
| 233 |
|
248 |
|
| 234 |
|
249 |
|
| 235 |
|
250 |
|
| 236 |
|
251 |
|
| 237 |
|
252 |
|
| 238 |
|
|
|
| 239 |
|
|
|
| 240 |
|
|
|
| 241 |
|
|
|
| 242 |
|
|
|
|
253 |
|
|
|
254 |
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
| 243 |
|
263 |
|
| 244 |
|
|
|
|
264 |
|
|
|
265 |
|
|
| 245 |
|
266 |
|
| 246 |
|
267 |
|
| 247 |
|
268 |
|
|
|
||
| 250 |
|
271 |
|
| 251 |
|
272 |
|
| 252 |
|
273 |
|
| 253 |
|
|
|
|
274 |
|
|
| 254 |
|
275 |
|
| 255 |
|
|
|
|
276 |
|
|
| 256 |
|
277 |
|
| 257 |
|
278 |
|
| 258 |
|
279 |
|
|
|
||
| 260 |
|
281 |
|
| 261 |
|
282 |
|
| 262 |
|
283 |
|
|
284 |
|
|
| 263 |
|
285 |
|
| 264 |
|
286 |
|
| 265 |
|
287 |
|
|
288 |
|
|
| 266 |
|
289 |
|
| 267 |
|
290 |
|
| 268 |
|
291 |
|
|
|
||
| 273 |
|
296 |
|
| 274 |
|
297 |
|
| 275 |
|
298 |
|
| 276 |
|
|
|
|
299 |
|
|
| 277 |
|
300 |
|
| 278 |
|
301 |
|
| 279 |
|
302 |
|
|
|
||
| 311 |
|
334 |
|
| 312 |
|
335 |
|
| 313 |
|
336 |
|
|
337 |
|
|
| 314 |
|
338 |
|
| 315 |
|
339 |
|
| 316 |
|
340 |
|
|
|
||
| 335 |
|
359 |
|
| 336 |
|
360 |
|
| 337 |
|
361 |
|
|
362 |
|
|
| 338 |
|
363 |
|
| 339 |
|
364 |
|
| 340 |
|
365 |
|
|
|
||
| 369 |
|
394 |
|
| 370 |
|
395 |
|
| 371 |
|
396 |
|
| 372 |
|
|
|
|
397 |
|
|
| 373 |
|
398 |
|
| 374 |
|
|
|
|
399 |
|
|
| 375 |
|
400 |
|
| 376 |
|
401 |
|
| 377 |
|
402 |
|
|
|
||
| 388 |
|
413 |
|
| 389 |
|
414 |
|
| 390 |
|
415 |
|
| 391 |
|
|
|
|
416 |
|
|
| 392 |
|
417 |
|
| 393 |
|
|
|
|
418 |
|
|
| 394 |
|
419 |
|
| 395 |
|
420 |
|
| 396 |
|
421 |
|
|
|
||
| 407 |
|
432 |
|
| 408 |
|
433 |
|
| 409 |
|
434 |
|
| 410 |
|
|
|
|
435 |
|
|
| 411 |
|
436 |
|
| 412 |
|
|
|
|
437 |
|
|
| 413 |
|
438 |
|
| 414 |
|
439 |
|
| 415 |
|
440 |
|
|
|
||
| 426 |
|
451 |
|
| 427 |
|
452 |
|
| 428 |
|
453 |
|
| 429 |
|
|
|
|
454 |
|
|
| 430 |
|
455 |
|
| 431 |
|
|
|
|
456 |
|
|
| 432 |
|
457 |
|
| 433 |
|
458 |
|
| 434 |
|
459 |
|
|
|
||
| 475 |
|
500 |
|
| 476 |
|
501 |
|
| 477 |
|
502 |
|
|
503 |
|
|
| 478 |
|
504 |
|
| 479 |
|
505 |
|
| 480 |
|
506 |
|
|
507 |
|
|
|
508 |
|
|
|
509 |
|
|
|
510 |
|
|
|
511 |
|
|
|
512 |
|
|
|
513 |
|
|
|
514 |
|
|
|
515 |
|
|
|
516 |
|
|
|
517 |
|
|
|
518 |
|
|
|
519 |
|
|
|
520 |
|
|
|
521 |
|
|
| 481 |
|
522 |
|
| 482 |
|
523 |
|
| 483 |
|
524 |
|
|
|
||
| 493 |
|
534 |
|
| 494 |
|
535 |
|
| 495 |
|
536 |
|
| 496 |
|
|
|
|
537 |
|
|
| 497 |
|
538 |
|
| 498 |
|
539 |
|
| 499 |
|
540 |
|
| 500 |
|
541 |
|
| 501 |
|
|
|
|
542 |
|
|
|
543 |
|
|
| 502 |
|
544 |
|
| 503 |
|
545 |
|
| 504 |
|
546 |
|
|
|
||
| 522 |
|
564 |
|
| 523 |
|
565 |
|
| 524 |
|
566 |
|
| 525 |
|
|
|
| 526 |
|
567 |
|
|
568 |
|
|
|
569 |
|
|
|
570 |
|
|
|
571 |
|
|
|
572 |
|
|
|
573 |
|
|
|
574 |
|
|
| 527 |
|
575 |
|
| 528 |
|
576 |
|
| 529 |
|
|
|
|
577 |
|
|
| 530 |
|
578 |
|
| 531 |
|
579 |
|
| 532 |
|
580 |
|
|
|
||
| 564 |
|
612 |
|
| 565 |
|
613 |
|
| 566 |
|
614 |
|
| 567 |
|
|
|
|
615 |
|
|
| 568 |
|
616 |
|
| 569 |
|
617 |
|
| 570 |
|
618 |
|
| 571 |
|
619 |
|
| 572 |
|
|
|
|
620 |
|
|
|
621 |
|
|
| 573 |
|
622 |
|
| 574 |
|
623 |
|
| 575 |
|
624 |
|
|
|
||
| 586 |
|
635 |
|
| 587 |
|
636 |
|
| 588 |
|
637 |
|
| 589 |
|
|
|
| 590 |
|
638 |
|
|
639 |
|
|
|
640 |
|
|
|
641 |
|
|
|
642 |
|
|
|
643 |
|
|
|
644 |
|
|
|
645 |
|
|
| 591 |
|
646 |
|
| 592 |
|
647 |
|
| 593 |
|
|
|
|
648 |
|
|
| 594 |
|
649 |
|
| 595 |
|
650 |
|
| 596 |
|
651 |
|
|
|
||
| 644 |
|
699 |
|
| 645 |
|
700 |
|
| 646 |
|
701 |
|
| 647 |
|
|
|
|
702 |
|
|
| 648 |
|
703 |
|
| 649 |
|
704 |
|
| 650 |
|
705 |
|
| 651 |
|
706 |
|
| 652 |
|
|
|
|
707 |
|
|
|
708 |
|
|
| 653 |
|
709 |
|
| 654 |
|
710 |
|
| 655 |
|
711 |
|
|
|
||
| 669 |
|
725 |
|
| 670 |
|
726 |
|
| 671 |
|
727 |
|
| 672 |
|
|
|
| 673 |
|
728 |
|
|
729 |
|
|
|
730 |
|
|
|
731 |
|
|
|
732 |
|
|
|
733 |
|
|
|
734 |
|
|
|
735 |
|
|
| 674 |
|
736 |
|
| 675 |
|
737 |
|
| 676 |
|
738 |
|
|
|
||
| 705 |
|
767 |
|
| 706 |
|
768 |
|
| 707 |
|
769 |
|
| 708 |
|
|
|
|
770 |
|
|
| 709 |
|
771 |
|
| 710 |
|
772 |
|
| 711 |
|
773 |
|
| 712 |
|
774 |
|
| 713 |
|
|
|
|
775 |
|
|
|
776 |
|
|
| 714 |
|
777 |
|
| 715 |
|
778 |
|
| 716 |
|
779 |
|
|
|
||
| 723 |
|
786 |
|
| 724 |
|
787 |
|
| 725 |
|
788 |
|
| 726 |
|
|
|
| 727 |
|
789 |
|
|
790 |
|
|
|
791 |
|
|
|
792 |
|
|
|
793 |
|
|
|
794 |
|
|
|
795 |
|
|
|
796 |
|
|
| 728 |
|
797 |
|
| 729 |
|
798 |
|
| 730 |
|
799 |
|
|
|
||
| 28 |
|
28 |
|
| 29 |
|
29 |
|
| 30 |
|
30 |
|
| 31 |
|
|
|
|
31 |
|
|
| 32 |
|
32 |
|
|
33 |
|
|
| 33 |
|
34 |
|
| 34 |
|
35 |
|
| 35 |
|
36 |
|
|
|
||
| 38 |
|
39 |
|
| 39 |
|
40 |
|
| 40 |
|
41 |
|
|
42 |
|
|
| 41 |
|
43 |
|
| 42 |
|
44 |
|
| 43 |
|
45 |
|
| 44 |
|
46 |
|
| 45 |
|
|
|
| 46 |
|
|
|
| 47 |
|
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
| 48 |
|
50 |
|
| 49 |
|
|
|
|
51 |
|
|
| 50 |
|
52 |
|
| 51 |
|
53 |
|
| 52 |
|
54 |
|