Changeset 985 in vbox for trunk/src/VBox/Devices/PC/BIOS
- Timestamp:
- Feb 19, 2007 3:27:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS/rombios.c
r155 r985 2330 2330 } 2331 2331 2332 #ifdef VBOX 2333 // Enable interrupts 2334 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2335 #endif /* VBOX */ 2336 2332 2337 type=read_byte(ebda_seg,&EbdaData->ata.devices[device].type); 2333 2338 … … 2664 2669 #ifdef VBOX 2665 2670 status = inb(iobase1 + ATA_CB_STAT); 2666 if (status & ATA_CB_STAT_BSY) return 1; 2671 if (status & ATA_CB_STAT_BSY) 2672 { 2673 // Enable interrupts 2674 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2675 return 1; 2676 } 2667 2677 #endif /* VBOX */ 2668 2678 … … 2716 2726 if (status & ATA_CB_STAT_ERR) { 2717 2727 BX_DEBUG_ATA("ata_cmd_data_in : read error\n"); 2728 #ifdef VBOX 2729 // Enable interrupts 2730 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2731 #endif /* VBOX */ 2718 2732 return 2; 2719 2733 } else if ( !(status & ATA_CB_STAT_DRQ) ) { 2720 2734 BX_DEBUG_ATA("ata_cmd_data_in : DRQ not set (status %02x)\n", (unsigned) status); 2735 #ifdef VBOX 2736 // Enable interrupts 2737 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2738 #endif /* VBOX */ 2721 2739 return 3; 2722 2740 } … … 2784 2802 != ATA_CB_STAT_RDY ) { 2785 2803 BX_DEBUG_ATA("ata_cmd_data_in : no sectors left (status %02x)\n", (unsigned) status); 2804 #ifdef VBOX 2805 // Enable interrupts 2806 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2807 #endif /* VBOX */ 2786 2808 return 4; 2787 2809 } … … 2792 2814 != (ATA_CB_STAT_RDY | ATA_CB_STAT_DRQ) ) { 2793 2815 BX_DEBUG_ATA("ata_cmd_data_in : more sectors left (status %02x)\n", (unsigned) status); 2816 #ifdef VBOX 2817 // Enable interrupts 2818 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2819 #endif /* VBOX */ 2794 2820 return 5; 2795 2821 } … … 2835 2861 #ifdef VBOX 2836 2862 status = inb(iobase1 + ATA_CB_STAT); 2837 if (status & ATA_CB_STAT_BSY) return 1; 2863 if (status & ATA_CB_STAT_BSY) 2864 { 2865 // Enable interrupts 2866 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2867 return 1; 2868 } 2838 2869 #endif /* VBOX */ 2839 2870 … … 2887 2918 if (status & ATA_CB_STAT_ERR) { 2888 2919 BX_DEBUG_ATA("ata_cmd_data_out : read error\n"); 2920 #ifdef VBOX 2921 // Enable interrupts 2922 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2923 #endif /* VBOX */ 2889 2924 return 2; 2890 2925 } else if ( !(status & ATA_CB_STAT_DRQ) ) { 2891 2926 BX_DEBUG_ATA("ata_cmd_data_out : DRQ not set (status %02x)\n", (unsigned) status); 2927 #ifdef VBOX 2928 // Enable interrupts 2929 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 2930 #endif /* VBOX */ 2892 2931 return 3; 2893 2932 } … … 2957 2996 != ATA_CB_STAT_RDY ) { 2958 2997 BX_DEBUG_ATA("ata_cmd_data_out : no sectors left (status %02x)\n", (unsigned) status); 2998 #ifdef VBOX 2999 // Enable interrupts 3000 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3001 #endif /* VBOX */ 2959 3002 return 6; 2960 3003 } … … 2965 3008 != (ATA_CB_STAT_RDY | ATA_CB_STAT_DRQ) ) { 2966 3009 BX_DEBUG_ATA("ata_cmd_data_out : more sectors left (status %02x)\n", (unsigned) status); 3010 #ifdef VBOX 3011 // Enable interrupts 3012 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3013 #endif /* VBOX */ 2967 3014 return 7; 2968 3015 } … … 3045 3092 if (status & ATA_CB_STAT_ERR) { 3046 3093 BX_DEBUG_ATA("ata_cmd_packet : error, status is %02x\n",status); 3094 #ifdef VBOX 3095 // Enable interrupts 3096 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3097 #endif /* VBOX */ 3047 3098 return 3; 3048 3099 } else if ( !(status & ATA_CB_STAT_DRQ) ) { 3049 3100 BX_DEBUG_ATA("ata_cmd_packet : DRQ not set (status %02x)\n", (unsigned) status); 3101 #ifdef VBOX 3102 // Enable interrupts 3103 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3104 #endif /* VBOX */ 3050 3105 return 4; 3051 3106 } … … 3096 3151 if (status & ATA_CB_STAT_ERR) { 3097 3152 BX_DEBUG_ATA("ata_cmd_packet : error (status %02x)\n",status); 3153 #ifdef VBOX 3154 // Enable interrupts 3155 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3156 #endif /* VBOX */ 3098 3157 return 3; 3099 3158 } … … 3103 3162 != (ATA_CB_STAT_RDY | ATA_CB_STAT_DRQ) ) { 3104 3163 BX_DEBUG_ATA("ata_cmd_packet : not ready (status %02x)\n", status); 3164 #ifdef VBOX 3165 // Enable interrupts 3166 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3167 #endif /* VBOX */ 3105 3168 return 4; 3106 3169 } … … 3247 3310 != ATA_CB_STAT_RDY ) { 3248 3311 BX_DEBUG_ATA("ata_cmd_packet : not ready (status %02x)\n", (unsigned) status); 3312 #ifdef VBOX 3313 // Enable interrupts 3314 outb(iobase2+ATA_CB_DC, ATA_CB_DC_HD15); 3315 #endif /* VBOX */ 3249 3316 return 4; 3250 3317 } … … 4326 4393 extended_memory_size *= 1024; 4327 4394 extended_memory_size += (16L * 1024 * 1024); 4328 4395 4329 4396 if(extended_memory_size <= (16L * 1024 * 1024)) { 4330 4397 extended_memory_size = inb_cmos(0x31); … … 4387 4454 break; 4388 4455 case 4: 4389 set_e820_range(ES, regs.u.r16.di, 4390 extended_memory_size - ACPI_DATA_SIZE, 4456 set_e820_range(ES, regs.u.r16.di, 4457 extended_memory_size - ACPI_DATA_SIZE, 4391 4458 extended_memory_size, 3); // ACPI RAM 4392 4459 regs.u.r32.ebx = 5; … … 9936 10003 mov edi, #0x00040000 9937 10004 mov ecx, #0x10000 / 4 9938 rep 10005 rep 9939 10006 movsd 9940 10007 … … 9991 10058 rombios32_gdt_48: 9992 10059 dw 0x30 9993 dw rombios32_gdt 10060 dw rombios32_gdt 9994 10061 dw 0x000f 9995 10062
Note:
See TracChangeset
for help on using the changeset viewer.