Changeset 63562 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Aug 16, 2016 2:04:03 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 110217
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/ahci.c
r62509 r63562 130 130 #define AHCI_HBA_SIZE 0x100 131 131 132 // @todo:what are the casts good for?132 /// @todo what are the casts good for? 133 133 #define AHCI_REG_CAP ((uint32_t)0x00) 134 134 #define AHCI_REG_GHC ((uint32_t)0x04) … … 443 443 * address registers. 444 444 */ 445 // @todo:merge memsets?445 /// @todo merge memsets? 446 446 _fmemset(&ahci->aCmdHdr[0], 0, sizeof(ahci->aCmdHdr)); 447 447 _fmemset(&ahci->abCmd[0], 0, sizeof(ahci->abCmd)); … … 484 484 * address registers. 485 485 */ 486 // @todo:just one memset?486 /// @todo just one memset? 487 487 _fmemset(&ahci->aCmdHdr[0], 0, sizeof(ahci->aCmdHdr)); 488 488 _fmemset(&ahci->abCmd[0], 0, sizeof(ahci->abCmd)); … … 569 569 } 570 570 571 // @todo:move571 /// @todo move 572 572 #define ATA_DATA_NO 0x00 573 573 #define ATA_DATA_IN 0x01 … … 601 601 bios_dsk->drqp.nsect, bios_dsk->drqp.sect_sz); 602 602 603 bios_dsk->drqp.lba = length << 8; // @todo:xfer length limit603 bios_dsk->drqp.lba = length << 8; /// @todo xfer length limit 604 604 bios_dsk->drqp.buffer = buffer; 605 605 bios_dsk->drqp.nsect = length / bios_dsk->drqp.sect_sz; … … 615 615 616 616 /* Reset transferred counts. */ 617 // @todo:clear in calling code?617 /// @todo clear in calling code? 618 618 bios_dsk->drqp.trsfsectors = 0; 619 619 bios_dsk->drqp.trsfbytes = 0; … … 678 678 DBG_AHCI("AHCI: Device detected on port %d\n", u8Port); 679 679 680 // @todo:Merge common HD/CDROM detection code680 /// @todo Merge common HD/CDROM detection code 681 681 if (devcount_ahci < BX_MAX_AHCI_DEVICES) 682 682 { … … 877 877 * blocks from 2048-byte CD sectors. 878 878 */ 879 ahci->sink_buf_phys = 0xCC000; // @todo:find some better place!879 ahci->sink_buf_phys = 0xCC000; /// @todo find some better place! 880 880 881 881 /* Reset the controller. */ -
trunk/src/VBox/Devices/PC/BIOS/apm.c
r62509 r63562 79 79 #define APM_PORT 0x8900 /* Bochs power control port. */ 80 80 81 // @todo:merge with system.c81 /// @todo merge with system.c 82 82 #define AX r.gr.u.r16.ax 83 83 #define BX r.gr.u.r16.bx … … 160 160 break; 161 161 case APM_RM_CONN: 162 // @todo:validate device ID163 // @todo:validate current connection state164 // @todo:change connection state162 /// @todo validate device ID 163 /// @todo validate current connection state 164 /// @todo change connection state 165 165 break; 166 166 case APM_PM_CONN: 167 // @todo:validate device ID168 // @todo:validate current connection state169 // @todo:change connection state167 /// @todo validate device ID 168 /// @todo validate current connection state 169 /// @todo change connection state 170 170 AX = APM_BIOS_SEG; /* 16-bit PM code segment (RM segment base). */ 171 171 BX = (uint16_t)apm_pm16_entry; /* 16-bit PM entry point offset. */ … … 175 175 break; 176 176 case APM_32_CONN: 177 // @todo:validate device ID178 // @todo:validate current connection state179 // @todo:change connection state177 /// @todo validate device ID 178 /// @todo validate current connection state 179 /// @todo change connection state 180 180 AX = APM_BIOS_SEG; /* 32-bit PM code segment (RM segment base). */ 181 181 BX = (uint16_t)apm_pm32_entry; /* 32-bit entry point offset. */ … … 192 192 break; 193 193 case APM_SET_PWR: 194 // @todo:validate device ID195 // @todo:validate current connection state194 /// @todo validate device ID 195 /// @todo validate current connection state 196 196 switch (CX) { 197 197 case APM_PS_STANDBY: … … 210 210 break; 211 211 case APM_DRV_VER: 212 AX = 0x0102; // @todo:Not right - must take driver version into account!212 AX = 0x0102; /// @todo Not right - must take driver version into account! 213 213 break; 214 214 case APM_DISCONN: 215 // @todo:actually perform a disconnect...215 /// @todo actually perform a disconnect... 216 216 case APM_BUSY: /* Nothing to do as APM Idle doesn't slow CPU clock. */ 217 217 break; 218 218 case APM_GET_EVT: 219 // @todo:error should be different if interface not connected + engaged219 /// @todo error should be different if interface not connected + engaged 220 220 SET_AH(APM_ERR_NO_EVENTS); /* PM events don't happen. */ 221 221 SET_CF(); -
trunk/src/VBox/Devices/PC/BIOS/ata.c
r62509 r63562 379 379 bios_dsk->channels[1].irq = 15; 380 380 #endif 381 #if 0 // @todo - temporarily removed to avoid conflict with AHCI381 #if 0 /// @todo - temporarily removed to avoid conflict with AHCI 382 382 #if BX_MAX_ATA_INTERFACES > 2 383 383 bios_dsk->channels[2].iface = ATA_IFACE_ISA; … … 937 937 938 938 // Reset count of transferred data 939 // @todo:clear in calling code?939 /// @todo clear in calling code? 940 940 bios_dsk->drqp.trsfsectors = 0; 941 941 bios_dsk->drqp.trsfbytes = 0; -
trunk/src/VBox/Devices/PC/BIOS/bios.c
r62509 r63562 155 155 parm [al] modify [ax]; 156 156 157 // @todo:restore157 /// @todo restore 158 158 //#undef VBOX 159 159 -
trunk/src/VBox/Devices/PC/BIOS/boot.c
r62509 r63562 92 92 static const char drivetypes[][10]={"Floppy","Hard Disk","CD-ROM","LAN"}; 93 93 94 // @todo:pass inputs as bit flags rather than bytes?94 /// @todo pass inputs as bit flags rather than bytes? 95 95 void print_boot_device(uint8_t cdboot, uint8_t lanboot, uint8_t drive) 96 96 { … … 114 114 // displays the reason why boot failed 115 115 //-------------------------------------------------------------------------- 116 // @todo:pass inputs as bit flags rather than bytes?116 /// @todo pass inputs as bit flags rather than bytes? 117 117 void print_boot_failure(uint8_t cdboot, uint8_t lanboot, uint8_t drive, 118 118 uint8_t reason, uint8_t lastdrive) … … 156 156 uint32_t BIOSCALL int19_function(uint8_t bseqnr) 157 157 { 158 // @todo:common code for getting the EBDA segment158 /// @todo common code for getting the EBDA segment 159 159 uint16_t ebda_seg=read_word(0x0040,0x000E); 160 160 uint16_t bootseq; -
trunk/src/VBox/Devices/PC/BIOS/disk.c
r62509 r63562 80 80 81 81 82 // @todo:put in a header82 /// @todo put in a header 83 83 #define AX r.gr.u.r16.ax 84 84 #define BX r.gr.u.r16.bx … … 203 203 204 204 /* If required, translate LCHS to LBA and execute command. */ 205 // @todo:The IS_SCSI_DEVICE check should be redundant...205 /// @todo The IS_SCSI_DEVICE check should be redundant... 206 206 if (( (bios_dsk->devices[device].pchs.heads != nlh) || (bios_dsk->devices[device].pchs.spt != nlspt)) || VBOX_IS_SCSI_DEVICE(device)) { 207 207 lba = ((((uint32_t)cylinder * (uint32_t)nlh) + (uint32_t)head) * (uint32_t)nlspt) + (uint32_t)sector - 1; … … 220 220 bios_dsk->drqp.buffer = MK_FP(ES, BX); 221 221 bios_dsk->drqp.nsect = count; 222 bios_dsk->drqp.sect_sz = 512; // @todo:device specific?222 bios_dsk->drqp.sect_sz = 512; /// @todo device specific? 223 223 bios_dsk->drqp.cylinder = cylinder; 224 224 bios_dsk->drqp.head = head; … … 262 262 263 263 // FIXME should set ES & DI 264 // @todo:Actually, the above comment is nonsense.264 /// @todo Actually, the above comment is nonsense. 265 265 266 266 goto int13_success; … … 411 411 bios_dsk->drqp.buffer = MK_FP(segment, offset); 412 412 bios_dsk->drqp.nsect = count; 413 bios_dsk->drqp.sect_sz = 512; // @todo:device specific?413 bios_dsk->drqp.sect_sz = 512; /// @todo device specific? 414 414 bios_dsk->drqp.sector = 0; /* Indicate LBA. */ 415 415 bios_dsk->drqp.dev_id = device; -
trunk/src/VBox/Devices/PC/BIOS/eltorito.c
r62509 r63562 66 66 67 67 68 // @todo:put in a header68 /// @todo put in a header 69 69 #define AX r.gr.u.r16.ax 70 70 #define BX r.gr.u.r16.bx … … 142 142 void BIOSCALL cdemu_init(void) 143 143 { 144 // @TODO:a macro or a function for getting the EBDA segment144 /// @todo a macro or a function for getting the EBDA segment 145 145 uint16_t ebda_seg = read_word(0x0040,0x000E); 146 146 … … 151 151 uint8_t BIOSCALL cdemu_isactive(void) 152 152 { 153 // @TODO:a macro or a function for getting the EBDA segment153 /// @todo a macro or a function for getting the EBDA segment 154 154 uint16_t ebda_seg = read_word(0x0040,0x000E); 155 155 … … 159 159 uint8_t BIOSCALL cdemu_emulated_drive(void) 160 160 { 161 // @TODO:a macro or a function for getting the EBDA segment161 /// @todo a macro or a function for getting the EBDA segment 162 162 uint16_t ebda_seg = read_word(0x0040,0x000E); 163 163 … … 171 171 void BIOSCALL int13_eltorito(disk_regs_t r) 172 172 { 173 // @TODO:a macro or a function for getting the EBDA segment173 /// @todo a macro or a function for getting the EBDA segment 174 174 uint16_t ebda_seg=read_word(0x0040,0x000E); 175 175 cdemu_t __far *cdemu; … … 193 193 case 0x4b: // ElTorito - Terminate disk emu 194 194 // FIXME ElTorito Hardcoded 195 // @todo:maybe our cdemu struct should match El Torito to allow memcpy()?195 /// @todo maybe our cdemu struct should match El Torito to allow memcpy()? 196 196 write_byte(DS,SI+0x00,0x13); 197 197 write_byte(DS,SI+0x01,cdemu->media); … … 240 240 241 241 /* Utility routine to check if a device is a CD-ROM. */ 242 // @todo:this function is kinda useless as the ATAPI type check is obsolete.242 /// @todo this function is kinda useless as the ATAPI type check is obsolete. 243 243 static uint16_t device_is_cdrom(uint8_t device) 244 244 { … … 269 269 uint16_t cdrom_boot(void) 270 270 { 271 // @TODO:a macro or a function for getting the EBDA segment271 /// @todo a macro or a function for getting the EBDA segment 272 272 uint16_t ebda_seg=read_word(0x0040,0x000E); 273 273 uint8_t buffer[2048]; … … 314 314 if (buffer[0] != 0) 315 315 return 4; 316 // @todo:what's wrong with memcmp()?316 /// @todo what's wrong with memcmp()? 317 317 for (i = 0; i < 5; ++i) { 318 318 if (buffer[1+i] != isotag[i]) … … 341 341 return 7; 342 342 343 // @todo:Define a struct for the Boot Catalog, the hardcoded offsets are so dumb...343 /// @todo Define a struct for the Boot Catalog, the hardcoded offsets are so dumb... 344 344 345 345 /* Check if the Boot Catalog looks valid. */ … … 464 464 void BIOSCALL int13_cdemu(disk_regs_t r) 465 465 { 466 // @TODO:a macro or a function for getting the EBDA segment466 /// @todo a macro or a function for getting the EBDA segment 467 467 uint16_t ebda_seg=read_word(0x0040,0x000E); 468 468 uint8_t device, status; … … 628 628 /* Only set the DPT pointer for emulated floppies. */ 629 629 if (cdemu->media < 4) { 630 DI = (uint16_t)&diskette_param_table; // @todo:should this depend on emulated medium?631 ES = 0xF000; // @todo:how to make this relocatable?630 DI = (uint16_t)&diskette_param_table; /// @todo should this depend on emulated medium? 631 ES = 0xF000; /// @todo how to make this relocatable? 632 632 } 633 633 goto int13_success; … … 852 852 // FIXME should handle 0xb5 valid request failed 853 853 854 #if 0 // @todo:implement!854 #if 0 /// @todo implement! 855 855 // Call removable media eject 856 856 ASM_START … … 876 876 break; 877 877 878 // @todo:Part of this should be merged with analogous code in disk.c878 /// @todo Part of this should be merged with analogous code in disk.c 879 879 case 0x48: // IBM/MS get drive parameters 880 880 dpt = DS :> (dpt_t *)SI; -
trunk/src/VBox/Devices/PC/BIOS/floppy.c
r62509 r63562 345 345 // 111 all other formats/drives 346 346 347 // @todo:break out drive type determination347 /// @todo break out drive type determination 348 348 drive_type = inb_cmos(0x10); 349 349 if (drive == 0) … … 431 431 432 432 // check CMOS to see if drive exists 433 // @todo:break out drive type determination433 /// @todo break out drive type determination 434 434 drive_type = inb_cmos(0x10); 435 435 if (drive == 0) … … 440 440 } 441 441 442 // @todo:put in a header442 /// @todo put in a header 443 443 #define AX r.gr.u.r16.ax 444 444 #define BX r.gr.u.r16.bx … … 477 477 return; 478 478 } 479 // @todo:break out drive type determination479 /// @todo break out drive type determination 480 480 drive_type = inb_cmos(0x10); 481 481 if (drive == 0) … … 559 559 // port 04: DMA-1 base and current address, channel 2 560 560 // port 05: DMA-1 base and current count, channel 2 561 // @todo:merge/factor out pointer normalization561 /// @todo merge/factor out pointer normalization 562 562 page = (ES >> 12); // upper 4 bits 563 563 base_es = (ES << 4); // lower 16bits contributed by ES … … 706 706 // port 04: DMA-1 base and current address, channel 2 707 707 // port 05: DMA-1 base and current count, channel 2 708 // @todo:merge/factor out pointer normalization708 /// @todo merge/factor out pointer normalization 709 709 page = (ES >> 12); // upper 4 bits 710 710 base_es = (ES << 4); // lower 16bits contributed by ES … … 882 882 883 883 // set up DMA controller for transfer 884 // @todo:merge/factor out pointer normalization884 /// @todo merge/factor out pointer normalization 885 885 page = (ES >> 12); // upper 4 bits 886 886 base_es = (ES << 4); // lower 16bits contributed by ES … … 1016 1016 } 1017 1017 1018 // @todo:break out drive type determination1018 /// @todo break out drive type determination 1019 1019 drive_type = inb_cmos(0x10); 1020 1020 num_floppies = 0; … … 1076 1076 1077 1077 /* set es & di to point to 11 byte diskette param table in ROM */ 1078 ES = 0xF000; // @todo:any way to make this relocatable?1078 ES = 0xF000; /// @todo any way to make this relocatable? 1079 1079 DI = get_floppy_dpt(drive_type); 1080 1080 CLEAR_CF(); // success … … 1091 1091 return; 1092 1092 } 1093 // @todo:break out drive type determination1093 /// @todo break out drive type determination 1094 1094 drive_type = inb_cmos(0x10); 1095 1095 if (drive == 0) … … 1235 1235 } 1236 1236 1237 // @todo:break out drive type determination1237 /// @todo break out drive type determination 1238 1238 drive_type = inb_cmos(0x10); 1239 1239 if (drive == 0) … … 1305 1305 1306 1306 // set es & di to point to 11 byte diskette param table in ROM 1307 ES = 0xF000; // @todo:any way to make this relocatable?1307 ES = 0xF000; /// @todo any way to make this relocatable? 1308 1308 DI = get_floppy_dpt(drive_type); 1309 1309 -
trunk/src/VBox/Devices/PC/BIOS/keyboard.c
r62509 r63562 354 354 355 355 /* Keyboard hardware interrupt handler. */ 356 // @todo:should this be declared as taking arguments at all?356 /// @todo should this be declared as taking arguments at all? 357 357 void BIOSCALL int09_function(uint16_t ES, uint16_t DI, uint16_t SI, uint16_t BP, uint16_t SP, 358 358 uint16_t BX, uint16_t DX, uint16_t CX, uint16_t AX) … … 474 474 ; /* Hold on and wait... */ 475 475 476 // @todo:We will send EOI again (and enable keyboard) on the way out; we shouldn't476 /// @todo We will send EOI again (and enable keyboard) on the way out; we shouldn't 477 477 } 478 478 break; … … 512 512 mf2_flags |= 0x04; 513 513 write_byte(0x0040, 0x18, mf2_flags); 514 // @todo:EOI/enable kbd/enable interrupts/call INT 15h/8500h514 /// @todo EOI/enable kbd/enable interrupts/call INT 15h/8500h 515 515 } 516 516 break; … … 519 519 mf2_flags &= ~0x04; 520 520 write_byte(0x0040, 0x18, mf2_flags); 521 // @todo:EOI/enable kbd/enable interrupts/call INT 15h/8501h521 /// @todo EOI/enable kbd/enable interrupts/call INT 15h/8501h 522 522 break; 523 523 … … 635 635 636 636 637 // @todo:move somewhere else?637 /// @todo move somewhere else? 638 638 #define AX r.gr.u.r16.ax 639 639 #define BX r.gr.u.r16.bx … … 658 658 led_flags = read_byte(0x0040, 0x97); 659 659 if ((((shift_flags >> 4) & 0x07) ^ (led_flags & 0x07)) != 0) { 660 int_disable(); // @todo:interrupts should be disabled already??660 int_disable(); /// @todo interrupts should be disabled already?? 661 661 outb(0x60, 0xed); 662 662 while ((inb(0x64) & 0x01) == 0) outb(0x80, 0x21); … … 730 730 count = 2; 731 731 kbd_code = 0x0; 732 // @todo:Might be better to just mask the KB interrupt732 /// @todo Might be better to just mask the KB interrupt 733 733 int_disable(); 734 734 outb(0x60, 0xf2); … … 791 791 break; 792 792 793 // @todo:what's the point of handling this??793 /// @todo what's the point of handling this?? 794 794 #if 0 795 795 case 0x6F: -
trunk/src/VBox/Devices/PC/BIOS/logo.c
r62509 r63562 66 66 * @returns True if keystroke available, False if not. 67 67 */ 68 // @todo:INT 16h should already be returning the right value in al; could also use setz68 /// @todo INT 16h should already be returning the right value in al; could also use setz 69 69 uint8_t check_for_keystroke(void); 70 70 #pragma aux check_for_keystroke = \ … … 92 92 93 93 94 // @todo:This whole business with reprogramming the PIT is rather suspect.94 /// @todo This whole business with reprogramming the PIT is rather suspect. 95 95 // The BIOS already has waiting facilities in INT 15h (fn 83h, 86h) which 96 96 // should be utilized instead. … … 107 107 modify [ax] nomemory; 108 108 109 // @todo:using this private interface is not great109 /// @todo using this private interface is not great 110 110 extern void rtc_post(void); 111 111 #pragma aux rtc_post "*"; -
trunk/src/VBox/Devices/PC/BIOS/pcibios.c
r62509 r63562 53 53 }; 54 54 55 // @todo:merge with system.c55 /// @todo merge with system.c 56 56 #define AX r.gr.u.r16.ax 57 57 #define BX r.gr.u.r16.bx … … 134 134 #else 135 135 136 // @todo:merge with AHCI code136 /// @todo merge with AHCI code 137 137 138 138 /* Warning: Destroys high bits of EAX. */ … … 323 323 AX = 0x0001; /* Configuration mechanism #1 supported. */ 324 324 BX = 0x0210; /* Version 2.1. */ 325 // @todo:return true max bus # in CL325 /// @todo return true max bus # in CL 326 326 CX = 0; /* Maximum bus number. */ 327 327 EDX = 'P' | ('C' << 8) | ((uint32_t)'I' << 16) | ((uint32_t)' ' << 24); -
trunk/src/VBox/Devices/PC/BIOS/scsi.c
r62509 r63562 295 295 296 296 297 // @todo:move297 /// @todo move 298 298 #define ATA_DATA_NO 0x00 299 299 #define ATA_DATA_IN 0x01 -
trunk/src/VBox/Devices/PC/BIOS/system.c
r60887 r63562 53 53 #define UNSUPPORTED_FUNCTION 0x86 /* Specific to INT 15h. */ 54 54 55 #define BIOS_CONFIG_TABLE 0xe6f5 /* TODO:configurable? put elsewhere? */56 57 #define ACPI_DATA_SIZE 0x00010000L /* TODO:configurable? put elsewhere? */55 #define BIOS_CONFIG_TABLE 0xe6f5 /** @todo configurable? put elsewhere? */ 56 57 #define ACPI_DATA_SIZE 0x00010000L /** @todo configurable? put elsewhere? */ 58 58 59 59 #define BX_CPU 3 … … 266 266 parm [ax] modify nomemory aborts; 267 267 268 // @todo:This method is silly. The RTC should be programmed to fire an interrupt268 /// @todo This method is silly. The RTC should be programmed to fire an interrupt 269 269 // instead of hogging the CPU with inaccurate code. 270 270 void timer_wait(uint32_t usec_wait) … … 328 328 } 329 329 330 // @todo:move elsewhere?330 /// @todo move elsewhere? 331 331 #define AX r.gr.u.r16.ax 332 332 #define BX r.gr.u.r16.bx … … 400 400 break; 401 401 402 // @todo:Why does this need special handling? All we need is to set CF402 /// @todo Why does this need special handling? All we need is to set CF 403 403 // but not handle this as an unknown function (regardless of CPU type). 404 404 case 0x4f: … … 478 478 479 479 // turn off interrupts 480 int_disable(); // @todo:aren't they off already?480 int_disable(); /// @todo aren't they off already? 481 481 482 482 set_enable_a20(1); // enable A20 line; we're supposed to fail if that fails … … 834 834 835 835 // turn off interrupts 836 int_disable(); // @todo:aren't they disabled already?836 int_disable(); /// @todo aren't they disabled already? 837 837 838 838 prev_a20_enable = set_enable_a20(1); // enable A20 line -
trunk/src/VBox/Devices/PC/BIOS/timepci.c
r62509 r63562 143 143 } 144 144 145 // @todo:the coding style WRT register access is totally inconsistent145 /// @todo the coding style WRT register access is totally inconsistent 146 146 // in the following routines 147 147 -
trunk/src/VBox/Devices/PC/DevDMA.cpp
r63369 r63562 771 771 if (IS_MODE_DEC(ch->u8Mode)) 772 772 { 773 // @todo:This would need a temporary buffer.773 /// @todo This would need a temporary buffer. 774 774 Assert(0); 775 775 #if 0 -
trunk/src/VBox/Devices/PC/DevHPET.cpp
r62903 r63562 415 415 * HACK ALERT! Avoid killing VM with interrupts. 416 416 */ 417 #if 1 /** @todo :HACK, rethink, may have negative impact on the guest */417 #if 1 /** @todo HACK, rethink, may have negative impact on the guest */ 418 418 if (u64Diff == 0) 419 419 u64Diff = 100000; /* 1 millisecond */ … … 994 994 static void hpetR3TimerUpdateIrq(HPET *pThis, struct HPETTIMER *pHpetTimer) 995 995 { 996 /** @todo :is it correct? */996 /** @todo is it correct? */ 997 997 if ( !!(pHpetTimer->u64Config & HPET_TN_ENABLE) 998 998 && !!(pThis->u64HpetConfig & HPET_CFG_ENABLE)) … … 1011 1011 else 1012 1012 AssertFailed(); 1013 /** @todo :implement IRQs in level-triggered mode */1013 /** @todo implement IRQs in level-triggered mode */ 1014 1014 } 1015 1015 }
Note:
See TracChangeset
for help on using the changeset viewer.