diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index a7e2e7b9a..843d5204d 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -592,7 +592,7 @@ CPU cpus_PentiumPro[] = {"Pentium II Overdrive 50", CPU_PENTIUM2D, 5, 50000000, 1, 25000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 4,4,3,3}, {"Pentium II Overdrive 60", CPU_PENTIUM2D, 6, 60000000, 1, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6,6,3,3}, {"Pentium II Overdrive 66", CPU_PENTIUM2D, 6, 66666666, 1, 33333333, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6,6,3,3}, - {"Pentium II Overdrive 75", CPU_PENTIUM2D, 9, 75000000, 2, 25000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 7,7,4,4}, + {"Pentium II Overdrive 75", CPU_PENTIUM2D, 9, 75000000, 2, 25000000, 0x654, 0x654, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 7,7,4,4}, {"Pentium II Overdrive 210", CPU_PENTIUM2D, 22, 210000000, 4, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 17,17,7,7}, {"Pentium II Overdrive 233", CPU_PENTIUM2D, 24, 233333333, 4, 33333333, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 21,21,10,1}, {"Pentium II Overdrive 240", CPU_PENTIUM2D, 25, 240000000, 4, 30000000, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 24,24,12,12}, diff --git a/src/cpu/x86_ops_i686.h b/src/cpu/x86_ops_i686.h index a61d27025..f1b824598 100644 --- a/src/cpu/x86_ops_i686.h +++ b/src/cpu/x86_ops_i686.h @@ -46,6 +46,8 @@ static int opSYSENTER(uint32_t fetchdat) uint16_t sysenter_cs_seg_data[4]; uint16_t sysenter_ss_seg_data[4]; + int cycles_old = cycles; UNUSED(cycles_old); + #ifdef SYSENTER_LOG pclog("SYSENTER called\n"); #endif @@ -74,20 +76,22 @@ static int opSYSENTER(uint32_t fetchdat) flags &= ~0x0200; CS = (cs_msr & 0xFFFC); - make_seg_data(sysenter_cs_seg_data, 0, 0xFFFFF, 11, 1, 0, 1, 1, 1, 0); + make_seg_data(sysenter_cs_seg_data, 0, 0xFFFFF, 11, 1, 0, 1, 1, 1, 1); do_seg_load(&_cs, sysenter_cs_seg_data); use32 = 0x300; SS = ((cs_msr + 8) & 0xFFFC); - make_seg_data(sysenter_ss_seg_data, 0, 0xFFFFF, 3, 1, 0, 1, 1, 1, 0); + make_seg_data(sysenter_ss_seg_data, 0, 0xFFFFF, 3, 1, 0, 1, 1, 1, 1); do_seg_load(&_ss, sysenter_ss_seg_data); stack32 = 1; - cycles -= timing_call_pm; + cycles -= timing_call_rm; optype = 0; CPU_BLOCK_END(); + PREFETCH_RUN(cycles_old-cycles, 7, -1, 0,0,cgate16 ? 2:0,cgate16 ? 0:2, 0); + PREFETCH_FLUSH(); #ifdef SYSENTER_LOG pclog("SYSENTER completed:\n"); @@ -105,6 +109,8 @@ static int opSYSEXIT(uint32_t fetchdat) uint16_t sysexit_cs_seg_data[4]; uint16_t sysexit_ss_seg_data[4]; + int cycles_old = cycles; UNUSED(cycles_old); + #ifdef SYSEXIT_LOG pclog("SYSEXIT called\n"); #endif @@ -130,21 +136,23 @@ static int opSYSEXIT(uint32_t fetchdat) cgate16 = cgate32 = 0; \ CS = ((cs_msr + 16) & 0xFFFC) | 3; - make_seg_data(sysexit_cs_seg_data, 0, 0xFFFFF, 11, 1, 3, 1, 1, 1, 0); + make_seg_data(sysexit_cs_seg_data, 0, 0xFFFFF, 11, 1, 3, 1, 1, 1, 1); do_seg_load(&_cs, sysexit_cs_seg_data); use32 = 0x300; SS = CS + 8; - make_seg_data(sysexit_ss_seg_data, 0, 0xFFFFF, 3, 1, 3, 1, 1, 1, 0); + make_seg_data(sysexit_ss_seg_data, 0, 0xFFFFF, 3, 1, 3, 1, 1, 1, 1); do_seg_load(&_ss, sysexit_ss_seg_data); stack32 = 1; flushmmucache_cr3(); - cycles -= timing_call_pm; + cycles -= timing_iret_rm; optype = 0; + flags_extract(); + nmi_enable = 1; CPU_BLOCK_END(); #ifdef SYSEXIT_LOG @@ -155,7 +163,9 @@ static int opSYSEXIT(uint32_t fetchdat) pclog("Other information: eip=%08X esp=%08X eflags=%04X flags=%04X use32=%04X stack32=%i ECX=%08X EDX=%08X\n", cpu_state.pc, ESP, eflags, flags, use32, stack32, ECX, EDX); #endif - return 0; + PREFETCH_RUN(cycles_old-cycles, 1, -1, 0,2,0,0, 1); + PREFETCH_FLUSH(); + return cpu_state.abrt; } static int opFXSAVESTOR_a16(uint32_t fetchdat) diff --git a/src/hdd/hdd_ide_at.c b/src/hdd/hdd_ide_at.c index 4e08941b2..b9c92ba99 100644 --- a/src/hdd/hdd_ide_at.c +++ b/src/hdd/hdd_ide_at.c @@ -221,6 +221,7 @@ void ide_irq_lower(IDE *ide) ide->irqstat=0; } +#if 0 void ide_irq_update(IDE *ide) { int pending = 0; @@ -278,6 +279,8 @@ void ide_irq_update(IDE *ide) } } } +#endif + /** * Copy a string into a buffer, padding with spaces, and placing characters as * if they were packed into 16-bit values, stored little-endian. @@ -926,7 +929,6 @@ void writeide(int ide_board, uint16_t addr, uint8_t val) ide->lba_addr = (ide->lba_addr & 0x0FFFFFF) | ((val & 0xF) << 24); ide_other->lba_addr = (ide_other->lba_addr & 0x0FFFFFF)|((val & 0xF) << 24); - ide_irq_update(ide); return; case 0x1F7: /* Command register */ @@ -1237,9 +1239,10 @@ ide_bad_command: idecallback[ide_board] = 0; timer_update_outstanding(); ide->atastat = ide_other->atastat = BUSY_STAT; + ide_irq_lower(ide); + ide_irq_lower(ide_other); } ide->fdisk = ide_other->fdisk = val; - ide_irq_update(ide); return; } } diff --git a/src/pci.c b/src/pci.c index 5bd236856..21ac26687 100644 --- a/src/pci.c +++ b/src/pci.c @@ -681,7 +681,7 @@ void trc_init(void) { trc_reg = 0; - io_sethandler(0x0cf9, 0x0001, trc_read, NULL, NULL, trc_write, NULL, NULL, NULL); + // io_sethandler(0x0cf9, 0x0001, trc_read, NULL, NULL, trc_write, NULL, NULL, NULL); } void pci_init(int type)