Changeset 75229 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Nov 2, 2018 3:21:49 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/PC/BIOS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/orgs.asm
r69300 r75229 125 125 extrn _int15_function:near 126 126 extrn _int15_function_mouse:near 127 extrn _int15_function32:near128 127 extrn _int16_function:near 129 128 extrn _int17_function:near … … 149 148 endif 150 149 if VBOX_BIOS_CPU ge 80386 150 extrn _int15_function32:near 151 151 extrn _apic_setup:near 152 152 endif … … 1723 1723 push es 1724 1724 C_SETUP 1725 cmp ah, 86h 1726 je int15_handler32 1725 if VBOX_BIOS_CPU ge 80386 1726 ;; int15_function32 exists in 386+ BIOS only, but INT 15h is 1727 ;; not 386-specific 1727 1728 cmp ah, 0E8h 1728 1729 je int15_handler32 1729 1730 cmp ah, 0d0h 1730 1731 je int15_handler32 1732 endif 1731 1733 DO_pusha 1732 1734 cmp ah, 53h ; APM function? … … 1738 1740 int15_handler_popa_ret: 1739 1741 DO_popa 1742 if VBOX_BIOS_CPU ge 80386 1740 1743 int15_handler32_ret: 1744 endif 1741 1745 pop es 1742 1746 pop ds … … 1752 1756 jmp int15_handler_popa_ret 1753 1757 1758 if VBOX_BIOS_CPU ge 80386 1754 1759 int15_handler32: 1755 if VBOX_BIOS_CPU ge 803861756 1760 ;; need to save/restore 32-bit registers 1757 1761 .386 … … 1760 1764 popad 1761 1765 .286 1762 else1763 DO_pusha1764 call _int15_function321765 DO_popa1766 endif1767 1766 jmp int15_handler32_ret 1767 endif 1768 1768 1769 1769 ;; -
trunk/src/VBox/Devices/PC/BIOS/system.c
r74612 r75229 71 71 #define ACPI_DATA_SIZE 0x00010000L /** @todo configurable? put elsewhere? */ 72 72 73 #define BX_CPU 374 75 73 extern int pmode_IDT; 76 74 extern int rmode_IDT; … … 324 322 325 323 return((oldval & 0x02) != 0); 326 }327 328 typedef struct {329 uint32_t start;330 uint32_t xstart;331 uint32_t len;332 uint32_t xlen;333 uint32_t type;334 } mem_range_t;335 336 void set_e820_range(uint16_t ES, uint16_t DI, uint32_t start, uint32_t end,337 uint8_t extra_start, uint8_t extra_end, uint16_t type)338 {339 mem_range_t __far *range;340 341 range = ES :> (mem_range_t *)DI;342 range->start = start;343 range->xstart = extra_start;344 end -= start;345 extra_end -= extra_start;346 range->len = end;347 range->xlen = extra_end;348 range->type = type;349 324 } 350 325 … … 428 403 case 0x4f: 429 404 /* keyboard intercept */ 430 #if BX_CPU < 2 405 #if VBOX_BIOS_CPU >= 80286 406 // nop 407 #else 431 408 SET_AH(UNSUPPORTED_FUNCTION); 432 #else433 // nop434 409 #endif 435 410 SET_CF(); … … 478 453 } 479 454 455 case 0x86: 456 // Wait for CX:DX microseconds. currently using the 457 // refresh request port 0x61 bit4, toggling every 15usec 458 int_enable(); 459 timer_wait(((uint32_t)CX << 16) | DX); 460 break; 461 480 462 case 0x88: 481 463 // Get the amount of extended memory (above 1M) 482 #if BX_CPU < 2 483 SET_AH(UNSUPPORTED_FUNCTION); 484 SET_CF(); 485 #else 464 #if VBOX_BIOS_CPU >= 80286 486 465 AX = (inb_cmos(0x31) << 8) | inb_cmos(0x30); 487 466 … … 492 471 493 472 CLEAR_CF(); 473 #else 474 SET_AH(UNSUPPORTED_FUNCTION); 475 SET_CF(); 494 476 #endif 495 477 break; … … 588 570 } 589 571 572 #if VBOX_BIOS_CPU >= 80386 573 574 typedef struct { 575 uint32_t start; 576 uint32_t xstart; 577 uint32_t len; 578 uint32_t xlen; 579 uint32_t type; 580 } mem_range_t; 581 582 void set_e820_range(uint16_t reg_ES, uint16_t reg_DI, uint32_t start, uint32_t end, 583 uint8_t extra_start, uint8_t extra_end, uint16_t type) 584 { 585 mem_range_t __far *range; 586 587 range = reg_ES :> (mem_range_t *)reg_DI; 588 range->start = start; 589 range->xstart = extra_start; 590 end -= start; 591 extra_end -= extra_start; 592 range->len = end; 593 range->xlen = extra_end; 594 range->type = type; 595 } 596 590 597 void BIOSCALL int15_function32(sys32_regs_t r) 591 598 { … … 598 605 599 606 switch (GET_AH()) { 600 case 0x86:601 // Wait for CX:DX microseconds. currently using the602 // refresh request port 0x61 bit4, toggling every 15usec603 int_enable();604 timer_wait(((uint32_t)CX << 16) | DX);605 break;606 607 607 case 0xd0: 608 608 if (GET_AL() != 0x4f) … … 840 840 } 841 841 } 842 #endif /* VBOX_BIOS_CPU >= 80386 */ 842 843 843 844 #if VBOX_BIOS_CPU >= 80286 … … 930 931 CLEAR_CF(); 931 932 } 932 #endif 933 #endif /* VBOX_BIOS_CPU >= 80286 */
Note:
See TracChangeset
for help on using the changeset viewer.