bsps/i386/pc386: Delay with the 8254

Wait_X_ms() spun in a loop which bsp_start() calibrated against the
8254.  The calibration abandoned the measurement after five attempts
and then spun forever, which stopped the boot of every executable.  A
simulator which derives its clock from the executed instructions
reaches that point.

Take the delay from channel 2 of the 8254, which software gates and
which drives no interrupt, so the tick source on channel 0 stays
untouched.  The counter is 16 bits wide, so the delay takes one
millisecond at a time.  Delete the calibration together with its call
in bsp_start().

Close #5728.

Assisted-by: Claude:claude-opus-5 claude-code
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
This commit is contained in:
Sebastian Huber
2026-08-31 18:21:34 -05:00
committed by Joel Sherrill
parent c20c47b165
commit 3226d3ddad
3 changed files with 52 additions and 278 deletions
File diff suppressed because it is too large Load Diff
-1
View File
@@ -177,7 +177,6 @@ int getch( void ); /* from 'inch.c' */
void add_to_queue( unsigned short b ); /* from 'inch.c' */
void Wait_X_ms(unsigned int timeToWait); /* from 'timer.c' */
void Calibrate_loop_1ms(void); /* from 'timer.c' */
void rtems_irq_mngt_init(void); /* from 'irq_init.c' */
-8
View File
@@ -77,14 +77,6 @@ static void bsp_pci_initialize_helper(void)
+--------------------------------------------------------------------------*/
static void bsp_start_default( void )
{
/*
* Turn off watchdog
*/
/*
* Calibrate variable for 1ms-loop (see timer.c)
*/
Calibrate_loop_1ms();
/*
* Init rtems interrupt management
*/