mirror of
https://github.com/open-simh/simh.git
synced 2026-04-25 20:01:33 +00:00
3B2: Fix for diagnostics timer hang
Under certain circumstances, the timer resolution in the Version 3 could become coarse enough that very short timer intervals would lead to an infinite loop of bus errors when running timer firmware diagnostics.
This commit is contained in:
@@ -92,9 +92,13 @@
|
|||||||
#define QUICK_DELAY 100
|
#define QUICK_DELAY 100
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DELAY_US(C,N) ((TIMER_MODE(C) == 3) ? \
|
#define MIN_US 100
|
||||||
(TIME_BASE[(N)] * (C)->divider) / 2 : \
|
|
||||||
TIME_BASE[(N)] * (C)->divider)
|
#define CALC_US(C,N) ((TIMER_MODE(C) == 3) ? \
|
||||||
|
(TIME_BASE[(N)] * (C)->divider) / 2 : \
|
||||||
|
TIME_BASE[(N)] * (C)->divider)
|
||||||
|
|
||||||
|
#define DELAY_US(C,N) (MAX(MIN_US, CALC_US((C),(N))))
|
||||||
|
|
||||||
#if defined(REV3)
|
#if defined(REV3)
|
||||||
/* Microseconds per step (Version 3 system board):
|
/* Microseconds per step (Version 3 system board):
|
||||||
|
|||||||
Reference in New Issue
Block a user