Changeset 14742 in vbox
- Timestamp:
- Nov 27, 2008 8:49:11 PM (16 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
r14707 r14742 75 75 * Define this to flip the 15usec refresh bit on every read. 76 76 * If not defined, it will be flipped correctly. */ 77 #define FAKE_REFRESH_CLOCK 77 /* #define FAKE_REFRESH_CLOCK */ 78 78 #ifdef DOXYGEN_RUNNING 79 79 # define FAKE_REFRESH_CLOCK … … 648 648 /* bit 5 - mirrors timer 2 output condition. */ 649 649 const int fOut = pit_get_out(pThis, 2, u64Now); 650 /* bit 4 - toggled every with each (DRAM?) refresh request, every 15.085 µs. */ 650 /* bit 4 - toggled with each (DRAM?) refresh request, every 15085 µs. 651 our timer resolution is around 100-1000 µs, thus we can just flip 652 on every increase of quotient by 1 653 */ 651 654 #ifdef FAKE_REFRESH_CLOCK 652 655 pThis->dummy_refresh_clock ^= 1; 653 656 const int fRefresh = pThis->dummy_refresh_clock; 654 657 #else 655 /* To make refresh info statistically correct */ 656 const int freq = 15085; 657 const int fRefresh = ((u64Now % freq ) > (freq / 2)) ? 1 : 0; 658 const int fRefresh = (u64Now / 15085 ) & 1; 658 659 #endif 659 660 /* bit 2,3 NMI / parity status stuff. */ -
trunk/src/recompiler_new/VBoxRecompiler.c
r14475 r14742 1454 1454 bool remR3IsMonitored(CPUState *env, RTGCPTR GCPtr) 1455 1455 { 1456 return PGMHandlerIsAddressMonitored(env->pVM, GCPtr);1456 return PGMHandlerIsAddressMonitored(env->pVM, GCPtr); 1457 1457 } 1458 1458 #endif … … 1560 1560 void remR3TimersRun(CPUState *env) 1561 1561 { 1562 LogFlow(("remR3TimersRun:\n")); 1562 1563 remR3ProfileStop(STATS_QEMU_RUN_EMULATED_CODE); 1563 1564 remR3ProfileStart(STATS_QEMU_RUN_TIMERS); … … 3926 3927 if (pVM->rem.s.fInREM) 3927 3928 { 3928 if (VM_IS_EMT(pVM)) 3929 cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HARD); 3930 else 3931 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3932 CPU_INTERRUPT_EXTERNAL_HARD); 3929 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3930 CPU_INTERRUPT_EXTERNAL_HARD); 3933 3931 } 3934 3932 } … … 3962 3960 if (pVM->rem.s.fInREM) 3963 3961 { 3964 if (VM_IS_EMT(pVM)) 3965 cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT); 3966 else 3967 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3968 CPU_INTERRUPT_EXTERNAL_TIMER); 3962 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3963 CPU_INTERRUPT_EXTERNAL_TIMER); 3969 3964 } 3970 3965 } … … 3982 3977 if (pVM->rem.s.fInREM) 3983 3978 { 3984 if (VM_IS_EMT(pVM)) 3985 cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT); 3986 else 3987 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3988 CPU_INTERRUPT_EXTERNAL_DMA); 3979 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3980 CPU_INTERRUPT_EXTERNAL_DMA); 3989 3981 } 3990 3982 } … … 4002 3994 if (pVM->rem.s.fInREM) 4003 3995 { 4004 if (VM_IS_EMT(pVM)) 4005 cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT); 4006 else 4007 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 4008 CPU_INTERRUPT_EXTERNAL_EXIT); 3996 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 3997 CPU_INTERRUPT_EXTERNAL_EXIT); 4009 3998 } 4010 3999 } … … 4022 4011 if (pVM->rem.s.fInREM) 4023 4012 { 4024 if (VM_IS_EMT(pVM)) 4025 cpu_interrupt(cpu_single_env, CPU_INTERRUPT_EXIT); 4026 else 4027 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 4028 CPU_INTERRUPT_EXTERNAL_EXIT); 4013 ASMAtomicOrS32((int32_t volatile *)&cpu_single_env->interrupt_request, 4014 CPU_INTERRUPT_EXTERNAL_EXIT); 4029 4015 } 4030 4016 } -
trunk/src/recompiler_new/exec-all.h
r14346 r14742 385 385 # if !defined(REM_PHYS_ADDR_IN_TLB) 386 386 target_ulong remR3HCVirt2GCPhys(CPUState *env1, void *addr); 387 #if 0 388 bool remR3IsVAMonitored(CPUState *env, RTGCPTR GCPtr); 389 bool remR3IsPAMonitored(CPUState *env, RTGCPHYS GCPhys); 390 #else 387 391 bool remR3IsMonitored(CPUState *env, RTGCPTR GCPtr); 392 #endif 388 393 # endif 389 394 # endif -
trunk/src/recompiler_new/target-i386/translate.c
r14702 r14742 912 912 tcg_gen_movi_tl(cpu_tmp0, pc); 913 913 tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUState, eip)); 914 #ifdef VBOX915 gen_check_external_event2();916 #endif917 914 } 918 915 … … 2671 2668 if ((pc & TARGET_PAGE_MASK) == (tb->pc & TARGET_PAGE_MASK) || 2672 2669 (pc & TARGET_PAGE_MASK) == ((s->pc - 1) & TARGET_PAGE_MASK)) { 2670 #ifdef VBOX 2671 gen_check_external_event(s); 2672 #endif /* VBOX */ 2673 2673 /* jump to same page: we can use a direct jump */ 2674 2674 tcg_gen_goto_tb(tb_num); … … 2697 2697 } 2698 2698 if (s->jmp_opt) { 2699 #ifdef VBOX2700 gen_check_external_event(s);2701 #endif /* VBOX */2702 2699 l1 = gen_new_label(); 2703 2700 gen_jcc1(s, cc_op, b, l1); … … 3120 3117 static void gen_eob(DisasContext *s) 3121 3118 { 3119 #ifdef VBOX 3120 gen_check_external_event(s); 3121 #endif /* VBOX */ 3122 3122 if (s->cc_op != CC_OP_DYNAMIC) 3123 3123 gen_op_set_cc_op(s->cc_op); … … 3154 3154 static void gen_jmp(DisasContext *s, target_ulong eip) 3155 3155 { 3156 #ifdef VBOX3157 gen_check_external_event(s);3158 #endif /* VBOX */3159 3156 gen_jmp_tb(s, eip, 0); 3160 3157 }
Note:
See TracChangeset
for help on using the changeset viewer.