RTEMS: bsps/i386/pc386/clock/ckinit.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Macros | Functions | Variables
ckinit.c File Reference
`#include <bsp.h>`
`#include <bsp/irq-generic.h>`
`#include <bspopts.h>`
`#include <libcpu/cpuModel.h>`
`#include <assert.h>`
`#include <rtems/timecounter.h>`
`#include "../../../shared/dev/clock/clockimpl.h"`

## Macros
#define | CLOCK_VECTOR 0
#define | CLOCK_DRIVER_ISRS_PER_TICK 1
#define | CLOCK_DRIVER_ISRS_PER_TICK_VALUE pc386_isrs_per_tick
#define | READ_8254(_lsb, _msb)
#define | Clock_driver_support_set_interrupt_affinity(online_processors)

## Functions
void | Clock_isr (void *param)
void | Clock_driver_install_handler (void)
void | Clock_driver_support_initialize_hardware (void)

## Variables
volatile uint32_t | pc386_microseconds_per_isr
volatile uint32_t | pc386_isrs_per_tick
uint32_t | pc386_clock_click_count
volatile uint32_t | Clock_driver_ticks
| ISRs until next clock tick.
bool | Clock_isr_enabled = false

## Detailed Description

Clock Tick Device Driver

History:

- Original driver was go32 clock by Joel Sherrill
- go32 clock driver hardware code was inserted into new boilerplate when the pc386 BSP by: Pedro Miguel Da Cruz Neto Romano pmcnr.nosp@m.@cam.nosp@m.oes.r.nosp@m.nl.i.nosp@m.st.ut.nosp@m.l.pt Jose Rufino ruf@a.nosp@m.ster.nosp@m.ix.is.nosp@m.t.ut.nosp@m.l.pt
- Reworked by Joel Sherrill to use clock driver template. This removes all boilerplate and leave original hardware code I developed for the go32 BSP.

## Macro Definition Documentation

## ◆ Clock_driver_support_set_interrupt_affinity

#define Clock_driver_support_set_interrupt_affinity | ( |  | online_processors | ) |

Value:
do { \
/* FIXME: Is there a way to do this on x86? */ \
(void) online_processors; \
} while (0)

## ◆ READ_8254

#define READ_8254 | ( |  | _lsb,
|  |  | _msb
| ) |  |

Value:
do { outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_LATCH); \
inport_byte(TIMER_CNTR0, _lsb); \
inport_byte(TIMER_CNTR0, _msb); \
} while (0)

## Variable Documentation

## ◆ Clock_driver_ticks

volatile uint32_t Clock_driver_ticks
| extern

ISRs until next clock tick.

Clock ticks since initialization