Changeset 89983 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c
- Timestamp:
- Jul 1, 2021 8:17:41 AM (3 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-139864 /vendor/edk2/current 103735-103757,103769-103776,129194-145445
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c
r85718 r89983 3 3 write only) architecture, such as ARM and RISC-V processor. 4 4 5 Copyright (c) 2006 - 20 18, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR> 6 6 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> 7 7 Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR> … … 409 409 { 410 410 UINT8 Value; 411 412 Value = *(volatile UINT8*)Address; 411 BOOLEAN Flag; 412 413 Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value); 414 if (Flag) { 415 Value = *(volatile UINT8*)Address; 416 } 417 FilterAfterMmIoRead (FilterWidth8, Address, &Value); 418 413 419 return Value; 414 420 } … … 434 440 ) 435 441 { 436 *(volatile UINT8*)Address = Value; 442 BOOLEAN Flag; 443 444 Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value); 445 if (Flag) { 446 *(volatile UINT8*)Address = Value; 447 } 448 FilterAfterMmIoWrite (FilterWidth8, Address, &Value); 449 437 450 return Value; 438 451 } … … 459 472 { 460 473 UINT16 Value; 474 BOOLEAN Flag; 461 475 462 476 ASSERT ((Address & 1) == 0); 463 Value = *(volatile UINT16*)Address; 477 478 Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value); 479 if (Flag) { 480 Value = *(volatile UINT16*)Address; 481 } 482 FilterAfterMmIoRead (FilterWidth16, Address, &Value); 483 464 484 return Value; 465 485 } … … 485 505 ) 486 506 { 507 BOOLEAN Flag; 508 487 509 ASSERT ((Address & 1) == 0); 488 *(volatile UINT16*)Address = Value; 510 511 Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value); 512 if (Flag) { 513 *(volatile UINT16*)Address = Value; 514 } 515 FilterAfterMmIoWrite (FilterWidth16, Address, &Value); 516 489 517 return Value; 490 518 } … … 511 539 { 512 540 UINT32 Value; 541 BOOLEAN Flag; 513 542 514 543 ASSERT ((Address & 3) == 0); 515 Value = *(volatile UINT32*)Address; 544 545 Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value); 546 if (Flag) { 547 Value = *(volatile UINT32*)Address; 548 } 549 FilterAfterMmIoRead (FilterWidth32, Address, &Value); 550 516 551 return Value; 517 552 } … … 537 572 ) 538 573 { 574 BOOLEAN Flag; 575 539 576 ASSERT ((Address & 3) == 0); 577 578 Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value); 579 if (Flag) { 540 580 *(volatile UINT32*)Address = Value; 581 } 582 FilterAfterMmIoWrite (FilterWidth32, Address, &Value); 583 541 584 return Value; 542 585 } … … 563 606 { 564 607 UINT64 Value; 608 BOOLEAN Flag; 565 609 566 610 ASSERT ((Address & 7) == 0); 567 Value = *(volatile UINT64*)Address; 611 612 Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value); 613 if (Flag) { 614 Value = *(volatile UINT64*)Address; 615 } 616 FilterAfterMmIoRead (FilterWidth64, Address, &Value); 617 568 618 return Value; 569 619 } … … 589 639 ) 590 640 { 641 BOOLEAN Flag; 642 591 643 ASSERT ((Address & 7) == 0); 592 *(volatile UINT64*)Address = Value; 593 return Value; 594 } 595 644 645 Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value); 646 if (Flag) { 647 *(volatile UINT64*)Address = Value; 648 } 649 FilterAfterMmIoWrite (FilterWidth64, Address, &Value); 650 651 return Value; 652 } 653
Note:
See TracChangeset
for help on using the changeset viewer.