Eliminate obsolete coding convention comments
Gets rid of single-line comments required by a previous set of coding conventions. These comments provide no value to readers and just clutter things up. Change-Id: I2a08b12cf5026253de56979efdfc510e7e68defe Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
60f6a74efe
commit
a1bd59de35
77 changed files with 0 additions and 370 deletions
|
@ -35,8 +35,6 @@ DESCRIPTION
|
||||||
This module provides the _SysFatalErrorHandler() routine for ARCv2 BSPs.
|
This module provides the _SysFatalErrorHandler() routine for ARCv2 BSPs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <cputype.h>
|
#include <cputype.h>
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
|
@ -35,8 +35,6 @@ DESCRIPTION
|
||||||
This module provides the _SysFatalErrorHandler() routine for Cortex-M BSPs.
|
This module provides the _SysFatalErrorHandler() routine for Cortex-M BSPs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <cputype.h>
|
#include <cputype.h>
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
|
@ -35,8 +35,6 @@ DESCRIPTION
|
||||||
This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M.
|
This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
||||||
|
@ -52,8 +50,6 @@ This module provides the _NanoFatalErrorHandler() routine for ARM Cortex-M.
|
||||||
#define PR_EXC(...)
|
#define PR_EXC(...)
|
||||||
#endif /* CONFIG_PRINTK */
|
#endif /* CONFIG_PRINTK */
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
|
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
|
||||||
* the caller does not have a NANO_ESF to pass
|
* the caller does not have a NANO_ESF to pass
|
||||||
|
|
|
@ -82,8 +82,6 @@ static uint32_t clock_accumulated_count = 0;
|
||||||
|
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When GDB_INFO is enabled, the handler installed in the vector table
|
* When GDB_INFO is enabled, the handler installed in the vector table
|
||||||
* (__systick), can be found in systick_gdb.s. In this case, the handler
|
* (__systick), can be found in systick_gdb.s. In this case, the handler
|
||||||
|
@ -103,8 +101,6 @@ static uint32_t clock_accumulated_count = 0;
|
||||||
#define IDLE_TICKLESS 1 /* tickless idle mode */
|
#define IDLE_TICKLESS 1 /* tickless idle mode */
|
||||||
#endif /* CONFIG_TICKLESS_IDLE */
|
#endif /* CONFIG_TICKLESS_IDLE */
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
||||||
extern uint32_t _hw_irq_to_c_handler_latency;
|
extern uint32_t _hw_irq_to_c_handler_latency;
|
||||||
#endif
|
#endif
|
||||||
|
@ -119,8 +115,6 @@ extern void _sys_power_save_idle_exit(int32_t ticks);
|
||||||
extern int32_t _sys_idle_elapsed_ticks;
|
extern int32_t _sys_idle_elapsed_ticks;
|
||||||
#endif /* CONFIG_TICKLESS_IDLE */
|
#endif /* CONFIG_TICKLESS_IDLE */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
#ifdef CONFIG_TICKLESS_IDLE
|
#ifdef CONFIG_TICKLESS_IDLE
|
||||||
static uint32_t __noinit default_load_value; /* default count */
|
static uint32_t __noinit default_load_value; /* default count */
|
||||||
static uint32_t idle_original_count = 0;
|
static uint32_t idle_original_count = 0;
|
||||||
|
|
|
@ -36,8 +36,6 @@ This module provides the _SysFatalErrorHandler() routine which is common to
|
||||||
supported BSPs.
|
supported BSPs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <cputype.h>
|
#include <cputype.h>
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
|
@ -81,8 +81,6 @@ The _EXC_STUB_SIZE macro is defined in arch/x86/include/nanok.h.
|
||||||
#include <nanok.h>
|
#include <nanok.h>
|
||||||
|
|
||||||
|
|
||||||
/* forward declarations */
|
|
||||||
|
|
||||||
void _NanoCpuExcConnectAtDpl(unsigned int vector,
|
void _NanoCpuExcConnectAtDpl(unsigned int vector,
|
||||||
void (*routine)(NANO_ESF * pEsf),
|
void (*routine)(NANO_ESF * pEsf),
|
||||||
NANO_EXC_STUB pExcStubMem,
|
NANO_EXC_STUB pExcStubMem,
|
||||||
|
|
|
@ -36,8 +36,6 @@ This module contains routines for updating the global descriptor table (GDT)
|
||||||
for the IA-32 architecture.
|
for the IA-32 architecture.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <linker-defs.h>
|
#include <linker-defs.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
@ -46,8 +44,6 @@ for the IA-32 architecture.
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <gdt.h>
|
#include <gdt.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#if (CONFIG_NUM_GDT_SPARE_ENTRIES < 0)
|
#if (CONFIG_NUM_GDT_SPARE_ENTRIES < 0)
|
||||||
#error "**** CONFIG_NUM_GDT_SPARE_ENTRIES must be at least 0\n\n"
|
#error "**** CONFIG_NUM_GDT_SPARE_ENTRIES must be at least 0\n\n"
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,8 +53,6 @@ for the IA-32 architecture.
|
||||||
#define MAX_GDT_ENTRIES \
|
#define MAX_GDT_ENTRIES \
|
||||||
(NUM_BASE_GDT_ENTRIES + CONFIG_NUM_GDT_SPARE_ENTRIES)
|
(NUM_BASE_GDT_ENTRIES + CONFIG_NUM_GDT_SPARE_ENTRIES)
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The RAM based global descriptor table. It is aligned on an 8 byte boundary
|
* The RAM based global descriptor table. It is aligned on an 8 byte boundary
|
||||||
* as the Intel manuals recommend this for best performance.
|
* as the Intel manuals recommend this for best performance.
|
||||||
|
@ -91,8 +85,6 @@ static
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
tGdtHeader _gdt = {
|
tGdtHeader _gdt = {
|
||||||
sizeof(tGdtDesc[MAX_GDT_ENTRIES - CONFIG_NUM_GDT_SPARE_ENTRIES]) -
|
sizeof(tGdtDesc[MAX_GDT_ENTRIES - CONFIG_NUM_GDT_SPARE_ENTRIES]) -
|
||||||
1,
|
1,
|
||||||
|
|
|
@ -45,8 +45,6 @@ These operators are currently unavailable to user space applications
|
||||||
as there is no requirement for this capability.
|
as there is no requirement for this capability.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#if defined(CONFIG_LOCK_INSTRUCTION_UNSUPPORTED)
|
#if defined(CONFIG_LOCK_INSTRUCTION_UNSUPPORTED)
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
|
|
|
@ -36,8 +36,6 @@ This module provides core nanokernel fiber related primitives for the IA-32
|
||||||
processor architecture.
|
processor architecture.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_MICROKERNEL
|
#ifdef CONFIG_MICROKERNEL
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
#include <kernel_struct.h>
|
#include <kernel_struct.h>
|
||||||
|
|
|
@ -35,7 +35,6 @@ DESCRIPTION
|
||||||
This module provides the _NanoFatalErrorHandler() routine.
|
This module provides the _NanoFatalErrorHandler() routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
||||||
|
@ -46,8 +45,6 @@ This module provides the _NanoFatalErrorHandler() routine.
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
|
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
|
* Define a default ESF for use with _NanoFatalErrorHandler() in the event
|
||||||
* the caller does not have a NANO_ESF to pass
|
* the caller does not have a NANO_ESF to pass
|
||||||
|
|
|
@ -39,8 +39,6 @@ IA-32 architecture.
|
||||||
#ifndef _GDT_H
|
#ifndef _GDT_H
|
||||||
#define _GDT_H
|
#define _GDT_H
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <arch/x86/arch.h>
|
#include <arch/x86/arch.h>
|
||||||
|
|
||||||
#ifndef _ASMLANGUAGE
|
#ifndef _ASMLANGUAGE
|
||||||
|
@ -48,8 +46,6 @@ IA-32 architecture.
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
/* a generic GDT entry structure definition */
|
/* a generic GDT entry structure definition */
|
||||||
|
|
||||||
typedef struct s_gdtDesc {
|
typedef struct s_gdtDesc {
|
||||||
|
|
|
@ -47,8 +47,6 @@ offsets.o module.
|
||||||
#ifndef _NANOK_H
|
#ifndef _NANOK_H
|
||||||
#define _NANOK_H
|
#define _NANOK_H
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
#include <asm_inline.h>
|
#include <asm_inline.h>
|
||||||
|
|
|
@ -75,8 +75,6 @@ INCLUDE FILES: ioapic.h loapic.h
|
||||||
SEE ALSO: loApicIntr.c
|
SEE ALSO: loApicIntr.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
@ -88,8 +86,6 @@ SEE ALSO: loApicIntr.c
|
||||||
#include <drivers/ioapic.h> /* public API declarations */
|
#include <drivers/ioapic.h> /* public API declarations */
|
||||||
#include <drivers/loapic.h> /* public API declarations and registers */
|
#include <drivers/loapic.h> /* public API declarations and registers */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/* IO APIC direct register offsets */
|
/* IO APIC direct register offsets */
|
||||||
|
|
||||||
#define IOAPIC_IND 0x00 /* Index Register */
|
#define IOAPIC_IND 0x00 /* Index Register */
|
||||||
|
@ -196,8 +192,6 @@ SEE ALSO: loApicIntr.c
|
||||||
|
|
||||||
#endif /* IOAPIC_MSI_REDIRECT */
|
#endif /* IOAPIC_MSI_REDIRECT */
|
||||||
|
|
||||||
/* forward declarations */
|
|
||||||
|
|
||||||
#ifndef XIOAPIC_DIRECT_ADDRESSING
|
#ifndef XIOAPIC_DIRECT_ADDRESSING
|
||||||
static uint32_t __IoApicGet(int32_t offset);
|
static uint32_t __IoApicGet(int32_t offset);
|
||||||
static void __IoApicSet(int32_t offset, uint32_t value);
|
static void __IoApicSet(int32_t offset, uint32_t value);
|
||||||
|
|
|
@ -103,8 +103,6 @@ per priority level.
|
||||||
INCLUDE FILES: loapic.h
|
INCLUDE FILES: loapic.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -114,8 +112,6 @@ INCLUDE FILES: loapic.h
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
#include <drivers/loapic.h> /* public API declarations */
|
#include <drivers/loapic.h> /* public API declarations */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/* IA32_APIC_BASE MSR Bits */
|
/* IA32_APIC_BASE MSR Bits */
|
||||||
|
|
||||||
#define LOAPIC_BASE_MASK 0xfffff000 /* LO APIC Base Addr mask */
|
#define LOAPIC_BASE_MASK 0xfffff000 /* LO APIC Base Addr mask */
|
||||||
|
|
|
@ -96,8 +96,6 @@ extern struct nano_stack _k_command_stack;
|
||||||
|
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/* HPET register offsets */
|
/* HPET register offsets */
|
||||||
|
|
||||||
#define GENERAL_CAPS_REG 0 /* 64-bit register */
|
#define GENERAL_CAPS_REG 0 /* 64-bit register */
|
||||||
|
@ -196,7 +194,6 @@ extern struct nano_stack _k_command_stack;
|
||||||
|
|
||||||
#define HPET_COMP_DELAY 192
|
#define HPET_COMP_DELAY 192
|
||||||
|
|
||||||
/* locals */
|
|
||||||
#ifdef CONFIG_DYNAMIC_INT_STUBS
|
#ifdef CONFIG_DYNAMIC_INT_STUBS
|
||||||
static NANO_CPU_INT_STUB_DECL(_hpetIntStub); /* interrupt stub memory */
|
static NANO_CPU_INT_STUB_DECL(_hpetIntStub); /* interrupt stub memory */
|
||||||
#else /* !CONFIG_DYNAMIC_INT_STUBS */
|
#else /* !CONFIG_DYNAMIC_INT_STUBS */
|
||||||
|
|
|
@ -43,8 +43,6 @@ divided by a value specified in the divide configuration register.
|
||||||
After reset, the timer is initialized to zero.
|
After reset, the timer is initialized to zero.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
@ -72,8 +70,6 @@ After reset, the timer is initialized to zero.
|
||||||
|
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/* Local APIC Timer Bits */
|
/* Local APIC Timer Bits */
|
||||||
|
|
||||||
#define LOAPIC_TIMER_DIVBY_2 0x0 /* Divide by 2 */
|
#define LOAPIC_TIMER_DIVBY_2 0x0 /* Divide by 2 */
|
||||||
|
@ -112,13 +108,10 @@ After reset, the timer is initialized to zero.
|
||||||
do {/* nothing */ \
|
do {/* nothing */ \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* !TIMER_SUPPORTS_TICKLESS */
|
#endif /* !TIMER_SUPPORTS_TICKLESS */
|
||||||
/* globals */
|
|
||||||
|
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
extern int32_t _sys_idle_elapsed_ticks;
|
extern int32_t _sys_idle_elapsed_ticks;
|
||||||
#endif /* TIMER_SUPPORTS_TICKLESS */
|
#endif /* TIMER_SUPPORTS_TICKLESS */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
#ifdef CONFIG_DYNAMIC_INT_STUBS
|
#ifdef CONFIG_DYNAMIC_INT_STUBS
|
||||||
static NANO_CPU_INT_STUB_DECL(
|
static NANO_CPU_INT_STUB_DECL(
|
||||||
_loapic_timer_irq_stub); /* interrupt stub memory for */
|
_loapic_timer_irq_stub); /* interrupt stub memory for */
|
||||||
|
|
|
@ -39,7 +39,6 @@ Interrupt stuff, abstracted across CPU architectures.
|
||||||
#ifndef _IRQ_TEST_COMMON__H_
|
#ifndef _IRQ_TEST_COMMON__H_
|
||||||
#define _IRQ_TEST_COMMON__H_
|
#define _IRQ_TEST_COMMON__H_
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#if defined(VXMICRO_ARCH_x86)
|
#if defined(VXMICRO_ARCH_x86)
|
||||||
#define IRQ_PRIORITY 3
|
#define IRQ_PRIORITY 3
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
/* For the nanokernel. */
|
/* For the nanokernel. */
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
|
@ -46,8 +44,6 @@
|
||||||
|
|
||||||
#include <nanokernel/cpu.h> //!< Used to be know as: irq_lock/irq_unlock
|
#include <nanokernel/cpu.h> //!< Used to be know as: irq_lock/irq_unlock
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
/* For the nanokernel. */
|
/* For the nanokernel. */
|
||||||
#define FORK(x) &forks[x]
|
#define FORK(x) &forks[x]
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include "phil.h"
|
#include "phil.h"
|
||||||
|
@ -48,8 +46,6 @@
|
||||||
#include "phil.h"
|
#include "phil.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define DEMO_DESCRIPTION \
|
#define DEMO_DESCRIPTION \
|
||||||
"\x1b[2J\x1b[15;1H" \
|
"\x1b[2J\x1b[15;1H" \
|
||||||
"Demo Description\n" \
|
"Demo Description\n" \
|
||||||
|
|
|
@ -83,8 +83,6 @@ the last level acknowledged and serviced.
|
||||||
* specific and implemented in assembler
|
* specific and implemented in assembler
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
@ -93,15 +91,11 @@ the last level acknowledged and serviced.
|
||||||
#include <drivers/pic.h>
|
#include <drivers/pic.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define OCW3_DEF 0x08 /* 3rd default control word */
|
#define OCW3_DEF 0x08 /* 3rd default control word */
|
||||||
#define OCW3_PCB 0x04 /* Polling Control Bit */
|
#define OCW3_PCB 0x04 /* Polling Control Bit */
|
||||||
#define OCW3_ISR 0x03 /* Read in-service reg */
|
#define OCW3_ISR 0x03 /* Read in-service reg */
|
||||||
#define OCW3_IRR 0x02 /* Read inter request reg */
|
#define OCW3_IRR 0x02 /* Read inter request reg */
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
#ifndef CONFIG_SHUTOFF_PIC
|
#ifndef CONFIG_SHUTOFF_PIC
|
||||||
unsigned int _i8259_spurious_interrupt_count =
|
unsigned int _i8259_spurious_interrupt_count =
|
||||||
0; /* track # of spurious interrupts */
|
0; /* track # of spurious interrupts */
|
||||||
|
|
|
@ -37,8 +37,6 @@ This module implements the PCI config space access functions
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,6 @@ This module implements the PCI H/W access functions.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,6 @@ values in the uart_init_info structure before calling uart_init().
|
||||||
INCLUDE FILES: drivers/serial/k20_uart.h
|
INCLUDE FILES: drivers/serial/k20_uart.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -53,16 +51,12 @@ INCLUDE FILES: drivers/serial/k20_uart.h
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t *base; /* base address of registers */
|
uint8_t *base; /* base address of registers */
|
||||||
uint8_t irq; /* interrupt request level */
|
uint8_t irq; /* interrupt request level */
|
||||||
uint8_t intPri; /* interrupt priority */
|
uint8_t intPri; /* interrupt priority */
|
||||||
} _k20Uart_t;
|
} _k20Uart_t;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
UART_PORTS_CONFIGURE(_k20Uart_t, uart);
|
UART_PORTS_CONFIGURE(_k20Uart_t, uart);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -56,8 +56,6 @@ A board support package's board.h header must provide definitions for:
|
||||||
INCLUDE FILES: drivers/uart.h
|
INCLUDE FILES: drivers/uart.h
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -71,8 +69,6 @@ INCLUDE FILES: drivers/uart.h
|
||||||
#include <pci/pci_mgr.h>
|
#include <pci/pci_mgr.h>
|
||||||
#endif /* CONFIG_PCI */
|
#endif /* CONFIG_PCI */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/* register definitions */
|
/* register definitions */
|
||||||
|
|
||||||
#define REG_THR 0x00 /* Transmitter holding reg. */
|
#define REG_THR 0x00 /* Transmitter holding reg. */
|
||||||
|
@ -228,8 +224,6 @@ INCLUDE FILES: drivers/uart.h
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* VXMICRO_ARCH_Intel */
|
#endif /* VXMICRO_ARCH_Intel */
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
struct ns16550 {
|
struct ns16550 {
|
||||||
uint32_t port; /* base port number or MM base address */
|
uint32_t port; /* base port number or MM base address */
|
||||||
uint8_t irq; /* interrupt request level */
|
uint8_t irq; /* interrupt request level */
|
||||||
|
@ -237,8 +231,6 @@ struct ns16550 {
|
||||||
uint8_t iirCache; /* cache of IIR since it clears when read */
|
uint8_t iirCache; /* cache of IIR since it clears when read */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
#if !(defined(UART_PORTS_CONFIGURE)) && !(defined(CONFIG_PCI))
|
#if !(defined(UART_PORTS_CONFIGURE)) && !(defined(CONFIG_PCI))
|
||||||
|
|
||||||
#error "CONFIG_PCI or UART_PORTS_CONFIGURE is needed"
|
#error "CONFIG_PCI or UART_PORTS_CONFIGURE is needed"
|
||||||
|
|
|
@ -49,8 +49,6 @@ An interrupt controller driver will not be utilized, so this driver will
|
||||||
directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
|
directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
@ -84,8 +82,6 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
|
||||||
|
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#if defined(CONFIG_TICKLESS_IDLE)
|
#if defined(CONFIG_TICKLESS_IDLE)
|
||||||
#define TIMER_SUPPORTS_TICKLESS
|
#define TIMER_SUPPORTS_TICKLESS
|
||||||
#endif
|
#endif
|
||||||
|
@ -115,14 +111,10 @@ directly invoke the VIOAPIC APIs to configure/unmask the IRQ.
|
||||||
#define PIT_CNT2(base) PIT_ADRS(base, 0x02) /* counter/channel 2 */
|
#define PIT_CNT2(base) PIT_ADRS(base, 0x02) /* counter/channel 2 */
|
||||||
#define PIT_CMD(base) PIT_ADRS(base, 0x03) /* control word */
|
#define PIT_CMD(base) PIT_ADRS(base, 0x03) /* control word */
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
extern int32_t _sys_idle_elapsed_ticks;
|
extern int32_t _sys_idle_elapsed_ticks;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/* interrupt stub memory for irq_connect() */
|
/* interrupt stub memory for irq_connect() */
|
||||||
|
|
||||||
#ifndef CONFIG_DYNAMIC_INT_STUBS
|
#ifndef CONFIG_DYNAMIC_INT_STUBS
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel/k_types.h>
|
#include <microkernel/k_types.h>
|
||||||
|
|
||||||
/* define size of command packet (without exposing its internal structure) */
|
/* define size of command packet (without exposing its internal structure) */
|
||||||
|
@ -72,8 +70,6 @@ extern "C" {
|
||||||
|
|
||||||
#define CMD_PKT_SET(name) (*(struct cmd_pkt_set *)(name))
|
#define CMD_PKT_SET(name) (*(struct cmd_pkt_set *)(name))
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef uint32_t cmdPkt_t[CMD_PKT_SIZE_IN_WORDS];
|
typedef uint32_t cmdPkt_t[CMD_PKT_SIZE_IN_WORDS];
|
||||||
|
|
||||||
struct cmd_pkt_set {
|
struct cmd_pkt_set {
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#ifndef TICKS_H
|
#ifndef TICKS_H
|
||||||
#define TICKS_H
|
#define TICKS_H
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <clock_vars.h>
|
#include <clock_vars.h>
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ linked list.
|
||||||
#ifndef _DLIST_H
|
#ifndef _DLIST_H
|
||||||
#define _DLIST_H
|
#define _DLIST_H
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct dnode_s {
|
typedef struct dnode_s {
|
||||||
union {
|
union {
|
||||||
struct dnode_s *head; /* ptr to head of list (dlist_t) */
|
struct dnode_s *head; /* ptr to head of list (dlist_t) */
|
||||||
|
|
|
@ -52,8 +52,6 @@ corruption of command packets that are already in use. To this end, drivers
|
||||||
that have an ISR component should use their own command packet set.
|
that have an ISR component should use their own command packet set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <microkernel/cmdPkt.h>
|
#include <microkernel/cmdPkt.h>
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
|
|
@ -55,8 +55,6 @@ levels (too high, or too low).
|
||||||
NOMANUAL
|
NOMANUAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
#include <minik.h>
|
#include <minik.h>
|
||||||
#include <nanok.h>
|
#include <nanok.h>
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <minik.h>
|
#include <minik.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
|
|
@ -40,7 +40,6 @@ When this feature is enabled, the compiler generated code refers to
|
||||||
function __stack_chk_fail and global variable __stack_chk_guard.
|
function __stack_chk_fail and global variable __stack_chk_guard.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
#include <toolchain.h> /* compiler specific configurations */
|
#include <toolchain.h> /* compiler specific configurations */
|
||||||
|
|
||||||
#if defined(CONFIG_STACK_CANARIES)
|
#if defined(CONFIG_STACK_CANARIES)
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
#ifdef CONFIG_INT_LATENCY_BENCHMARK
|
||||||
|
|
||||||
#include "toolchain.h"
|
#include "toolchain.h"
|
||||||
|
@ -42,12 +40,8 @@
|
||||||
#include <clock_vars.h>
|
#include <clock_vars.h>
|
||||||
#include <drivers/system_timer.h>
|
#include <drivers/system_timer.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NB_CACHE_WARMING_DRY_RUN 7
|
#define NB_CACHE_WARMING_DRY_RUN 7
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Timestamp corresponding to when interrupt were turned off.
|
* Timestamp corresponding to when interrupt were turned off.
|
||||||
* A value of zero indicated interrupt are not currently locked.
|
* A value of zero indicated interrupt are not currently locked.
|
||||||
|
@ -69,8 +63,6 @@ static uint32_t int_lock_unlock_nest = 0;
|
||||||
/* indicate if the interrupt latency benchamrk is ready to be used */
|
/* indicate if the interrupt latency benchamrk is ready to be used */
|
||||||
static uint32_t int_latency_bench_ready = 0;
|
static uint32_t int_latency_bench_ready = 0;
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
/* min amount of time it takes from HW interrupt generation to 'C' handler */
|
/* min amount of time it takes from HW interrupt generation to 'C' handler */
|
||||||
uint32_t _hw_irq_to_c_handler_latency = ULONG_MAX;
|
uint32_t _hw_irq_to_c_handler_latency = ULONG_MAX;
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanok.h>
|
#include <nanok.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
|
@ -30,13 +30,9 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <cputype.h>
|
#include <cputype.h>
|
||||||
#include "version.h" /* generated by MAKE, at compile time */
|
#include "version.h" /* generated by MAKE, at compile time */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static uint32_t kernel_version = KERNELVERSION;
|
static uint32_t kernel_version = KERNELVERSION;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -40,8 +40,6 @@ simplifies the adding and removing of nodes to/from the list.
|
||||||
\NOMANUAL
|
\NOMANUAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <misc/dlist.h>
|
#include <misc/dlist.h>
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ Interrupt stuff, abstracted across CPU architectures.
|
||||||
#ifndef _IRQ_TEST_COMMON__H_
|
#ifndef _IRQ_TEST_COMMON__H_
|
||||||
#define _IRQ_TEST_COMMON__H_
|
#define _IRQ_TEST_COMMON__H_
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#if defined(VXMICRO_ARCH_x86)
|
#if defined(VXMICRO_ARCH_x86)
|
||||||
#define IRQ_PRIORITY 3
|
#define IRQ_PRIORITY 3
|
||||||
#elif defined(VXMICRO_ARCH_arm)
|
#elif defined(VXMICRO_ARCH_arm)
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#ifndef __TC_UTIL_H__
|
#ifndef __TC_UTIL_H__
|
||||||
#define __TC_UTIL_H__
|
#define __TC_UTIL_H__
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#if defined(CONFIG_NANOKERNEL)
|
#if defined(CONFIG_NANOKERNEL)
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#else
|
#else
|
||||||
|
@ -44,8 +42,6 @@
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define PRINT_DATA(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
#define PRINT_DATA(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
#define PRINT_LINE \
|
#define PRINT_LINE \
|
||||||
|
|
|
@ -29,16 +29,12 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#if defined(CONFIG_STDOUT_CONSOLE)
|
#if defined(CONFIG_STDOUT_CONSOLE)
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#else
|
#else
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define N_PHILOSOPHERS 6
|
#define N_PHILOSOPHERS 6
|
||||||
/*
|
/*
|
||||||
* There are multiple tasks doing printfs and they may conflict.
|
* There are multiple tasks doing printfs and they may conflict.
|
||||||
|
|
|
@ -29,8 +29,6 @@
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include "phil.h"
|
#include "phil.h"
|
||||||
|
@ -41,8 +39,6 @@
|
||||||
|
|
||||||
#include <arch/cpu.h> /* irq_lock/irq_unlock */
|
#include <arch/cpu.h> /* irq_lock/irq_unlock */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
#define FORK(x) &forks[x]
|
#define FORK(x) &forks[x]
|
||||||
#define TAKE(x) nano_fiber_sem_take_wait(x)
|
#define TAKE(x) nano_fiber_sem_take_wait(x)
|
||||||
|
@ -62,8 +58,6 @@
|
||||||
|
|
||||||
extern struct nano_sem forks[N_PHILOSOPHERS];
|
extern struct nano_sem forks[N_PHILOSOPHERS];
|
||||||
#else /* ! CONFIG_NANOKERNEL */
|
#else /* ! CONFIG_NANOKERNEL */
|
||||||
/* globals */
|
|
||||||
|
|
||||||
kmutex_t forks[] = {forkMutex0, forkMutex1, forkMutex2, forkMutex3, forkMutex4, forkMutex5};
|
kmutex_t forks[] = {forkMutex0, forkMutex1, forkMutex2, forkMutex3, forkMutex4, forkMutex5};
|
||||||
#endif /* CONFIG_NANOKERNEL */
|
#endif /* CONFIG_NANOKERNEL */
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
@ -41,8 +39,6 @@
|
||||||
#include "phil.h"
|
#include "phil.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define DEMO_DESCRIPTION \
|
#define DEMO_DESCRIPTION \
|
||||||
"\x1b[2J\x1b[15;1H" \
|
"\x1b[2J\x1b[15;1H" \
|
||||||
"Demo Description\n" \
|
"Demo Description\n" \
|
||||||
|
@ -60,8 +56,6 @@
|
||||||
|
|
||||||
extern void philEntry(void);
|
extern void philEntry(void);
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
char __stack philStack[N_PHILOSOPHERS][STSIZE];
|
char __stack philStack[N_PHILOSOPHERS][STSIZE];
|
||||||
struct nano_sem forks[N_PHILOSOPHERS];
|
struct nano_sem forks[N_PHILOSOPHERS];
|
||||||
#endif /* CONFIG_NANOKERNEL */
|
#endif /* CONFIG_NANOKERNEL */
|
||||||
|
|
|
@ -39,8 +39,6 @@ Measure boot time for both nanokernel and microkernel project which includes
|
||||||
- from _start to idle (for microkernel)
|
- from _start to idle (for microkernel)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#ifdef CONFIG_NANOKERNEL
|
#ifdef CONFIG_NANOKERNEL
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
|
|
||||||
|
@ -41,8 +39,6 @@
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -55,8 +51,6 @@
|
||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
#endif /* TEST_reg */
|
#endif /* TEST_reg */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define IRQ_PRIORITY 3
|
#define IRQ_PRIORITY 3
|
||||||
#define TEST_SOFT_INT 64
|
#define TEST_SOFT_INT 64
|
||||||
|
|
||||||
|
@ -66,8 +60,6 @@
|
||||||
#define MESSAGE "Running regular microkernel configuration\n"
|
#define MESSAGE "Running regular microkernel configuration\n"
|
||||||
#endif /* TEST_max */
|
#endif /* TEST_max */
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef void* (*pfunc) (void*);
|
typedef void* (*pfunc) (void*);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
|
|
|
@ -35,19 +35,13 @@ DESCRIPTION
|
||||||
This module tests the task_offload_to_fiber() API.
|
This module tests the task_offload_to_fiber() API.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NUM_TICKS 500
|
#define NUM_TICKS 500
|
||||||
#define TEST_TIMEOUT 2000
|
#define TEST_TIMEOUT 2000
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static uint32_t criticalVar = 0;
|
static uint32_t criticalVar = 0;
|
||||||
static uint32_t altTaskIterations = 0;
|
static uint32_t altTaskIterations = 0;
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@ This modules tests the following event APIs:
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
@ -51,14 +49,10 @@ This modules tests the following event APIs:
|
||||||
#include <irq_test_common.h>
|
#include <irq_test_common.h>
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
kevent_t event;
|
kevent_t event;
|
||||||
} ISR_INFO;
|
} ISR_INFO;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static int evidence = 0;
|
static int evidence = 0;
|
||||||
|
|
||||||
static ISR_INFO isrInfo;
|
static ISR_INFO isrInfo;
|
||||||
|
|
|
@ -36,12 +36,10 @@ The module implements functions for the fiber that tests
|
||||||
event signaling
|
event signaling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
#define N_TESTS 10 /* number of tests to run */
|
#define N_TESTS 10 /* number of tests to run */
|
||||||
#define FIBER_PRIORITY 6
|
#define FIBER_PRIORITY 6
|
||||||
#define FIBER_STACK_SIZE 1024
|
#define FIBER_STACK_SIZE 1024
|
||||||
|
@ -49,8 +47,6 @@ event signaling
|
||||||
/* exports */
|
/* exports */
|
||||||
struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
|
struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static char __stack fiberStack[FIBER_STACK_SIZE]; /* test fiber stack size */
|
static char __stack fiberStack[FIBER_STACK_SIZE]; /* test fiber stack size */
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -45,14 +45,10 @@ Scenarios tested include:
|
||||||
- Verify the return codes are correct for the APIs
|
- Verify the return codes are correct for the APIs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define MULTIPLIER 100 /* Used to initialize myData */
|
#define MULTIPLIER 100 /* Used to initialize myData */
|
||||||
#define NUM_OF_ELEMENT 5 /* Number of elements in myData array */
|
#define NUM_OF_ELEMENT 5 /* Number of elements in myData array */
|
||||||
#define DEPTH_OF_FIFO_QUEUE 2 /*
|
#define DEPTH_OF_FIFO_QUEUE 2 /*
|
||||||
|
@ -63,8 +59,6 @@ Scenarios tested include:
|
||||||
|
|
||||||
#define SPECIAL_DATA 999 /* Special number to put in queue */
|
#define SPECIAL_DATA 999 /* Special number to put in queue */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static int myData[NUM_OF_ELEMENT];
|
static int myData[NUM_OF_ELEMENT];
|
||||||
static int tcRC = TC_PASS; /* test case return code */
|
static int tcRC = TC_PASS; /* test case return code */
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,6 @@ NOT guarantee that ALL standards-defined functionality is present, nor does
|
||||||
it guarantee that ALL functionality provided is working correctly.
|
it guarantee that ALL functionality provided is working correctly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
|
|
||||||
|
|
|
@ -44,22 +44,16 @@ NOTE: At present only a single test task is used, but more tasks may be added
|
||||||
in the future to enhance test coverage.
|
in the future to enhance test coverage.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NUM_TEST_TASKS 1 /* # of test tasks to monitor */
|
#define NUM_TEST_TASKS 1 /* # of test tasks to monitor */
|
||||||
|
|
||||||
/* # ticks to wait for test completion */
|
/* # ticks to wait for test completion */
|
||||||
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
|
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
|
||||||
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
|
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
|
||||||
|
@ -67,9 +61,6 @@ in the future to enhance test coverage.
|
||||||
|
|
||||||
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* RegressionTaskEntry - entry point for RegressionTask
|
* RegressionTaskEntry - entry point for RegressionTask
|
||||||
|
|
|
@ -58,28 +58,20 @@ are not (yet) tested include:
|
||||||
to ensure higher priority tasks get preference.
|
to ensure higher priority tasks get preference.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <microkernel.h>
|
#include <microkernel.h>
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define MSGSIZE 16 /* Standard message data size */
|
#define MSGSIZE 16 /* Standard message data size */
|
||||||
#define XFER_PRIO 5 /* standard message transfer priority */
|
#define XFER_PRIO 5 /* standard message transfer priority */
|
||||||
#define MSG_INFO1 1234 /* Message info test value */
|
#define MSG_INFO1 1234 /* Message info test value */
|
||||||
#define MSG_INFO2 666 /* Message info test value */
|
#define MSG_INFO2 666 /* Message info test value */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static char myData1[MSGSIZE] = "This is myData1";
|
static char myData1[MSGSIZE] = "This is myData1";
|
||||||
static char myData2[MSGSIZE] = "This is myData2";
|
static char myData2[MSGSIZE] = "This is myData2";
|
||||||
static char myData3[MSGSIZE] = "This is myData3";
|
static char myData3[MSGSIZE] = "This is myData3";
|
||||||
static char myData4[MSGSIZE] = "This is myData4";
|
static char myData4[MSGSIZE] = "This is myData4";
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
extern ktask_t msgSenderTask;
|
extern ktask_t msgSenderTask;
|
||||||
extern ktask_t msgRcvrTask;
|
extern ktask_t msgRcvrTask;
|
||||||
|
|
||||||
|
|
|
@ -42,20 +42,14 @@ these semaphores until it detects a failure or the completion of all test tasks,
|
||||||
then announces the result of the test.
|
then announces the result of the test.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NUM_TEST_TASKS 2 /* # of test tasks to monitor */
|
#define NUM_TEST_TASKS 2 /* # of test tasks to monitor */
|
||||||
|
|
||||||
/* # ticks to wait for test completion */
|
/* # ticks to wait for test completion */
|
||||||
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
|
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
|
||||||
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
|
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
|
||||||
|
@ -63,8 +57,6 @@ then announces the result of the test.
|
||||||
|
|
||||||
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
ktask_t msgSenderTask = MSGSENDERTASK;
|
ktask_t msgSenderTask = MSGSENDERTASK;
|
||||||
ktask_t msgRcvrTask = MSGRCVRTASK;
|
ktask_t msgRcvrTask = MSGRCVRTASK;
|
||||||
|
|
||||||
|
|
|
@ -44,14 +44,10 @@ allocated, and is only released once. Using an invalid pointer will have
|
||||||
unpredictable side effects.
|
unpredictable side effects.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NUMBLOCKS 2 /*
|
#define NUMBLOCKS 2 /*
|
||||||
* Number of memory blocks. This number
|
* Number of memory blocks. This number
|
||||||
* has to be aligned with the number in VPF file
|
* has to be aligned with the number in VPF file
|
||||||
|
@ -59,12 +55,8 @@ unpredictable side effects.
|
||||||
* test is 2
|
* test is 2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static int tcRC = TC_PASS; /* test case return code */
|
static int tcRC = TC_PASS; /* test case return code */
|
||||||
|
|
||||||
/* forward declarations */
|
|
||||||
|
|
||||||
int testMapGetAllBlocks(void **P);
|
int testMapGetAllBlocks(void **P);
|
||||||
int testMapFreeAllBlocks(void **P);
|
int testMapFreeAllBlocks(void **P);
|
||||||
|
|
||||||
|
|
|
@ -65,20 +65,14 @@ Timeline
|
||||||
: RegressionTask (@ priority 40) sleeps
|
: RegressionTask (@ priority 40) sleeps
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define ONE_SECOND (sys_clock_ticks_per_sec)
|
#define ONE_SECOND (sys_clock_ticks_per_sec)
|
||||||
#define HALF_SECOND (sys_clock_ticks_per_sec / 2)
|
#define HALF_SECOND (sys_clock_ticks_per_sec / 2)
|
||||||
#define THIRD_SECOND (sys_clock_ticks_per_sec / 3)
|
#define THIRD_SECOND (sys_clock_ticks_per_sec / 3)
|
||||||
#define FOURTH_SECOND (sys_clock_ticks_per_sec / 4)
|
#define FOURTH_SECOND (sys_clock_ticks_per_sec / 4)
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static int tcRC = TC_PASS; /* test case return code */
|
static int tcRC = TC_PASS; /* test case return code */
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -42,20 +42,14 @@ these semaphores until it detects a failure or the completion of all test tasks,
|
||||||
then announces the result of the test.
|
then announces the result of the test.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NUM_TEST_TASKS 2 /* # of test tasks to monitor */
|
#define NUM_TEST_TASKS 2 /* # of test tasks to monitor */
|
||||||
|
|
||||||
/* # ticks to wait for test completion */
|
/* # ticks to wait for test completion */
|
||||||
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
|
* Note that semaphore group entries are arranged so that resultSems[TC_PASS]
|
||||||
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
|
* refers to SEM_TASKDONE and resultSems[TC_FAIL] refers to SEM_TASKFAIL.
|
||||||
|
@ -63,8 +57,6 @@ then announces the result of the test.
|
||||||
|
|
||||||
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
ksem_t regSem = REGRESSION_SEM;
|
ksem_t regSem = REGRESSION_SEM;
|
||||||
ksem_t altSem = ALTERNATE_SEM;
|
ksem_t altSem = ALTERNATE_SEM;
|
||||||
ksem_t counterSem = COUNTER_SEM;
|
ksem_t counterSem = COUNTER_SEM;
|
||||||
|
|
|
@ -41,24 +41,18 @@ The following target pipe routine does not yet have a test case:
|
||||||
task_pipe_put_async()
|
task_pipe_put_async()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define ONE_SECOND (sys_clock_ticks_per_sec)
|
#define ONE_SECOND (sys_clock_ticks_per_sec)
|
||||||
|
|
||||||
#define IRQ_PRIORITY 3
|
#define IRQ_PRIORITY 3
|
||||||
|
|
||||||
#define PIPE_SIZE 256 /* This must match the value in the VPF file */
|
#define PIPE_SIZE 256 /* This must match the value in the VPF file */
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int size; /* number of bytes to send/receive */
|
int size; /* number of bytes to send/receive */
|
||||||
K_PIPE_OPTION options; /* options for task_pipe_XXX() APIs */
|
K_PIPE_OPTION options; /* options for task_pipe_XXX() APIs */
|
||||||
|
@ -66,9 +60,6 @@ typedef struct {
|
||||||
int rcode; /* expected return code */
|
int rcode; /* expected return code */
|
||||||
} SIZE_EXPECT;
|
} SIZE_EXPECT;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
|
|
||||||
static char txBuffer[PIPE_SIZE + 32];
|
static char txBuffer[PIPE_SIZE + 32];
|
||||||
static char rxBuffer[PIPE_SIZE + 32];
|
static char rxBuffer[PIPE_SIZE + 32];
|
||||||
|
|
||||||
|
@ -159,8 +150,6 @@ static SIZE_EXPECT timeout_cases[] = {
|
||||||
{PIPE_SIZE + 1, _0_TO_N, 0, RC_FAIL}
|
{PIPE_SIZE + 1, _0_TO_N, 0, RC_FAIL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
extern ksem_t regSem;
|
extern ksem_t regSem;
|
||||||
extern ksem_t altSem;
|
extern ksem_t altSem;
|
||||||
extern ksem_t counterSem;
|
extern ksem_t counterSem;
|
||||||
|
|
|
@ -38,16 +38,12 @@ This modules tests the following memory pool routines:
|
||||||
task_mem_pool_free()
|
task_mem_pool_free()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#include <misc/util.h>
|
#include <misc/util.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define ONE_SECOND (sys_clock_ticks_per_sec)
|
#define ONE_SECOND (sys_clock_ticks_per_sec)
|
||||||
#define TENTH_SECOND (sys_clock_ticks_per_sec / 10)
|
#define TENTH_SECOND (sys_clock_ticks_per_sec / 10)
|
||||||
|
|
||||||
|
@ -55,8 +51,6 @@ This modules tests the following memory pool routines:
|
||||||
|
|
||||||
#define DEFRAG_BLK_TEST 2222
|
#define DEFRAG_BLK_TEST 2222
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct k_block *block; /* pointer to block data */
|
struct k_block *block; /* pointer to block data */
|
||||||
kmemory_pool_t poolId; /* pool ID */
|
kmemory_pool_t poolId; /* pool ID */
|
||||||
|
@ -68,8 +62,6 @@ typedef struct {
|
||||||
typedef int (*poolBlockGetFunc_t)(struct k_block *, kmemory_pool_t, int, int32_t);
|
typedef int (*poolBlockGetFunc_t)(struct k_block *, kmemory_pool_t, int, int32_t);
|
||||||
typedef int (*poolMoveBlockFunc_t)(struct k_block *, kmemory_pool_t);
|
typedef int (*poolMoveBlockFunc_t)(struct k_block *, kmemory_pool_t);
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static volatile int evidence = 0;
|
static volatile int evidence = 0;
|
||||||
|
|
||||||
static struct k_block blockList[NUM_BLOCKS];
|
static struct k_block blockList[NUM_BLOCKS];
|
||||||
|
|
|
@ -42,8 +42,6 @@ these semaphores until it detects a failure or the completion of all test tasks,
|
||||||
then announces the result of the test.
|
then announces the result of the test.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
@ -58,12 +56,8 @@ then announces the result of the test.
|
||||||
extern void testFiberInit(void);
|
extern void testFiberInit(void);
|
||||||
extern struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
|
extern struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define NUM_TEST_TASKS 4 /* # of test tasks to monitor */
|
#define NUM_TEST_TASKS 4 /* # of test tasks to monitor */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static ksem_t testIsrInfo;
|
static ksem_t testIsrInfo;
|
||||||
|
|
||||||
static CMD_PKT_SET_INSTANCE(cmdPktSet, 2)
|
static CMD_PKT_SET_INSTANCE(cmdPktSet, 2)
|
||||||
|
@ -75,8 +69,6 @@ static CMD_PKT_SET_INSTANCE(cmdPktSet, 2)
|
||||||
|
|
||||||
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
ksem_t simpleSem = SIMPLE_SEM;
|
ksem_t simpleSem = SIMPLE_SEM;
|
||||||
ksem_t altSem = ALTTASK_SEM;
|
ksem_t altSem = ALTTASK_SEM;
|
||||||
ksem_t hpSem = HIGH_PRI_SEM;
|
ksem_t hpSem = HIGH_PRI_SEM;
|
||||||
|
|
|
@ -41,8 +41,6 @@ This modules tests the following semaphore routines:
|
||||||
isr_sem_give(), fiber_sem_give()
|
isr_sem_give(), fiber_sem_give()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
@ -53,7 +51,6 @@ This modules tests the following semaphore routines:
|
||||||
extern void trigger_isrSemaSignal(ksem_t semaphore);
|
extern void trigger_isrSemaSignal(ksem_t semaphore);
|
||||||
extern void releaseTestFiber(void);
|
extern void releaseTestFiber(void);
|
||||||
|
|
||||||
/* defines */
|
|
||||||
#define N_TESTS 10 /* number of tests to run */
|
#define N_TESTS 10 /* number of tests to run */
|
||||||
|
|
||||||
#define OBJ_TIMEOUT SECONDS(1)
|
#define OBJ_TIMEOUT SECONDS(1)
|
||||||
|
|
|
@ -36,12 +36,10 @@ The module implements functions for the fiber that tests
|
||||||
semaphore signaling
|
semaphore signaling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
#define N_TESTS 10 /* number of tests to run */
|
#define N_TESTS 10 /* number of tests to run */
|
||||||
#define FIBER_PRIORITY 6
|
#define FIBER_PRIORITY 6
|
||||||
#define FIBER_STACK_SIZE 1024
|
#define FIBER_STACK_SIZE 1024
|
||||||
|
@ -49,7 +47,6 @@ semaphore signaling
|
||||||
/* exports */
|
/* exports */
|
||||||
struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
|
struct nano_sem fiberSem; /* semaphore that allows test control the fiber */
|
||||||
|
|
||||||
/* locals */
|
|
||||||
extern ksem_t simpleSem;
|
extern ksem_t simpleSem;
|
||||||
extern ksem_t semList[];
|
extern ksem_t semList[];
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,9 @@ DESCRIPTION
|
||||||
This module contains the code for testing sprintf() functionality.
|
This module contains the code for testing sprintf() functionality.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define DEADBEEF 0xdeadbeef
|
#define DEADBEEF 0xdeadbeef
|
||||||
|
|
||||||
#define DEADBEEF_LHEX_ALT_STR "0xdeadbeef"
|
#define DEADBEEF_LHEX_ALT_STR "0xdeadbeef"
|
||||||
|
@ -68,8 +64,6 @@ This module contains the code for testing sprintf() functionality.
|
||||||
|
|
||||||
#define PRINTF_MAX_STRING_LENGTH 200
|
#define PRINTF_MAX_STRING_LENGTH 200
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
double d;
|
double d;
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -46,20 +46,15 @@ DESCRIPTION
|
||||||
prints out a short string couple times.
|
prints out a short string couple times.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
|
|
||||||
#ifdef CONFIG_MICROKERNEL
|
#ifdef CONFIG_MICROKERNEL
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
#define STACKSIZE 1024
|
#define STACKSIZE 1024
|
||||||
/* locals */
|
|
||||||
char __stack fiberStack[STACKSIZE];
|
char __stack fiberStack[STACKSIZE];
|
||||||
|
|
||||||
#endif /* CONFIG_MICROKERNEL */
|
#endif /* CONFIG_MICROKERNEL */
|
||||||
|
@ -67,7 +62,6 @@ char __stack fiberStack[STACKSIZE];
|
||||||
static int count = 0;
|
static int count = 0;
|
||||||
static int tcRC = TC_PASS;
|
static int tcRC = TC_PASS;
|
||||||
|
|
||||||
/* forward declarations */
|
|
||||||
void check_input(const char *name, const char *input);
|
void check_input(const char *name, const char *input);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -35,8 +35,6 @@ DESCRIPTION
|
||||||
Ensures interrupt and exception stubs are installed correctly.
|
Ensures interrupt and exception stubs are installed correctly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
|
@ -52,8 +50,6 @@ Ensures interrupt and exception stubs are installed correctly.
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
/* These vectors are somewhat arbitrary. We try and use unused vectors */
|
/* These vectors are somewhat arbitrary. We try and use unused vectors */
|
||||||
#define TEST_SOFT_INT 62
|
#define TEST_SOFT_INT 62
|
||||||
#define TEST_SPUR_INT 63
|
#define TEST_SPUR_INT 63
|
||||||
|
@ -69,8 +65,6 @@ extern void *exc_divide_error_handlerStub;
|
||||||
|
|
||||||
NANO_CPU_INT_REGISTER(nanoIntStub, TEST_SOFT_INT, 0);
|
NANO_CPU_INT_REGISTER(nanoIntStub, TEST_SOFT_INT, 0);
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static volatile int excHandlerExecuted;
|
static volatile int excHandlerExecuted;
|
||||||
static volatile int intHandlerExecuted;
|
static volatile int intHandlerExecuted;
|
||||||
/* Assume the spurious interrupt handler will execute and abort the task/fiber */
|
/* Assume the spurious interrupt handler will execute and abort the task/fiber */
|
||||||
|
|
|
@ -38,8 +38,6 @@ This module tests the following task APIs:
|
||||||
task_sleep(), task_yield()
|
task_sleep(), task_yield()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
@ -50,8 +48,6 @@ This module tests the following task APIs:
|
||||||
#include <irq_test_common.h>
|
#include <irq_test_common.h>
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define RT_PRIO 10 /* RegressionTask prio - must match prj.vpf */
|
#define RT_PRIO 10 /* RegressionTask prio - must match prj.vpf */
|
||||||
#define HT_PRIO 20 /* HelperTask prio - must match prj.vpf */
|
#define HT_PRIO 20 /* HelperTask prio - must match prj.vpf */
|
||||||
|
|
||||||
|
@ -60,15 +56,11 @@ This module tests the following task APIs:
|
||||||
#define CMD_TASKID 0
|
#define CMD_TASKID 0
|
||||||
#define CMD_PRIORITY 1
|
#define CMD_PRIORITY 1
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int cmd;
|
int cmd;
|
||||||
int data;
|
int data;
|
||||||
} ISR_INFO;
|
} ISR_INFO;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static vvfn _trigger_isrTaskCommand = (vvfn)sw_isr_trigger_0;
|
static vvfn _trigger_isrTaskCommand = (vvfn)sw_isr_trigger_0;
|
||||||
|
|
||||||
static ISR_INFO isrInfo;
|
static ISR_INFO isrInfo;
|
||||||
|
|
|
@ -48,8 +48,6 @@
|
||||||
/* # ticks to wait for test completion */
|
/* # ticks to wait for test completion */
|
||||||
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
#define TIMEOUT (60 * sys_clock_ticks_per_sec)
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
static ksem_t resultSems[] = { SEM_TASKDONE, SEM_TASKFAIL, ENDLIST };
|
||||||
static ksem_t rdySem = SEM_RDY;
|
static ksem_t rdySem = SEM_RDY;
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ This module tests the following ukernel timer routines:
|
||||||
task_tick_delta(), task_tick_get_32()
|
task_tick_delta(), task_tick_get_32()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <vxmicro.h>
|
#include <vxmicro.h>
|
||||||
|
|
||||||
|
@ -51,8 +49,6 @@ extern struct nano_lifo _k_timer_free; /* For white box testing only */
|
||||||
#define WITHIN_ERROR(var, target, epsilon) \
|
#define WITHIN_ERROR(var, target, epsilon) \
|
||||||
(((var) >= (target)) && ((var) <= (target) + (epsilon)))
|
(((var) >= (target)) && ((var) <= (target) + (epsilon)))
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static ktimer_t pTimer[NTIMERS + 1];
|
static ktimer_t pTimer[NTIMERS + 1];
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
|
@ -38,8 +38,6 @@ working. However, the test does do some some testing on
|
||||||
global variables for completeness sake.
|
global variables for completeness sake.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
|
@ -36,8 +36,6 @@ This module contains support code for the XIP regression
|
||||||
test.
|
test.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <nanokernel.h>
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,6 @@ volatile int i = 0; /* counter used by background task */
|
||||||
|
|
||||||
#ifndef TEST_min
|
#ifndef TEST_min
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <misc/printk.h>
|
#include <misc/printk.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -51,8 +49,6 @@ volatile int i = 0; /* counter used by background task */
|
||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
#endif /* TEST_reg */
|
#endif /* TEST_reg */
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define IRQ_PRIORITY 3
|
#define IRQ_PRIORITY 3
|
||||||
#define TEST_SOFT_INT 64
|
#define TEST_SOFT_INT 64
|
||||||
|
|
||||||
|
@ -68,8 +64,6 @@ volatile int i = 0; /* counter used by background task */
|
||||||
#define MESSAGE "Running regular nanokernel configuration\n"
|
#define MESSAGE "Running regular nanokernel configuration\n"
|
||||||
#endif /* TEST_max */
|
#endif /* TEST_max */
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef void* (*pfunc) (void*);
|
typedef void* (*pfunc) (void*);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
|
|
|
@ -39,8 +39,6 @@ semaphores.
|
||||||
The ISRs are installed at build time, directly in the vector table.
|
The ISRs are installed at build time, directly in the vector table.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#if !defined(CONFIG_CPU_CORTEXM3)
|
#if !defined(CONFIG_CPU_CORTEXM3)
|
||||||
#error project can only run on Cortex-M3
|
#error project can only run on Cortex-M3
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -41,8 +41,6 @@ This module tests the following CPU and context related routines:
|
||||||
irq_enable(), irq_disable(),
|
irq_enable(), irq_disable(),
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <nanok.h>
|
#include <nanok.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
@ -61,8 +59,6 @@ This module tests the following CPU and context related routines:
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define FIBER_STACKSIZE 2000
|
#define FIBER_STACKSIZE 2000
|
||||||
#define FIBER_PRIORITY 4
|
#define FIBER_PRIORITY 4
|
||||||
|
|
||||||
|
@ -88,8 +84,6 @@ This module tests the following CPU and context related routines:
|
||||||
#error Timer type is not defined for this BSP
|
#error Timer type is not defined for this BSP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int command; /* command to process */
|
int command; /* command to process */
|
||||||
int error; /* error value (if any) */
|
int error; /* error value (if any) */
|
||||||
|
@ -102,8 +96,6 @@ typedef struct {
|
||||||
typedef int (* disable_interrupt_func)(int);
|
typedef int (* disable_interrupt_func)(int);
|
||||||
typedef void (* enable_interrupt_func)(int);
|
typedef void (* enable_interrupt_func)(int);
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/* Cortex-M3 does not implement connecting non-IRQ exception handlers */
|
/* Cortex-M3 does not implement connecting non-IRQ exception handlers */
|
||||||
#if !defined(CONFIG_CPU_CORTEXM3)
|
#if !defined(CONFIG_CPU_CORTEXM3)
|
||||||
static NANO_CPU_EXC_STUB_DECL(nanoExcStub);
|
static NANO_CPU_EXC_STUB_DECL(nanoExcStub);
|
||||||
|
|
|
@ -61,8 +61,6 @@ the queue and puts and gets one last item to the queue. All these are run
|
||||||
in ISR context.
|
in ISR context.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
@ -72,8 +70,6 @@ in ISR context.
|
||||||
#include <irq_test_common.h>
|
#include <irq_test_common.h>
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define STACKSIZE 2048
|
#define STACKSIZE 2048
|
||||||
#define NUM_FIFO_ELEMENT 4
|
#define NUM_FIFO_ELEMENT 4
|
||||||
#define INVALID_DATA NULL
|
#define INVALID_DATA NULL
|
||||||
|
@ -82,15 +78,11 @@ in ISR context.
|
||||||
#define TCERR2 TC_ERROR("Didn't get back correct FIFO\n")
|
#define TCERR2 TC_ERROR("Didn't get back correct FIFO\n")
|
||||||
#define TCERR3 TC_ERROR("The queue should be empty!\n")
|
#define TCERR3 TC_ERROR("The queue should be empty!\n")
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct nano_fifo *channel; /* FIFO channel */
|
struct nano_fifo *channel; /* FIFO channel */
|
||||||
void *data; /* pointer to data to add */
|
void *data; /* pointer to data to add */
|
||||||
} ISR_FIFO_INFO;
|
} ISR_FIFO_INFO;
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
char __stack fiberStack1[STACKSIZE];
|
char __stack fiberStack1[STACKSIZE];
|
||||||
char __stack fiberStack2[STACKSIZE];
|
char __stack fiberStack2[STACKSIZE];
|
||||||
char __stack fiberStack3[STACKSIZE];
|
char __stack fiberStack3[STACKSIZE];
|
||||||
|
@ -132,15 +124,11 @@ void * const pPutList2[NUM_FIFO_ELEMENT] = {
|
||||||
|
|
||||||
int retCode = TC_PASS;
|
int retCode = TC_PASS;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static ISR_FIFO_INFO isrFifoInfo = {&nanoFifoObj, NULL};
|
static ISR_FIFO_INFO isrFifoInfo = {&nanoFifoObj, NULL};
|
||||||
|
|
||||||
static void (*_trigger_nano_isr_fifo_put)(void) = (vvfn)sw_isr_trigger_0;
|
static void (*_trigger_nano_isr_fifo_put)(void) = (vvfn)sw_isr_trigger_0;
|
||||||
static void (*_trigger_nano_isr_fifo_get)(void) = (vvfn)sw_isr_trigger_1;
|
static void (*_trigger_nano_isr_fifo_get)(void) = (vvfn)sw_isr_trigger_1;
|
||||||
|
|
||||||
/* forward declarations */
|
|
||||||
|
|
||||||
void fiber1(void);
|
void fiber1(void);
|
||||||
void fiber2(void);
|
void fiber2(void);
|
||||||
void fiber3(void);
|
void fiber3(void);
|
||||||
|
|
|
@ -52,8 +52,6 @@ Scenario #3:
|
||||||
These scenarios will be tested using a combinations of tasks, fibers and ISRs.
|
These scenarios will be tested using a combinations of tasks, fibers and ISRs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
@ -63,13 +61,9 @@ These scenarios will be tested using a combinations of tasks, fibers and ISRs.
|
||||||
#include <irq_test_common.h>
|
#include <irq_test_common.h>
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define FIBER_STACKSIZE 2000
|
#define FIBER_STACKSIZE 2000
|
||||||
#define FIBER_PRIORITY 4
|
#define FIBER_PRIORITY 4
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct nano_lifo *channel; /* LIFO channel */
|
struct nano_lifo *channel; /* LIFO channel */
|
||||||
void *data; /* pointer to data to add */
|
void *data; /* pointer to data to add */
|
||||||
|
@ -80,8 +74,6 @@ typedef struct {
|
||||||
uint32_t data; /* miscellaneous data put on LIFO (not important) */
|
uint32_t data; /* miscellaneous data put on LIFO (not important) */
|
||||||
} LIFO_ITEM;
|
} LIFO_ITEM;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
/* Items to be added/removed from LIFO during the test */
|
/* Items to be added/removed from LIFO during the test */
|
||||||
static LIFO_ITEM lifoItem[4] = {
|
static LIFO_ITEM lifoItem[4] = {
|
||||||
{0, 1},
|
{0, 1},
|
||||||
|
|
|
@ -50,8 +50,6 @@ Scenario #3:
|
||||||
Multiple fibers pend on the same semaphore.
|
Multiple fibers pend on the same semaphore.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
@ -61,13 +59,9 @@ Scenario #3:
|
||||||
#include <irq_test_common.h>
|
#include <irq_test_common.h>
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define FIBER_STACKSIZE 2000
|
#define FIBER_STACKSIZE 2000
|
||||||
#define FIBER_PRIORITY 4
|
#define FIBER_PRIORITY 4
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct nano_sem *sem; /* ptr to semaphore */
|
struct nano_sem *sem; /* ptr to semaphore */
|
||||||
int data; /* data */
|
int data; /* data */
|
||||||
|
@ -80,8 +74,6 @@ typedef enum {
|
||||||
STS_ISR_WOKE_TASK
|
STS_ISR_WOKE_TASK
|
||||||
} SEM_TEST_STATE;
|
} SEM_TEST_STATE;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static SEM_TEST_STATE semTestState;
|
static SEM_TEST_STATE semTestState;
|
||||||
static ISR_SEM_INFO isrSemInfo;
|
static ISR_SEM_INFO isrSemInfo;
|
||||||
static struct nano_sem testSem;
|
static struct nano_sem testSem;
|
||||||
|
|
|
@ -60,8 +60,6 @@ it popped all data from queue1, push and pop one last item to the queue. All
|
||||||
these are run in ISR context.
|
these are run in ISR context.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
@ -71,7 +69,6 @@ these are run in ISR context.
|
||||||
#include <irq_test_common.h>
|
#include <irq_test_common.h>
|
||||||
#include <util_test_common.h>
|
#include <util_test_common.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
#define STACKSIZE 2048
|
#define STACKSIZE 2048
|
||||||
#define NUM_STACK_ELEMENT 4
|
#define NUM_STACK_ELEMENT 4
|
||||||
#define STARTNUM 1 /* Used to compute data to put in the stack */
|
#define STARTNUM 1 /* Used to compute data to put in the stack */
|
||||||
|
@ -83,16 +80,12 @@ these are run in ISR context.
|
||||||
#define TCERR2 TC_ERROR("Didn't get back correct data\n")
|
#define TCERR2 TC_ERROR("Didn't get back correct data\n")
|
||||||
#define TCERR3 TC_ERROR("The stack should be empty!\n")
|
#define TCERR3 TC_ERROR("The stack should be empty!\n")
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct nano_stack *channel; /* STACK channel */
|
struct nano_stack *channel; /* STACK channel */
|
||||||
uint32_t data; /* data to add */
|
uint32_t data; /* data to add */
|
||||||
} ISR_STACK_INFO;
|
} ISR_STACK_INFO;
|
||||||
|
|
||||||
|
|
||||||
/* globals */
|
|
||||||
|
|
||||||
char fiberStack1[STACKSIZE];
|
char fiberStack1[STACKSIZE];
|
||||||
char fiberStack2[STACKSIZE];
|
char fiberStack2[STACKSIZE];
|
||||||
char fiberStack3[STACKSIZE];
|
char fiberStack3[STACKSIZE];
|
||||||
|
@ -115,15 +108,11 @@ uint32_t stack2[NUM_STACK_ELEMENT];
|
||||||
void *timerData[1];
|
void *timerData[1];
|
||||||
int retCode = TC_PASS;
|
int retCode = TC_PASS;
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static ISR_STACK_INFO isrStackInfo = {&nanoStackObj, 0};
|
static ISR_STACK_INFO isrStackInfo = {&nanoStackObj, 0};
|
||||||
|
|
||||||
static void (*_trigger_nano_isr_stack_push)(void) = (vvfn)sw_isr_trigger_0;
|
static void (*_trigger_nano_isr_stack_push)(void) = (vvfn)sw_isr_trigger_0;
|
||||||
static void (*_trigger_nano_isr_stack_pop)(void) = (vvfn)sw_isr_trigger_1;
|
static void (*_trigger_nano_isr_stack_pop)(void) = (vvfn)sw_isr_trigger_1;
|
||||||
|
|
||||||
/* forward declarations */
|
|
||||||
|
|
||||||
void initData(void);
|
void initData(void);
|
||||||
void fiber1(void);
|
void fiber1(void);
|
||||||
void fiber2(void);
|
void fiber2(void);
|
||||||
|
|
|
@ -39,13 +39,9 @@ This module tests the following timer related routines:
|
||||||
nano_time_init(), nano_tick_get_32(), nano_cycle_get_32(), nano_tick_delta()
|
nano_time_init(), nano_tick_get_32(), nano_cycle_get_32(), nano_tick_delta()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* includes */
|
|
||||||
|
|
||||||
#include <tc_util.h>
|
#include <tc_util.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
/* defines */
|
|
||||||
|
|
||||||
#define TWO_SECONDS (2 * sys_clock_ticks_per_sec)
|
#define TWO_SECONDS (2 * sys_clock_ticks_per_sec)
|
||||||
#define SIX_SECONDS (6 * sys_clock_ticks_per_sec)
|
#define SIX_SECONDS (6 * sys_clock_ticks_per_sec)
|
||||||
|
|
||||||
|
@ -59,15 +55,11 @@ This module tests the following timer related routines:
|
||||||
#define FIBER2_STACKSIZE 2000
|
#define FIBER2_STACKSIZE 2000
|
||||||
#define FIBER2_PRIORITY 10
|
#define FIBER2_PRIORITY 10
|
||||||
|
|
||||||
/* typedefs */
|
|
||||||
|
|
||||||
typedef void (* timer_start_func)(struct nano_timer *, int);
|
typedef void (* timer_start_func)(struct nano_timer *, int);
|
||||||
typedef void (* timer_stop_func)(struct nano_timer *);
|
typedef void (* timer_stop_func)(struct nano_timer *);
|
||||||
typedef void* (* timer_getw_func)(struct nano_timer *);
|
typedef void* (* timer_getw_func)(struct nano_timer *);
|
||||||
typedef void* (* timer_get_func)(struct nano_timer *);
|
typedef void* (* timer_get_func)(struct nano_timer *);
|
||||||
|
|
||||||
/* locals */
|
|
||||||
|
|
||||||
static struct nano_timer timer;
|
static struct nano_timer timer;
|
||||||
static struct nano_timer shortTimer;
|
static struct nano_timer shortTimer;
|
||||||
static struct nano_timer longTimer;
|
static struct nano_timer longTimer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue