forked from Imagelibrary/rtems
Add _CPU_Counter_frequency()
Add rtems_counter_frequency() API function. Use it to initialize the counter value converter via the new system initialization step (RTEMS_SYSINIT_CPU_COUNTER). This decouples the counter implementation and the counter converter. It avoids an unnecessary pull in of the 64-bit integer division from libgcc. Update #3456.
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/arm-a9mpcore-clock.h>
|
|
||||||
#include <bsp/fdt.h>
|
#include <bsp/fdt.h>
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
#include <bsp/linker-symbols.h>
|
#include <bsp/linker-symbols.h>
|
||||||
@@ -95,7 +94,6 @@ static void update_clocks(void)
|
|||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
update_clocks();
|
update_clocks();
|
||||||
a9mpcore_clock_initialize_early();
|
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
rtems_cache_coherent_add_area(
|
rtems_cache_coherent_add_area(
|
||||||
bsp_section_nocacheheap_begin,
|
bsp_section_nocacheheap_begin,
|
||||||
|
|||||||
@@ -22,15 +22,6 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
uint32_t a9mpcore_clock_periphclk(void);
|
uint32_t a9mpcore_clock_periphclk(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Do early clock initialization so that the CPU counter conversion
|
|
||||||
* works.
|
|
||||||
*/
|
|
||||||
static inline void a9mpcore_clock_initialize_early(void)
|
|
||||||
{
|
|
||||||
rtems_counter_initialize_converter(a9mpcore_clock_periphclk());
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
@@ -109,6 +109,11 @@ unsigned lpc176x_cclk( void )
|
|||||||
return cclk;
|
return cclk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return LPC176X_PCLK;
|
||||||
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void )
|
CPU_Counter_ticks _CPU_Counter_read( void )
|
||||||
{
|
{
|
||||||
return lpc176x_get_timer1();
|
return lpc176x_get_timer1();
|
||||||
|
|||||||
@@ -61,8 +61,11 @@ void lpc24xx_timer_initialize(void)
|
|||||||
|
|
||||||
/* Start timer */
|
/* Start timer */
|
||||||
T1TCR = TCR_EN;
|
T1TCR = TCR_EN;
|
||||||
|
}
|
||||||
|
|
||||||
rtems_counter_initialize_converter(LPC24XX_PCLK);
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return LPC24XX_PCLK;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read(void)
|
CPU_Counter_ticks _CPU_Counter_read(void)
|
||||||
|
|||||||
@@ -26,6 +26,11 @@
|
|||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return LPC32XX_PERIPH_CLK;
|
||||||
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read(void)
|
CPU_Counter_ticks _CPU_Counter_read(void)
|
||||||
{
|
{
|
||||||
return lpc32xx_timer();
|
return lpc32xx_timer();
|
||||||
@@ -33,6 +38,5 @@ CPU_Counter_ticks _CPU_Counter_read(void)
|
|||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
rtems_counter_initialize_converter(LPC32XX_PERIPH_CLK);
|
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,9 @@
|
|||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/arm-a9mpcore-clock.h>
|
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
a9mpcore_clock_initialize_early();
|
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,6 +157,11 @@ static void a9mpcore_clock_initialize(void)
|
|||||||
rtems_timecounter_install(&a9mpcore_tc);
|
rtems_timecounter_install(&a9mpcore_tc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return a9mpcore_clock_periphclk();
|
||||||
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read(void)
|
CPU_Counter_ticks _CPU_Counter_read(void)
|
||||||
{
|
{
|
||||||
volatile a9mpcore_gt *gt = A9MPCORE_GT;
|
volatile a9mpcore_gt *gt = A9MPCORE_GT;
|
||||||
|
|||||||
@@ -166,6 +166,11 @@ static void arm_gt_clock_initialize(void)
|
|||||||
rtems_timecounter_install(tc);
|
rtems_timecounter_install(tc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return arm_gt_clock_instance.interval;
|
||||||
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read(void)
|
CPU_Counter_ticks _CPU_Counter_read(void)
|
||||||
{
|
{
|
||||||
return (uint32_t) arm_gt_clock_get_count();
|
return (uint32_t) arm_gt_clock_get_count();
|
||||||
@@ -179,14 +184,12 @@ static void arm_gt_clock_early_init(void)
|
|||||||
&arm_gt_clock_instance.interval,
|
&arm_gt_clock_instance.interval,
|
||||||
&arm_gt_clock_instance.irq
|
&arm_gt_clock_instance.irq
|
||||||
);
|
);
|
||||||
|
|
||||||
rtems_counter_initialize_converter(arm_gt_clock_instance.interval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RTEMS_SYSINIT_ITEM(
|
RTEMS_SYSINIT_ITEM(
|
||||||
arm_gt_clock_early_init,
|
arm_gt_clock_early_init,
|
||||||
RTEMS_SYSINIT_BSP_START,
|
RTEMS_SYSINIT_CPU_COUNTER,
|
||||||
RTEMS_SYSINIT_ORDER_LAST
|
RTEMS_SYSINIT_ORDER_FIRST
|
||||||
);
|
);
|
||||||
|
|
||||||
#define Clock_driver_support_at_tick() \
|
#define Clock_driver_support_at_tick() \
|
||||||
|
|||||||
@@ -19,6 +19,16 @@
|
|||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/fatal.h>
|
#include <bsp/fatal.h>
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
#ifdef BSP_ARMV7M_SYSTICK_FREQUENCY
|
||||||
|
return = BSP_ARMV7M_SYSTICK_FREQUENCY;
|
||||||
|
#else
|
||||||
|
volatile ARMV7M_Systick *systick = _ARMV7M_Systick;
|
||||||
|
return ARMV7M_SYSTICK_CALIB_TENMS_GET(systick->calib) * 100;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read(void)
|
CPU_Counter_ticks _CPU_Counter_read(void)
|
||||||
{
|
{
|
||||||
volatile ARMV7M_DWT *dwt = _ARMV7M_DWT;
|
volatile ARMV7M_DWT *dwt = _ARMV7M_DWT;
|
||||||
@@ -32,22 +42,13 @@ static void armv7m_cpu_counter_initialize(void)
|
|||||||
|
|
||||||
cyccnt_enabled = _ARMV7M_DWT_Enable_CYCCNT();
|
cyccnt_enabled = _ARMV7M_DWT_Enable_CYCCNT();
|
||||||
|
|
||||||
if (cyccnt_enabled) {
|
if (!cyccnt_enabled) {
|
||||||
#ifdef BSP_ARMV7M_SYSTICK_FREQUENCY
|
|
||||||
uint64_t freq = BSP_ARMV7M_SYSTICK_FREQUENCY;
|
|
||||||
#else
|
|
||||||
volatile ARMV7M_Systick *systick = _ARMV7M_Systick;
|
|
||||||
uint64_t freq = ARMV7M_SYSTICK_CALIB_TENMS_GET(systick->calib) * 100ULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rtems_counter_initialize_converter(freq);
|
|
||||||
} else {
|
|
||||||
bsp_fatal(BSP_ARM_ARMV7M_CPU_COUNTER_INIT);
|
bsp_fatal(BSP_ARM_ARMV7M_CPU_COUNTER_INIT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RTEMS_SYSINIT_ITEM(
|
RTEMS_SYSINIT_ITEM(
|
||||||
armv7m_cpu_counter_initialize,
|
armv7m_cpu_counter_initialize,
|
||||||
RTEMS_SYSINIT_BSP_START,
|
RTEMS_SYSINIT_CPU_COUNTER,
|
||||||
RTEMS_SYSINIT_ORDER_FIRST
|
RTEMS_SYSINIT_ORDER_FIRST
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -46,8 +46,11 @@ static void tms570_cpu_counter_initialize(void)
|
|||||||
pmcr &= ~ARM_CP15_PMCR_D;
|
pmcr &= ~ARM_CP15_PMCR_D;
|
||||||
pmcr |= ARM_CP15_PMCR_E;
|
pmcr |= ARM_CP15_PMCR_E;
|
||||||
arm_cp15_set_performance_monitors_control(pmcr);
|
arm_cp15_set_performance_monitors_control(pmcr);
|
||||||
|
}
|
||||||
|
|
||||||
rtems_counter_initialize_converter(2 * BSP_PLL_OUT_CLOCK);
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return 2 * BSP_PLL_OUT_CLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read(void)
|
CPU_Counter_ticks _CPU_Counter_read(void)
|
||||||
@@ -57,6 +60,6 @@ CPU_Counter_ticks _CPU_Counter_read(void)
|
|||||||
|
|
||||||
RTEMS_SYSINIT_ITEM(
|
RTEMS_SYSINIT_ITEM(
|
||||||
tms570_cpu_counter_initialize,
|
tms570_cpu_counter_initialize,
|
||||||
RTEMS_SYSINIT_BSP_START,
|
RTEMS_SYSINIT_CPU_COUNTER,
|
||||||
RTEMS_SYSINIT_ORDER_FIRST
|
RTEMS_SYSINIT_ORDER_FIRST
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#include <bsp.h>
|
#include <bsp.h>
|
||||||
#include <bsp/bootcard.h>
|
#include <bsp/bootcard.h>
|
||||||
#include <bsp/arm-a9mpcore-clock.h>
|
|
||||||
#include <bsp/irq-generic.h>
|
#include <bsp/irq-generic.h>
|
||||||
#include <bsp/linker-symbols.h>
|
#include <bsp/linker-symbols.h>
|
||||||
|
|
||||||
@@ -25,7 +24,6 @@ __attribute__ ((weak)) uint32_t zynq_clock_cpu_1x(void)
|
|||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
a9mpcore_clock_initialize_early();
|
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
rtems_cache_coherent_add_area(
|
rtems_cache_coherent_add_area(
|
||||||
bsp_section_nocacheheap_begin,
|
bsp_section_nocacheheap_begin,
|
||||||
|
|||||||
@@ -162,6 +162,11 @@ BSP_getBoardType( void )
|
|||||||
return board_type;
|
return board_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
@@ -330,9 +335,6 @@ void bsp_start( void )
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||||
rtems_counter_initialize_converter(
|
|
||||||
BSP_bus_frequency / (BSP_time_base_divisor / 1000)
|
|
||||||
);
|
|
||||||
|
|
||||||
#ifdef SHOW_MORE_INIT_SETTINGS
|
#ifdef SHOW_MORE_INIT_SETTINGS
|
||||||
printk(
|
printk(
|
||||||
|
|||||||
@@ -112,6 +112,11 @@ uint32_t bsp_time_base_frequency;
|
|||||||
/* Legacy */
|
/* Legacy */
|
||||||
uint32_t bsp_clicks_per_usec;
|
uint32_t bsp_clicks_per_usec;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -145,7 +150,6 @@ void bsp_start(void)
|
|||||||
|
|
||||||
bsp_time_base_frequency = XLB_CLOCK / 4;
|
bsp_time_base_frequency = XLB_CLOCK / 4;
|
||||||
bsp_clicks_per_usec = (XLB_CLOCK/4000000);
|
bsp_clicks_per_usec = (XLB_CLOCK/4000000);
|
||||||
rtems_counter_initialize_converter(bsp_time_base_frequency);
|
|
||||||
|
|
||||||
/* Initialize exception handler */
|
/* Initialize exception handler */
|
||||||
ppc_exc_cache_wb_check = 0;
|
ppc_exc_cache_wb_check = 0;
|
||||||
|
|||||||
@@ -51,6 +51,11 @@ static int mpc83xx_decrementer_exception_handler( BSP_Exception_frame *frame, un
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start( void)
|
void bsp_start( void)
|
||||||
{
|
{
|
||||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||||
@@ -92,7 +97,6 @@ void bsp_start( void)
|
|||||||
#endif /* HAS_UBOOT */
|
#endif /* HAS_UBOOT */
|
||||||
bsp_time_base_frequency = BSP_bus_frequency / 4;
|
bsp_time_base_frequency = BSP_bus_frequency / 4;
|
||||||
bsp_clicks_per_usec = bsp_time_base_frequency / 1000000;
|
bsp_clicks_per_usec = bsp_time_base_frequency / 1000000;
|
||||||
rtems_counter_initialize_converter(bsp_time_base_frequency);
|
|
||||||
|
|
||||||
/* Initialize some console parameters */
|
/* Initialize some console parameters */
|
||||||
for (i = 0; i < console_device_count; ++i) {
|
for (i = 0; i < console_device_count; ++i) {
|
||||||
|
|||||||
@@ -153,6 +153,11 @@ DirectUARTWrite(const char c)
|
|||||||
BSP_output_char_function_type BSP_output_char = DirectUARTWrite;
|
BSP_output_char_function_type BSP_output_char = DirectUARTWrite;
|
||||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_clicks_per_usec * 1000000;
|
||||||
|
}
|
||||||
|
|
||||||
/*===================================================================*/
|
/*===================================================================*/
|
||||||
|
|
||||||
void bsp_start( void )
|
void bsp_start( void )
|
||||||
@@ -178,7 +183,6 @@ void bsp_start( void )
|
|||||||
/* Set globals visible to clock.c */
|
/* Set globals visible to clock.c */
|
||||||
/* timebase register ticks/microsecond = CPU Clk in MHz */
|
/* timebase register ticks/microsecond = CPU Clk in MHz */
|
||||||
bsp_clicks_per_usec = 400;
|
bsp_clicks_per_usec = 400;
|
||||||
rtems_counter_initialize_converter(bsp_clicks_per_usec * 1000000);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize default raw exception handlers.
|
* Initialize default raw exception handlers.
|
||||||
|
|||||||
@@ -119,6 +119,11 @@ static unsigned int get_eumbbar(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
@@ -346,9 +351,6 @@ void bsp_start( void )
|
|||||||
* initialize the device driver parameters
|
* initialize the device driver parameters
|
||||||
*/
|
*/
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||||
rtems_counter_initialize_converter(
|
|
||||||
BSP_bus_frequency / (BSP_time_base_divisor / 1000)
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initalize RTEMS IRQ system
|
* Initalize RTEMS IRQ system
|
||||||
|
|||||||
@@ -63,6 +63,11 @@ static void null_pointer_protection(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_clock_speed;
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
null_pointer_protection();
|
null_pointer_protection();
|
||||||
@@ -82,7 +87,6 @@ void bsp_start(void)
|
|||||||
|
|
||||||
/* Time reference value */
|
/* Time reference value */
|
||||||
bsp_clicks_per_usec = bsp_clock_speed / 1000000;
|
bsp_clicks_per_usec = bsp_clock_speed / 1000000;
|
||||||
rtems_counter_initialize_converter(bsp_clock_speed);
|
|
||||||
|
|
||||||
/* Initialize exceptions */
|
/* Initialize exceptions */
|
||||||
ppc_exc_initialize_with_vector_base(
|
ppc_exc_initialize_with_vector_base(
|
||||||
|
|||||||
@@ -114,6 +114,11 @@ static void _BSP_Uart2_enable(void)
|
|||||||
csr->bcsr1 &= ~UART2_E; /* Enable Uart2 */
|
csr->bcsr1 &= ~UART2_E; /* Enable Uart2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_clock_speed;
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
/* Set MPC8260ADS board LEDS and Uart enable lines */
|
/* Set MPC8260ADS board LEDS and Uart enable lines */
|
||||||
@@ -171,7 +176,6 @@ void bsp_start(void)
|
|||||||
bsp_serial_cts_rts = 0;
|
bsp_serial_cts_rts = 0;
|
||||||
bsp_serial_rate = 9600;
|
bsp_serial_rate = 9600;
|
||||||
bsp_clock_speed = 40000000;
|
bsp_clock_speed = 40000000;
|
||||||
rtems_counter_initialize_converter(bsp_clock_speed);
|
|
||||||
|
|
||||||
#ifdef REV_0_2
|
#ifdef REV_0_2
|
||||||
/* set up some board specific registers */
|
/* set up some board specific registers */
|
||||||
|
|||||||
@@ -192,6 +192,11 @@ BSP_calc_freqs( void )
|
|||||||
printk("CPU Clock Freq: %10u Hz\n", BSP_processor_frequency);
|
printk("CPU Clock Freq: %10u Hz\n", BSP_processor_frequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
@@ -367,9 +372,6 @@ VpdBufRec vpdData [] = {
|
|||||||
_BSP_clear_hostbridge_errors(0 /* enableMCP */, 0/*quiet*/);
|
_BSP_clear_hostbridge_errors(0 /* enableMCP */, 0/*quiet*/);
|
||||||
|
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||||
rtems_counter_initialize_converter(
|
|
||||||
BSP_bus_frequency / (BSP_time_base_divisor / 1000)
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initalize RTEMS IRQ system
|
* Initalize RTEMS IRQ system
|
||||||
|
|||||||
@@ -169,6 +169,11 @@ save_boot_params(
|
|||||||
return cmdline_buf;
|
return cmdline_buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start( void )
|
void bsp_start( void )
|
||||||
{
|
{
|
||||||
#ifdef CONF_VPD
|
#ifdef CONF_VPD
|
||||||
@@ -265,9 +270,6 @@ void bsp_start( void )
|
|||||||
/* P94 : 7455 TB/DECR is clocked by the system bus clock frequency */
|
/* P94 : 7455 TB/DECR is clocked by the system bus clock frequency */
|
||||||
|
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||||
rtems_counter_initialize_converter(
|
|
||||||
BSP_bus_frequency / (BSP_time_base_divisor / 1000)
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initalize RTEMS IRQ system
|
* Initalize RTEMS IRQ system
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ unsigned int BSP_time_base_divisor;
|
|||||||
|
|
||||||
extern unsigned long __rtems_end[];
|
extern unsigned long __rtems_end[];
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_clicks_per_usec * 1000000;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
@@ -81,7 +86,6 @@ void bsp_start( void )
|
|||||||
BSP_bus_frequency = (unsigned int)PSIM_INSTRUCTIONS_PER_MICROSECOND;
|
BSP_bus_frequency = (unsigned int)PSIM_INSTRUCTIONS_PER_MICROSECOND;
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency;
|
bsp_clicks_per_usec = BSP_bus_frequency;
|
||||||
BSP_time_base_divisor = 1;
|
BSP_time_base_divisor = 1;
|
||||||
rtems_counter_initialize_converter(bsp_clicks_per_usec * 1000000);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize default raw exception handlers.
|
* Initialize default raw exception handlers.
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ static int default_decrementer_exception_handler( BSP_Exception_frame *frame, un
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
@@ -80,7 +85,6 @@ void bsp_start( void )
|
|||||||
BSP_bus_frequency = 20;
|
BSP_bus_frequency = 20;
|
||||||
bsp_time_base_frequency = 20000000;
|
bsp_time_base_frequency = 20000000;
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency;
|
bsp_clicks_per_usec = BSP_bus_frequency;
|
||||||
rtems_counter_initialize_converter(bsp_time_base_frequency);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the interrupt related settings.
|
* Initialize the interrupt related settings.
|
||||||
|
|||||||
@@ -54,6 +54,15 @@ uint32_t bsp_time_base_frequency;
|
|||||||
|
|
||||||
uint32_t qoriq_clock_frequency;
|
uint32_t qoriq_clock_frequency;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
#ifdef __PPC_CPU_E6500__
|
||||||
|
return qoriq_clock_frequency;
|
||||||
|
#else
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void initialize_frequency_parameters(void)
|
static void initialize_frequency_parameters(void)
|
||||||
{
|
{
|
||||||
const void *fdt = bsp_fdt_get();
|
const void *fdt = bsp_fdt_get();
|
||||||
@@ -82,7 +91,6 @@ static void initialize_frequency_parameters(void)
|
|||||||
}
|
}
|
||||||
qoriq_clock_frequency = fdt32_to_cpu(*val_fdt);
|
qoriq_clock_frequency = fdt32_to_cpu(*val_fdt);
|
||||||
#endif
|
#endif
|
||||||
rtems_counter_initialize_converter(fdt32_to_cpu(*val_fdt));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MTIVPR(base) \
|
#define MTIVPR(base) \
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ extern unsigned long intrStackPtr;
|
|||||||
uint32_t bsp_clicks_per_usec;
|
uint32_t bsp_clicks_per_usec;
|
||||||
uint32_t bsp_clock_speed; /* Serial clocks per second */
|
uint32_t bsp_clock_speed; /* Serial clocks per second */
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return BSP_CRYSTAL_HZ / 4;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start()
|
* bsp_start()
|
||||||
*
|
*
|
||||||
@@ -88,7 +93,6 @@ void bsp_start(void)
|
|||||||
*/
|
*/
|
||||||
bsp_clicks_per_usec = BSP_CRYSTAL_HZ / 4 / 1000000;
|
bsp_clicks_per_usec = BSP_CRYSTAL_HZ / 4 / 1000000;
|
||||||
bsp_clock_speed = BSP_CLOCK_HZ; /* for SCI baud rate generator */
|
bsp_clock_speed = BSP_CLOCK_HZ; /* for SCI baud rate generator */
|
||||||
rtems_counter_initialize_converter(BSP_CRYSTAL_HZ / 4);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initalize RTEMS IRQ system
|
* Initalize RTEMS IRQ system
|
||||||
|
|||||||
@@ -77,13 +77,15 @@ static void t32mppc_initialize_exceptions(void *interrupt_stack_begin)
|
|||||||
MTIVOR(BOOKE_IVOR35, addr);
|
MTIVOR(BOOKE_IVOR35, addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
get_ppc_cpu_type();
|
get_ppc_cpu_type();
|
||||||
get_ppc_cpu_revision();
|
get_ppc_cpu_revision();
|
||||||
|
|
||||||
rtems_counter_initialize_converter(bsp_time_base_frequency);
|
|
||||||
|
|
||||||
t32mppc_initialize_exceptions(bsp_section_work_begin);
|
t32mppc_initialize_exceptions(bsp_section_work_begin);
|
||||||
bsp_interrupt_initialize();
|
bsp_interrupt_initialize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ static rtems_status_code bsp_tqm_get_cib_uint32( const char *cib_id,
|
|||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
void bsp_start( void)
|
void bsp_start( void)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -142,7 +147,6 @@ void bsp_start( void)
|
|||||||
|
|
||||||
bsp_time_base_frequency = BSP_bus_frequency / 16;
|
bsp_time_base_frequency = BSP_bus_frequency / 16;
|
||||||
bsp_clicks_per_usec = bsp_time_base_frequency / 1000000;
|
bsp_clicks_per_usec = bsp_time_base_frequency / 1000000;
|
||||||
rtems_counter_initialize_converter(bsp_time_base_frequency);
|
|
||||||
|
|
||||||
/* Initialize exception handler */
|
/* Initialize exception handler */
|
||||||
ppc_exc_initialize(interrupt_stack_start, interrupt_stack_size);
|
ppc_exc_initialize(interrupt_stack_start, interrupt_stack_size);
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ LINKER_SYMBOL(virtex_exc_vector_base);
|
|||||||
*/
|
*/
|
||||||
uint32_t bsp_time_base_frequency = XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ;
|
uint32_t bsp_time_base_frequency = XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_time_base_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* bsp_start
|
* bsp_start
|
||||||
*
|
*
|
||||||
@@ -89,8 +94,6 @@ void bsp_start( void )
|
|||||||
get_ppc_cpu_type();
|
get_ppc_cpu_type();
|
||||||
get_ppc_cpu_revision();
|
get_ppc_cpu_revision();
|
||||||
|
|
||||||
rtems_counter_initialize_converter(bsp_time_base_frequency);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize default raw exception handlers.
|
* Initialize default raw exception handlers.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -130,6 +130,10 @@ void BSP_ask_for_reset(void)
|
|||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return bsp_clicks_per_usec * 1000000;
|
||||||
|
}
|
||||||
|
|
||||||
/*===================================================================*/
|
/*===================================================================*/
|
||||||
|
|
||||||
@@ -166,7 +170,6 @@ void bsp_start(void)
|
|||||||
|
|
||||||
/* Timebase register ticks/microsecond; The application may override these */
|
/* Timebase register ticks/microsecond; The application may override these */
|
||||||
bsp_clicks_per_usec = 350;
|
bsp_clicks_per_usec = 350;
|
||||||
rtems_counter_initialize_converter(bsp_clicks_per_usec * 1000000);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the interrupt related settings.
|
* Initialize the interrupt related settings.
|
||||||
|
|||||||
@@ -144,6 +144,10 @@ void BSP_ask_for_reset(void)
|
|||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return BSP_bus_frequency / (BSP_time_base_divisor / 1000);
|
||||||
|
}
|
||||||
|
|
||||||
/*===================================================================*/
|
/*===================================================================*/
|
||||||
|
|
||||||
@@ -185,9 +189,6 @@ void bsp_start(void)
|
|||||||
|
|
||||||
/* Timebase register ticks/microsecond; The application may override these */
|
/* Timebase register ticks/microsecond; The application may override these */
|
||||||
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
bsp_clicks_per_usec = BSP_bus_frequency/(BSP_time_base_divisor * 1000);
|
||||||
rtems_counter_initialize_converter(
|
|
||||||
BSP_bus_frequency / (BSP_time_base_divisor / 1000)
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the interrupt related settings.
|
* Initialize the interrupt related settings.
|
||||||
|
|||||||
20
bsps/shared/dev/cpucounter/cpucounterfrequency.c
Normal file
20
bsps/shared/dev/cpucounter/cpucounterfrequency.c
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Dornierstr. 4
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.org/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <rtems/score/cpu.h>
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void )
|
||||||
|
{
|
||||||
|
return 1000000000;
|
||||||
|
}
|
||||||
@@ -28,6 +28,8 @@
|
|||||||
#include <rtems/timecounter.h>
|
#include <rtems/timecounter.h>
|
||||||
#include <rtems/score/sparcimpl.h>
|
#include <rtems/score/sparcimpl.h>
|
||||||
|
|
||||||
|
#define ERC32_REAL_TIME_CLOCK_FREQUENCY 1000000
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The Real Time Clock Counter Timer uses this trap type.
|
* The Real Time Clock Counter Timer uses this trap type.
|
||||||
*/
|
*/
|
||||||
@@ -78,19 +80,22 @@ static void erc32_tc_tick( void )
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void erc32_counter_initialize( uint32_t frequency )
|
static void erc32_counter_initialize( void )
|
||||||
{
|
{
|
||||||
_SPARC_Counter_initialize(
|
_SPARC_Counter_initialize(
|
||||||
_SPARC_Counter_read_address,
|
_SPARC_Counter_read_address,
|
||||||
_SPARC_Counter_difference_clock_period,
|
_SPARC_Counter_difference_clock_period,
|
||||||
&ERC32_MEC.Real_Time_Clock_Counter
|
&ERC32_MEC.Real_Time_Clock_Counter
|
||||||
);
|
);
|
||||||
rtems_counter_initialize_converter( frequency );
|
}
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return ERC32_REAL_TIME_CLOCK_FREQUENCY;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define Clock_driver_support_initialize_hardware() \
|
#define Clock_driver_support_initialize_hardware() \
|
||||||
do { \
|
do { \
|
||||||
uint32_t frequency = 1000000; \
|
|
||||||
/* approximately 1 us per countdown */ \
|
/* approximately 1 us per countdown */ \
|
||||||
ERC32_MEC.Real_Time_Clock_Scalar = CLOCK_SPEED - 1; \
|
ERC32_MEC.Real_Time_Clock_Scalar = CLOCK_SPEED - 1; \
|
||||||
ERC32_MEC.Real_Time_Clock_Counter = \
|
ERC32_MEC.Real_Time_Clock_Counter = \
|
||||||
@@ -108,11 +113,11 @@ static void erc32_counter_initialize( uint32_t frequency )
|
|||||||
); \
|
); \
|
||||||
rtems_timecounter_simple_install( \
|
rtems_timecounter_simple_install( \
|
||||||
&erc32_tc, \
|
&erc32_tc, \
|
||||||
frequency, \
|
ERC32_REAL_TIME_CLOCK_FREQUENCY, \
|
||||||
rtems_configuration_get_microseconds_per_tick(), \
|
rtems_configuration_get_microseconds_per_tick(), \
|
||||||
erc32_tc_get_timecount \
|
erc32_tc_get_timecount \
|
||||||
); \
|
); \
|
||||||
erc32_counter_initialize( frequency ); \
|
erc32_counter_initialize(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define Clock_driver_timecounter_tick() erc32_tc_tick()
|
#define Clock_driver_timecounter_tick() erc32_tc_tick()
|
||||||
|
|||||||
@@ -18,11 +18,17 @@
|
|||||||
#include <rtems/sysinit.h>
|
#include <rtems/sysinit.h>
|
||||||
#include <rtems/score/sparcimpl.h>
|
#include <rtems/score/sparcimpl.h>
|
||||||
|
|
||||||
|
static uint32_t leon3_counter_frequency = 1000000000;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency(void)
|
||||||
|
{
|
||||||
|
return leon3_up_counter_frequency;
|
||||||
|
}
|
||||||
|
|
||||||
static void leon3_counter_initialize(void)
|
static void leon3_counter_initialize(void)
|
||||||
{
|
{
|
||||||
volatile struct irqmp_timestamp_regs *irqmp_ts;
|
volatile struct irqmp_timestamp_regs *irqmp_ts;
|
||||||
volatile struct gptimer_regs *gpt;
|
volatile struct gptimer_regs *gpt;
|
||||||
unsigned int freq;
|
|
||||||
|
|
||||||
irqmp_ts = &LEON3_IrqCtrl_Regs->timestamp[0];
|
irqmp_ts = &LEON3_IrqCtrl_Regs->timestamp[0];
|
||||||
gpt = LEON3_Timer_Regs;
|
gpt = LEON3_Timer_Regs;
|
||||||
@@ -38,8 +44,7 @@ static void leon3_counter_initialize(void)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
freq = leon3_up_counter_frequency();
|
leon3_counter_frequency = leon3_up_counter_frequency();
|
||||||
rtems_counter_initialize_converter(freq);
|
|
||||||
} else if (leon3_irqmp_has_timestamp(irqmp_ts)) {
|
} else if (leon3_irqmp_has_timestamp(irqmp_ts)) {
|
||||||
/* Use the interrupt controller timestamp counter if available */
|
/* Use the interrupt controller timestamp counter if available */
|
||||||
|
|
||||||
@@ -52,8 +57,7 @@ static void leon3_counter_initialize(void)
|
|||||||
(volatile const uint32_t *) &irqmp_ts->counter
|
(volatile const uint32_t *) &irqmp_ts->counter
|
||||||
);
|
);
|
||||||
|
|
||||||
freq = ambapp_freq_get(&ambapp_plb, LEON3_IrqCtrl_Adev);
|
leon3_counter_frequency = ambapp_freq_get(&ambapp_plb, LEON3_IrqCtrl_Adev);
|
||||||
rtems_counter_initialize_converter(freq);
|
|
||||||
} else if (gpt != NULL) {
|
} else if (gpt != NULL) {
|
||||||
/* Fall back to the first GPTIMER if available */
|
/* Fall back to the first GPTIMER if available */
|
||||||
|
|
||||||
@@ -66,15 +70,15 @@ static void leon3_counter_initialize(void)
|
|||||||
(volatile const uint32_t *) &gpt->timer[LEON3_CLOCK_INDEX].value
|
(volatile const uint32_t *) &gpt->timer[LEON3_CLOCK_INDEX].value
|
||||||
);
|
);
|
||||||
|
|
||||||
freq = ambapp_freq_get(&ambapp_plb, LEON3_Timer_Adev);
|
leon3_counter_frequency = ambapp_freq_get(&ambapp_plb, LEON3_Timer_Adev) /
|
||||||
rtems_counter_initialize_converter(freq / (gpt->scaler_reload - 1));
|
(gpt->scaler_reload - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RTEMS_SYSINIT_ITEM(
|
RTEMS_SYSINIT_ITEM(
|
||||||
leon3_counter_initialize,
|
leon3_counter_initialize,
|
||||||
RTEMS_SYSINIT_BSP_START,
|
RTEMS_SYSINIT_CPU_COUNTER,
|
||||||
RTEMS_SYSINIT_ORDER_THIRD
|
RTEMS_SYSINIT_ORDER_FIRST
|
||||||
);
|
);
|
||||||
|
|
||||||
SPARC_COUNTER_DEFINITION;
|
SPARC_COUNTER_DEFINITION;
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/gpio/gpio-support.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/gpio/gpio-support.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/btimer/btimer-stub.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/btimer/btimer-stub.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/start/bsp-start-memcpy.S
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/start/bsp-start-memcpy.S
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb336/start/memmap.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb336/start/memmap.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES +=../../../../../../bsps/arm/csb336/clock/clockdrv.c
|
librtemsbsp_a_SOURCES +=../../../../../../bsps/arm/csb336/clock/clockdrv.c
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb337/start/bspreset.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb337/start/memmap.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb337/start/memmap.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb337/start/pmc.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/csb337/start/pmc.c
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/edb7312/start/bspreset.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/edb7312/start/bspreset.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gdbarmsim/start/bspreset.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gdbarmsim/start/syscalls.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gdbarmsim/start/syscalls.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
# console
|
# console
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gumstix/start/bspstart.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gumstix/start/bspstart.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gumstix/start/bspreset.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gumstix/start/bspreset.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gumstix/start/memmap.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/gumstix/start/memmap.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES +=../../../../../../bsps/arm/gumstix/clock/clock.c
|
librtemsbsp_a_SOURCES +=../../../../../../bsps/arm/gumstix/clock/clock.c
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ librtemsbsp_a_SOURCES =
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ librtemsbsp_a_SOURCES =
|
|||||||
# Shared
|
# Shared
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/rtl22xx/start/bspreset.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/rtl22xx/start/bspreset.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/rtl22xx/btimer/btimer.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/rtl22xx/btimer/btimer.c
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
|
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/smdk2410/btimer/btimer.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/smdk2410/btimer/btimer.c
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ librtemsbsp_a_SOURCES =
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea-default.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterread.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterdiff.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
|
|||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspreset-empty.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon2/start/bspstart.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon2/start/bspstart.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bspgetworkarea.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/shared/start/bspgetworkarea.c
|
||||||
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/cpucounter/cpucounterfrequency.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
|
||||||
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon2/start/setvec.c
|
librtemsbsp_a_SOURCES += ../../../../../../bsps/sparc/leon2/start/setvec.c
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2014, 2018 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -61,6 +61,16 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
typedef CPU_Counter_ticks rtems_counter_ticks;
|
typedef CPU_Counter_ticks rtems_counter_ticks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the current counter frequency in Hz.
|
||||||
|
*
|
||||||
|
* @return The current counter frequency in Hz.
|
||||||
|
*/
|
||||||
|
static inline uint32_t rtems_counter_frequency( void )
|
||||||
|
{
|
||||||
|
return _CPU_Counter_frequency();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reads the current counter values.
|
* @brief Reads the current counter values.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 embedded brains GmbH. All rights reserved.
|
* Copyright (c) 2014, 2018 embedded brains GmbH. All rights reserved.
|
||||||
*
|
*
|
||||||
* embedded brains GmbH
|
* embedded brains GmbH
|
||||||
* Dornierstr. 4
|
* Dornierstr. 4
|
||||||
@@ -13,12 +13,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/counter.h>
|
#include <rtems/counter.h>
|
||||||
|
#include <rtems/sysinit.h>
|
||||||
|
|
||||||
RTEMS_STATIC_ASSERT(sizeof(rtems_counter_ticks) <= sizeof(uint32_t), type);
|
RTEMS_STATIC_ASSERT(sizeof(rtems_counter_ticks) <= sizeof(uint32_t), type);
|
||||||
|
|
||||||
static uint64_t to_ns_scaler = UINT64_C(1) << 32;
|
static uint64_t to_ns_scaler;
|
||||||
|
|
||||||
static uint64_t from_ns_scaler = UINT64_C(1) << 32;
|
static uint64_t from_ns_scaler;
|
||||||
|
|
||||||
uint64_t rtems_counter_ticks_to_nanoseconds( rtems_counter_ticks counter )
|
uint64_t rtems_counter_ticks_to_nanoseconds( rtems_counter_ticks counter )
|
||||||
{
|
{
|
||||||
@@ -37,3 +38,14 @@ void rtems_counter_initialize_converter( uint32_t frequency )
|
|||||||
to_ns_scaler = ((ns_per_s << 32) + frequency - 1) / frequency;
|
to_ns_scaler = ((ns_per_s << 32) + frequency - 1) / frequency;
|
||||||
from_ns_scaler = ((UINT64_C(1) << 32) * frequency + ns_per_s - 1) / ns_per_s;
|
from_ns_scaler = ((UINT64_C(1) << 32) * frequency + ns_per_s - 1) / ns_per_s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void rtems_counter_sysinit( void )
|
||||||
|
{
|
||||||
|
rtems_counter_initialize_converter( rtems_counter_frequency() );
|
||||||
|
}
|
||||||
|
|
||||||
|
RTEMS_SYSINIT_ITEM(
|
||||||
|
rtems_counter_sysinit,
|
||||||
|
RTEMS_SYSINIT_CPU_COUNTER,
|
||||||
|
RTEMS_SYSINIT_ORDER_LAST
|
||||||
|
);
|
||||||
|
|||||||
@@ -596,6 +596,8 @@ static inline uint16_t CPU_swap_u16( uint16_t value )
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_difference(
|
CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += bfin-exception-frame-print.c
|
libscorecpu_a_SOURCES += bfin-exception-frame-print.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|||||||
@@ -982,6 +982,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ libscorecpu_a_SOURCES = cpu.c
|
|||||||
libscorecpu_a_SOURCES += epiphany-exception-handler.S
|
libscorecpu_a_SOURCES += epiphany-exception-handler.S
|
||||||
libscorecpu_a_SOURCES += epiphany-context-switch.S
|
libscorecpu_a_SOURCES += epiphany-context-switch.S
|
||||||
libscorecpu_a_SOURCES += epiphany-context-initialize.c
|
libscorecpu_a_SOURCES += epiphany-context-initialize.c
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += setjmp.S
|
libscorecpu_a_SOURCES += setjmp.S
|
||||||
|
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|||||||
@@ -854,6 +854,8 @@ static inline void _CPU_Context_validate( uintptr_t pattern )
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
|||||||
@@ -697,6 +697,8 @@ void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.S irq.c
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.S irq.c
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += lm32-exception-frame-print.c
|
libscorecpu_a_SOURCES += lm32-exception-frame-print.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|||||||
@@ -1018,6 +1018,8 @@ static inline uint16_t CPU_swap_u16(uint16_t v)
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.c context_switch.S context_init.c \
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.c context_switch.S context_init.c \
|
||||||
varvects.S
|
varvects.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += m32c-exception-frame-print.c
|
libscorecpu_a_SOURCES += m32c-exception-frame-print.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|||||||
@@ -968,6 +968,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a
|
|||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += m68k-exception-frame-print.c
|
libscorecpu_a_SOURCES += m68k-exception-frame-print.c
|
||||||
libscorecpu_a_SOURCES += __m68k_read_tp.c
|
libscorecpu_a_SOURCES += __m68k_read_tp.c
|
||||||
|
|||||||
@@ -679,6 +679,8 @@ void _CPU_Exception_frame_print(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
|||||||
@@ -988,6 +988,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c moxie-exception-frame-print.c cpu_asm.S
|
libscorecpu_a_SOURCES = cpu.c moxie-exception-frame-print.c cpu_asm.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
|||||||
@@ -835,6 +835,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ CLEANFILES =
|
|||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
|
|
||||||
libscorecpu_a_SOURCES =
|
libscorecpu_a_SOURCES =
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += nios2-context-initialize.c
|
libscorecpu_a_SOURCES += nios2-context-initialize.c
|
||||||
libscorecpu_a_SOURCES += nios2-context-switch.S
|
libscorecpu_a_SOURCES += nios2-context-switch.S
|
||||||
|
|||||||
@@ -353,6 +353,8 @@ static inline uint32_t CPU_swap_u32( uint32_t value )
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c cpu_asm.c
|
libscorecpu_a_SOURCES = cpu.c cpu_asm.c
|
||||||
|
libscorecpu_a_SOURCES += cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += cpucounterread.c
|
libscorecpu_a_SOURCES += cpucounterread.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
|||||||
20
cpukit/score/cpu/no_cpu/cpucounterfrequency.c
Normal file
20
cpukit/score/cpu/no_cpu/cpucounterfrequency.c
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2018 embedded brains GmbH. All rights reserved.
|
||||||
|
*
|
||||||
|
* embedded brains GmbH
|
||||||
|
* Dornierstr. 4
|
||||||
|
* 82178 Puchheim
|
||||||
|
* Germany
|
||||||
|
* <rtems@embedded-brains.de>
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.rtems.org/license/LICENSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <rtems/score/cpu.h>
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void )
|
||||||
|
{
|
||||||
|
return 1000000000;
|
||||||
|
}
|
||||||
@@ -1328,6 +1328,13 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
*/
|
*/
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the current CPU counter frequency in Hz.
|
||||||
|
*
|
||||||
|
* @return The current CPU counter frequency in Hz.
|
||||||
|
*/
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the current CPU counter value.
|
* @brief Returns the current CPU counter value.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ noinst_LIBRARIES = libscorecpu.a
|
|||||||
|
|
||||||
libscorecpu_a_SOURCES =
|
libscorecpu_a_SOURCES =
|
||||||
libscorecpu_a_SOURCES += cpu.c
|
libscorecpu_a_SOURCES += cpu.c
|
||||||
libscorecpu_a_SOURCES += or1k-context-switch.S
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += or1k-context-initialize.c
|
libscorecpu_a_SOURCES += or1k-context-initialize.c
|
||||||
|
libscorecpu_a_SOURCES += or1k-context-switch.S
|
||||||
libscorecpu_a_SOURCES += or1k-context-validate.S
|
libscorecpu_a_SOURCES += or1k-context-validate.S
|
||||||
libscorecpu_a_SOURCES += or1k-context-volatile-clobber.S
|
libscorecpu_a_SOURCES += or1k-context-volatile-clobber.S
|
||||||
libscorecpu_a_SOURCES += or1k-exception-default.c
|
libscorecpu_a_SOURCES += or1k-exception-default.c
|
||||||
|
|||||||
@@ -665,8 +665,6 @@ void _CPU_Context_Initialize(
|
|||||||
#define CPU_MAXIMUM_PROCESSORS 32
|
#define CPU_MAXIMUM_PROCESSORS 32
|
||||||
|
|
||||||
#ifndef ASM
|
#ifndef ASM
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t r[32];
|
uint32_t r[32];
|
||||||
|
|
||||||
@@ -856,6 +854,8 @@ static inline unsigned int CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_difference(
|
CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -803,6 +803,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_read( void )
|
static inline CPU_Counter_ticks _CPU_Counter_read( void )
|
||||||
{
|
{
|
||||||
CPU_Counter_ticks value;
|
CPU_Counter_ticks value;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
libscorecpu_a_SOURCES = cpu.c
|
libscorecpu_a_SOURCES = cpu.c
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += riscv-exception-handler.S
|
libscorecpu_a_SOURCES += riscv-exception-handler.S
|
||||||
libscorecpu_a_SOURCES += riscv-exception-default.c
|
libscorecpu_a_SOURCES += riscv-exception-default.c
|
||||||
libscorecpu_a_SOURCES += riscv-exception-frame-print.c
|
libscorecpu_a_SOURCES += riscv-exception-frame-print.c
|
||||||
|
|||||||
@@ -474,6 +474,8 @@ static inline void _CPU_Context_validate( uintptr_t pattern )
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
#ifdef RTEMS_SMP
|
#ifdef RTEMS_SMP
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
|
|
||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c context.c
|
libscorecpu_a_SOURCES = cpu.c context.c
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += sh-exception-frame-print.c
|
libscorecpu_a_SOURCES += sh-exception-frame-print.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|||||||
@@ -721,6 +721,8 @@ void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -1158,6 +1158,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
typedef CPU_Counter_ticks ( *SPARC_Counter_read )( void );
|
typedef CPU_Counter_ticks ( *SPARC_Counter_read )( void );
|
||||||
|
|
||||||
typedef CPU_Counter_ticks ( *SPARC_Counter_difference )(
|
typedef CPU_Counter_ticks ( *SPARC_Counter_difference )(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ libscorecpu_a_SOURCES =
|
|||||||
libscorecpu_a_SOURCES += context.S
|
libscorecpu_a_SOURCES += context.S
|
||||||
libscorecpu_a_SOURCES += cpu.c
|
libscorecpu_a_SOURCES += cpu.c
|
||||||
libscorecpu_a_SOURCES += interrupt.S
|
libscorecpu_a_SOURCES += interrupt.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += sparc64-exception-frame-print.c
|
libscorecpu_a_SOURCES += sparc64-exception-frame-print.c
|
||||||
libscorecpu_a_SOURCES += sparc64-syscall.S
|
libscorecpu_a_SOURCES += sparc64-syscall.S
|
||||||
|
|||||||
@@ -1032,6 +1032,8 @@ static inline uint32_t CPU_swap_u32(
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ include $(top_srcdir)/automake/compile.am
|
|||||||
noinst_LIBRARIES = libscorecpu.a
|
noinst_LIBRARIES = libscorecpu.a
|
||||||
libscorecpu_a_SOURCES = cpu.c
|
libscorecpu_a_SOURCES = cpu.c
|
||||||
libscorecpu_a_SOURCES += cpu_asm.S
|
libscorecpu_a_SOURCES += cpu_asm.S
|
||||||
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterfrequency.c
|
||||||
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
libscorecpu_a_SOURCES += ../no_cpu/cpucounterread.c
|
||||||
libscorecpu_a_SOURCES += v850-exception-frame-print.c
|
libscorecpu_a_SOURCES += v850-exception-frame-print.c
|
||||||
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
|
|||||||
@@ -934,6 +934,8 @@ static inline uint16_t CPU_swap_u16( uint16_t value )
|
|||||||
|
|
||||||
typedef uint32_t CPU_Counter_ticks;
|
typedef uint32_t CPU_Counter_ticks;
|
||||||
|
|
||||||
|
uint32_t _CPU_Counter_frequency( void );
|
||||||
|
|
||||||
CPU_Counter_ticks _CPU_Counter_read( void );
|
CPU_Counter_ticks _CPU_Counter_read( void );
|
||||||
|
|
||||||
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
static inline CPU_Counter_ticks _CPU_Counter_difference(
|
||||||
|
|||||||
Reference in New Issue
Block a user