Changeset 18574 in vbox for trunk/src/VBox/Devices/PC/BIOS/rombios.c
- Timestamp:
- Mar 31, 2009 2:00:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r18324 r18574 336 336 337 337 mov cx, 10[bp] ; count 338 cmp cx, #0x00338 test cx, cx 339 339 je memsetb_end 340 340 mov ax, 4[bp] ; segment … … 426 426 427 427 mov cx, 12[bp] ; count 428 cmp cx, #0x0000428 test cx, cx 429 429 je memcpyd_end 430 430 mov ax, 4[bp] ; dsegment … … 473 473 mov bx, 6[bp] ; offset 474 474 mov ax, [bx] 475 inc bx 476 inc bx 475 add bx, #2 477 476 mov dx, [bx] 478 477 ;; ax = return value (word) … … 503 502 mov ax, 8[bp] ; data word 504 503 mov [bx], ax ; write data word 505 inc bx 506 inc bx 504 add bx, #2 507 505 mov ax, 10[bp] ; data word 508 506 mov [bx], ax ; write data word … … 541 539 and eax, #0x0000FFFF 542 540 shl ebx, #16 543 addeax, ebx541 or eax, ebx 544 542 shr ebx, #16 545 543 SEG SS … … 561 559 and eax, #0x0000FFFF 562 560 shl ebx, #16 563 addeax, ebx561 or eax, ebx 564 562 SEG SS 565 563 mul eax, dword ptr [di] … … 596 594 and eax, #0x0000FFFF 597 595 shl ebx, #16 598 addeax, ebx596 or eax, ebx 599 597 shr ebx, #16 600 598 test eax, eax … … 607 605 and eax, #0x0000FFFF 608 606 shl ebx, #16 609 addeax, ebx607 or eax, ebx 610 608 lsr_loop: 611 609 shr eax, #1 … … 623 621 and eax, #0x0000FFFF 624 622 shl ebx, #16 625 addeax, ebx623 or eax, ebx 626 624 lsl_loop: 627 625 shl eax, #1 … … 645 643 and eax, #0x0000FFFF 646 644 shl ebx, #16 647 addeax, ebx645 or eax, ebx 648 646 xor edx, edx 649 647 SEG SS … … 707 705 Bit8u removable; // Removable device flag 708 706 Bit8u lock; // Locks for removable devices 709 // Bit8u lba_capable; // LBA capable flag - always yes for bochs devices 710 Bit8u mode; // transfert mode : PIO 16/32 bits - IRQ - ISADMA - PCIDMA 707 Bit8u mode; // transfer mode : PIO 16/32 bits - IRQ - ISADMA - PCIDMA 711 708 Bit16u blksize; // block size 712 709 … … 2421 2418 sc = inb(iobase1+ATA_CB_SC); 2422 2419 sn = inb(iobase1+ATA_CB_SN); 2423 2424 2420 if ((sc==0x01) && (sn==0x01)) { 2425 2421 cl = inb(iobase1+ATA_CB_CL); … … 2678 2674 write_byte(get_SS(),model+(i*2),read_byte(get_SS(),buffer+(i*2)+54+1)); 2679 2675 write_byte(get_SS(),model+(i*2)+1,read_byte(get_SS(),buffer+(i*2)+54)); 2680 2676 } 2681 2677 2682 2678 // Reformat … … 3756 3752 write_word(ebda_seg,&EbdaData->cdemu.vdevice.spt,read_byte(boot_segment,446+6)&0x3f); 3757 3753 write_word(ebda_seg,&EbdaData->cdemu.vdevice.cylinders, 3758 3754 (read_byte(boot_segment,446+6)<<2) + read_byte(boot_segment,446+7) + 1); 3759 3755 write_word(ebda_seg,&EbdaData->cdemu.vdevice.heads,read_byte(boot_segment,446+5) + 1); 3760 3756 break; … … 4590 4586 } 4591 4587 } 4592 #endif 4588 #endif // BX_USE_PS2_MOUSE 4593 4589 4594 4590 … … 4598 4594 Bit32u start; 4599 4595 Bit32u end; 4600 Bit8u 4601 Bit8u 4596 Bit8u extra_start; 4597 Bit8u extra_end; 4602 4598 Bit16u type; 4603 4599 { … … 4819 4815 regs.u.r32.ecx = 0x14; 4820 4816 CLEAR_CF(); 4821 4822 4823 4824 4817 } else { 4818 // if DX != 0x534D4150) 4819 goto int15_unimplemented; 4820 } 4825 4821 break; 4826 4822 … … 4854 4850 regs.u.r16.bx = regs.u.r16.dx; 4855 4851 break; 4856 4857 4852 default: /* AH=0xE8?? but not implemented */ 4853 goto int15_unimplemented; 4858 4854 } 4859 4855 break; … … 4966 4962 } 4967 4963 } while (--count>0); 4968 4964 } 4969 4965 } 4970 4966 BX=kbd_code; … … 5009 5005 case 0x6F: 5010 5006 if (GET_AL() == 0x08) 5011 5007 SET_AH(0x02); // unsupported, aka normal keyboard 5012 5008 5013 5009 default: … … 5236 5232 default: 5237 5233 if (scancode & 0x80) { 5238 5234 break; /* toss key releases ... */ 5239 5235 } 5240 5236 if (scancode > MAX_SCAN_CODE) { … … 5423 5419 if (!VBOX_IS_SCSI_DEVICE(device)) 5424 5420 #endif 5425 5421 ata_reset (device); 5426 5422 goto int13_success; 5427 5423 break; … … 6096 6092 6097 6093 mov ah, #0x52 6098 int 156094 int #0x15 6099 6095 mov _int13_cdrom.status + 2[bp], ah 6100 6096 jnc int13_cdrom_rme_end … … 7165 7161 if (hd_type != 0x0f) 7166 7162 BX_INFO(panic_msg_reg12h,1); 7167 hd_type = inb_cmos(0x1a); // HD 0: extended type7163 hd_type = inb_cmos(0x1a); // HD1: extended type 7168 7164 if (hd_type != 47) 7169 7165 BX_INFO(panic_msg_reg19h,0,0x1a); … … 7184 7180 #endif //else BX_USE_ATADRV 7185 7181 7182 #if BX_SUPPORT_FLOPPY 7186 7183 7187 7184 ////////////////////// … … 7464 7461 } 7465 7462 7466 #if BX_SUPPORT_FLOPPY7467 7463 void 7468 7464 int13_diskette_function(DS, ES, DI, SI, BP, ELDX, BX, DX, CX, AX, IP, CS, FLAGS) … … 8764 8760 } else if (regs.u.r8.bl == 0x86) { 8765 8761 if (regs.u.r8.al == 0x02) { 8766 BX_INFO("PCI device %04x:%04x not found at index %d\n", regs.u.r16.dx, regs.u.r16.cx, regs.u.r16.si);8762 BX_INFO("PCI device %04x:%04x not found at index %d\n", regs.u.r16.dx, regs.u.r16.cx, regs.u.r16.si); 8767 8763 } else { 8768 BX_INFO("no PCI device with class code 0x%02x%04x found at index %d\n", regs.u.r8.cl, regs.u.r16.dx, regs.u.r16.si);8764 BX_INFO("no PCI device with class code 0x%02x%04x found at index %d\n", regs.u.r8.cl, regs.u.r16.dx, regs.u.r16.si); 8769 8765 } 8770 8766 } … … 9070 9066 iret 9071 9067 9072 9073 9068 ;---------- 9074 9069 ;- INT18h - … … 9103 9098 9104 9099 ;; int19 was beginning to be really complex, so now it 9105 ;; just calls a n C function,that does the work9100 ;; just calls a C function that does the work 9106 9101 ;; it returns in BL the boot drive, and in AX the boot segment 9107 9102 ;; the boot segment will be 0x0000 if something has failed … … 9717 9712 pop ax 9718 9713 iret 9714 9719 9715 9720 9716 ;-------------------- … … 10785 10781 mov ax, #0x8080 10786 10782 out dx, ax ;; reset PIRQ route control 10787 inc dx 10788 inc dx 10783 add dx, #2 10789 10784 out dx, ax 10790 10785 mov ax, [si+6] … … 10863 10858 pop ds 10864 10859 ret 10865 #endif // BX_ROMBIOS3210860 #endif // !BX_ROMBIOS32 10866 10861 #endif // BX_PCIBIOS 10867 10862 … … 10975 10970 dw 0xffff, 0, 0x9b0f, 0x0000 ; 16 bit code segment base=0xf0000 limit=0xffff 10976 10971 dw 0xffff, 0, 0x9300, 0x0000 ; 16 bit data segment base=0x0 limit=0xffff 10977 #endif 10972 #endif // BX_ROMBIOS32 10978 10973 10979 10974 … … 11245 11240 post_default_ints: 11246 11241 mov [bx], ax 11247 inc bx 11248 inc bx 11242 add bx, #2 11249 11243 mov [bx], dx 11250 inc bx 11251 inc bx 11244 add bx, #2 11252 11245 loop post_default_ints 11253 11246 … … 11474 11467 sti ;; enable interrupts 11475 11468 int #0x19 11476 11477 11469 11478 11470 .org 0xe2c3 ; NMI Handler Entry Point … … 11708 11700 jmp int09_done 11709 11701 11710 int09_check_pause: 11702 int09_check_pause: ;; check for pause key 11711 11703 cmp al, #0xe1 11712 11704 jne int09_process_key
Note:
See TracChangeset
for help on using the changeset viewer.