Changeset 81941 in vbox
- Timestamp:
- Nov 18, 2019 1:37:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/system.c
r76553 r81941 652 652 } 653 653 654 #ifdef VBOX /* We've already used the CMOS entries for SATA. 655 BTW. This is the amount of memory above 4GB measured in 64KB units. */ 654 /* This is the amount of memory above 4GB measured in 64KB units. */ 656 655 extra_lowbits_memory_size = inb_cmos(0x62); 657 656 extra_lowbits_memory_size <<= 8; … … 660 659 extra_highbits_memory_size = inb_cmos(0x63); 661 660 /* 0x64 and 0x65 can be used if we need to dig 1 TB or more at a later point. */ 662 #else663 extra_lowbits_memory_size = inb_cmos(0x5c);664 extra_lowbits_memory_size <<= 8;665 extra_lowbits_memory_size |= inb_cmos(0x5b);666 extra_lowbits_memory_size *= 64;667 extra_lowbits_memory_size *= 1024;668 extra_highbits_memory_size = inb_cmos(0x5d);669 #endif /* !VBOX */670 661 671 662 mcfgStart = 0; … … 676 667 case 0: 677 668 set_e820_range(ES, DI, 678 #ifndef VBOX /** @todo Upstream suggests the following, needs checking. (see next as well) */679 0x0000000L, 0x0009f000L, 0, 0, 1);680 #else681 669 0x0000000L, 0x0009fc00L, 0, 0, 1); 682 #endif683 670 EBX = 1; 684 671 break; 685 672 case 1: 686 673 set_e820_range(ES, DI, 687 #ifndef VBOX /** @todo Upstream suggests the following, needs checking. (see next as well) */688 0x0009f000L, 0x000a0000L, 0, 0, 2);689 #else690 674 0x0009fc00L, 0x000a0000L, 0, 0, 2); 691 #endif692 675 EBX = 2; 693 676 break; 694 677 case 2: 695 #ifdef VBOX696 678 /* Mark the BIOS as reserved. VBox doesn't currently 697 679 * use the 0xe0000-0xeffff area. It does use the … … 707 689 set_e820_range(ES, DI, 708 690 0x000f0000L, 0x00100000L, 0, 0, 2); 709 #else /* !VBOX */710 set_e820_range(ES, DI,711 0x000e8000L, 0x00100000L, 0, 0, 2);712 #endif /* !VBOX */713 691 EBX = 3; 714 692 break; 715 693 case 3: 716 #if BX_ROMBIOS32 || defined(VBOX)717 694 set_e820_range(ES, DI, 718 695 0x00100000L, 719 696 extended_memory_size - ACPI_DATA_SIZE, 0, 0, 1); 720 697 EBX = 4; 721 #else722 set_e820_range(ES, DI,723 0x00100000L,724 extended_memory_size, 1);725 EBX = 5;726 #endif727 698 break; 728 699 case 4: … … 746 717 case 7: 747 718 /* 256KB BIOS area at the end of 4 GB */ 748 #ifdef VBOX749 719 /* We don't set the end to 1GB here and rely on the 32-bit 750 720 unsigned wrap around effect (0-0xfffc0000L). */ 751 #endif752 721 set_e820_range(ES, DI, 753 722 0xfffc0000L, 0x00000000L, 0, 0, 2); … … 773 742 break; 774 743 case 9: 775 #ifdef VBOX /* Don't succeeded if no memory above 4 GB. */776 744 /* Mapping of memory above 4 GB if present. 777 745 Note1: set_e820_range needs do no borrowing in the … … 785 753 1 /*x4GB*/, extra_highbits_memory_size + 1 /*x4GB*/, 1); 786 754 EBX = 0; 755 break; 787 756 } 788 break;789 757 /* fall thru */ 790 #else /* !VBOX */791 /* Mapping of memory above 4 GB */792 set_e820_range(ES, DI, 0x00000000L,793 extra_lowbits_memory_size, 1, extra_highbits_memory_size794 + 1, 1);795 EBX = 0;796 break;797 #endif /* !VBOX */798 758 default: /* AX=E820, DX=534D4150, BX unrecognized */ 799 759 goto int15_unimplemented;
Note:
See TracChangeset
for help on using the changeset viewer.