doxygen: add @brief and capitalize
Remove function name from comment and add @brief instead. Also capitilize first letter. Change-Id: Ib708b49bf02e5bc89b0066637a55874e659637e0 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
1362e3c162
commit
f367f071b6
223 changed files with 1146 additions and 1147 deletions
|
@ -62,7 +62,7 @@ GTEXT(atomic_cas)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_clear - atomically clear a memory location
|
* @brief Atomically clear a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically clears the contents of <target> and returns the old
|
* This routine atomically clears the contents of <target> and returns the old
|
||||||
* value that was in <target>.
|
* value that was in <target>.
|
||||||
|
@ -85,7 +85,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_clear_set, atomic_clear)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_set - atomically set a memory location
|
* @brief Atomically set a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically sets the contents of <target> to <value> and returns
|
* This routine atomically sets the contents of <target> to <value> and returns
|
||||||
* the old value that was in <target>.
|
* the old value that was in <target>.
|
||||||
|
@ -113,7 +113,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_clear_set, atomic_set)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_get - Get the value of a shared memory atomically
|
* @brief Get the value of a shared memory atomically
|
||||||
*
|
*
|
||||||
* This routine atomically retrieves the value in *target
|
* This routine atomically retrieves the value in *target
|
||||||
*
|
*
|
||||||
|
@ -132,7 +132,7 @@ SECTION_FUNC(TEXT, atomic_get)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_inc - atomically increment a memory location
|
* @brief Atomically increment a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically increments the value in <target>. The operation is
|
* This routine atomically increments the value in <target>. The operation is
|
||||||
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
||||||
|
@ -158,7 +158,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_inc_add, atomic_inc)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_add - atomically add a value to a memory location
|
* @brief Atomically add a value to a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically adds the contents of <target> and <value>, placing
|
* This routine atomically adds the contents of <target> and <value>, placing
|
||||||
* the result in <target>. The operation is done using signed integer arithmetic.
|
* the result in <target>. The operation is done using signed integer arithmetic.
|
||||||
|
@ -193,7 +193,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_inc_add, atomic_add)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_dec - atomically decrement a memory location
|
* @brief Atomically decrement a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically decrements the value in <target>. The operation is
|
* This routine atomically decrements the value in <target>. The operation is
|
||||||
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
||||||
|
@ -219,7 +219,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_dec_sub, atomic_dec)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_sub - atomically subtract a value from a memory location
|
* @brief Atomically subtract a value from a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically subtracts <value> from the contents of <target>,
|
* This routine atomically subtracts <value> from the contents of <target>,
|
||||||
* placing the result in <target>. The operation is done using signed integer
|
* placing the result in <target>. The operation is done using signed integer
|
||||||
|
@ -255,7 +255,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_dec_sub, atomic_sub)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_nand - atomically perform a bitwise NAND on a memory location
|
* @brief Atomically perform a bitwise NAND on a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise NAND operation of the contents of
|
* This routine atomically performs a bitwise NAND operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -292,7 +292,7 @@ SECTION_FUNC(TEXT, atomic_nand)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_and - atomically perform a bitwise AND on a memory location
|
* @brief Atomically perform a bitwise AND on a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise AND operation of the contents of
|
* This routine atomically performs a bitwise AND operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -328,7 +328,7 @@ SECTION_FUNC(TEXT, atomic_and)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_or - atomically perform a bitwise OR on memory location
|
* @brief Atomically perform a bitwise OR on memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise OR operation of the contents of
|
* This routine atomically performs a bitwise OR operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -364,7 +364,7 @@ SECTION_FUNC(TEXT, atomic_or)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_xor - atomically perform a bitwise XOR on a memory location
|
* @brief Atomically perform a bitwise XOR on a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise XOR operation of the contents of
|
* This routine atomically performs a bitwise XOR operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -400,7 +400,7 @@ SECTION_FUNC(TEXT, atomic_xor)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_cas - atomically compare-and-swap the contents of a memory location
|
* @brief Atomically compare-and-swap the contents of a memory location
|
||||||
*
|
*
|
||||||
* This routine performs an atomic compare-and-swap. testing that the contents of
|
* This routine performs an atomic compare-and-swap. testing that the contents of
|
||||||
* <target> contains <oldValue>, and if it does, setting the value of <target>
|
* <target> contains <oldValue>, and if it does, setting the value of <target>
|
||||||
|
|
|
@ -65,7 +65,7 @@ tNANO _nanokernel = {0};
|
||||||
|
|
||||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||||
/*
|
/*
|
||||||
* context_monitor_init - initialize context monitoring support
|
* @brief Initialize context monitoring support
|
||||||
*
|
*
|
||||||
* Currently only inserts the new context in the list of active contexts.
|
* Currently only inserts the new context in the list of active contexts.
|
||||||
*
|
*
|
||||||
|
@ -92,7 +92,7 @@ static ALWAYS_INLINE void context_monitor_init(struct ccs *pCcs /* context */
|
||||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _NewContext - initialize a new context (thread) from its stack space
|
* @brief Initialize a new context (thread) from its stack space
|
||||||
*
|
*
|
||||||
* The control structure (CCS) is put at the lower address of the stack. An
|
* The control structure (CCS) is put at the lower address of the stack. An
|
||||||
* initial context, to be "restored" by __return_from_coop(), is put at
|
* initial context, to be "restored" by __return_from_coop(), is put at
|
||||||
|
|
|
@ -46,7 +46,7 @@ GTEXT(_context_entry)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _ContextEntryWrapper - wrapper for _context_entry
|
* @brief Wrapper for _context_entry
|
||||||
*
|
*
|
||||||
* The routine pops parameters for the _context_entry from
|
* The routine pops parameters for the _context_entry from
|
||||||
* stack frame, prepared by the _NewContext() routine
|
* stack frame, prepared by the _NewContext() routine
|
||||||
|
|
|
@ -51,7 +51,7 @@ SECTION_VAR(BSS, nano_cpu_sleep_mode)
|
||||||
.word 0
|
.word 0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nano_cpu_idle - put the CPU in low-power mode
|
* @brief Put the CPU in low-power mode
|
||||||
*
|
*
|
||||||
* This function always exits with interrupts unlocked.
|
* This function always exits with interrupts unlocked.
|
||||||
*
|
*
|
||||||
|
@ -65,7 +65,7 @@ SECTION_FUNC(TEXT, nano_cpu_idle)
|
||||||
nop
|
nop
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nano_cpu_atomic_idle - put the CPU in low-power mode, entered with IRQs locked
|
* @brief Put the CPU in low-power mode, entered with IRQs locked
|
||||||
*
|
*
|
||||||
* This function exits with interrupts restored to <key>.
|
* This function exits with interrupts restored to <key>.
|
||||||
*
|
*
|
||||||
|
|
|
@ -55,7 +55,7 @@ SECTION_VAR(NOINIT, _firq_stack)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _firq_enter - work to be done before handing control to a FIRQ ISR
|
* @brief Work to be done before handing control to a FIRQ ISR
|
||||||
*
|
*
|
||||||
* The processor switches to a second register bank so registers from the
|
* The processor switches to a second register bank so registers from the
|
||||||
* current bank do not have to be preserved yet. The only issue is the LP_START/
|
* current bank do not have to be preserved yet. The only issue is the LP_START/
|
||||||
|
@ -99,7 +99,7 @@ SECTION_FUNC(TEXT, _firq_enter)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _firq_exit - work to be done exiting a FIRQ
|
* @brief Work to be done exiting a FIRQ
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -258,7 +258,7 @@ _firq_no_reschedule:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _firq_stack_setup - install the FIRQ stack in register bank 1
|
* @brief Install the FIRQ stack in register bank 1
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -54,7 +54,7 @@ const NANO_ESF _default_esf = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NanoFatalErrorHandler - nanokernel fatal error handler
|
* @brief Nanokernel fatal error handler
|
||||||
*
|
*
|
||||||
* This routine is called when fatal error conditions are detected by software
|
* This routine is called when fatal error conditions are detected by software
|
||||||
* and is responsible only for reporting the error. Once reported, it then
|
* and is responsible only for reporting the error. Once reported, it then
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
#if (CONFIG_FAULT_DUMP > 0)
|
#if (CONFIG_FAULT_DUMP > 0)
|
||||||
/*
|
/*
|
||||||
* _FaultDump - dump information regarding fault (FAULT_DUMP > 0)
|
* @brief Dump information regarding fault (FAULT_DUMP > 0)
|
||||||
*
|
*
|
||||||
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 1
|
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 1
|
||||||
* (short form).
|
* (short form).
|
||||||
|
@ -85,7 +85,7 @@ void _FaultDump(const NANO_ESF *esf, int fault)
|
||||||
#endif /* CONFIG_FAULT_DUMP */
|
#endif /* CONFIG_FAULT_DUMP */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Fault - fault handler
|
* @brief Fault handler
|
||||||
*
|
*
|
||||||
* This routine is called when fatal error conditions are detected by hardware
|
* This routine is called when fatal error conditions are detected by hardware
|
||||||
* and is responsible only for reporting the error. Once reported, it then
|
* and is responsible only for reporting the error. Once reported, it then
|
||||||
|
|
|
@ -64,7 +64,7 @@ SECTION_VAR(BSS, saved_stack_pointer)
|
||||||
.word 0
|
.word 0
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* __fault - fault handler installed in the fault and reserved vectors
|
* @brief Fault handler installed in the fault and reserved vectors
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SECTION_SUBSEC_FUNC(TEXT,__fault,__memory_error)
|
SECTION_SUBSEC_FUNC(TEXT,__fault,__memory_error)
|
||||||
|
|
|
@ -48,7 +48,7 @@ GTEXT(nanoFfsLsb)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nanoFfsMsb - find first set bit (searching from the most significant bit)
|
* @brief Find first set bit (searching from the most significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and
|
* This routine finds the first bit set in the argument passed it and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
@ -71,7 +71,7 @@ SECTION_FUNC(TEXT, nanoFfsMsb)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nanoFfsLsb - find first set bit (searching from the least significant bit)
|
* @brief Find first set bit (searching from the least significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and
|
* This routine finds the first bit set in the argument passed it and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_lock - disable all interrupts on the local CPU
|
* @brief Disable all interrupts on the local CPU
|
||||||
*
|
*
|
||||||
* This routine disables interrupts. It can be called from either interrupt,
|
* This routine disables interrupts. It can be called from either interrupt,
|
||||||
* task or fiber level. This routine returns an architecture-dependent
|
* task or fiber level. This routine returns an architecture-dependent
|
||||||
|
@ -77,7 +77,7 @@ SECTION_FUNC(TEXT, irq_lock)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_unlock - enable all interrupts on the local CPU
|
* @brief Enable all interrupts on the local CPU
|
||||||
*
|
*
|
||||||
* This routine re-enables interrupts on the local CPU. The <key> parameter
|
* This routine re-enables interrupts on the local CPU. The <key> parameter
|
||||||
* is an architecture-dependent lock-out key that is returned by a previous
|
* is an architecture-dependent lock-out key that is returned by a previous
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
#include <sw_isr_table.h>
|
#include <sw_isr_table.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* irq_handler_set - replace an interrupt handler by another
|
* @brief Replace an interrupt handler by another
|
||||||
*
|
*
|
||||||
* An interrupt's ISR can be replaced at runtime. Care must be taken that the
|
* An interrupt's ISR can be replaced at runtime. Care must be taken that the
|
||||||
* interrupt is disabled before doing this.
|
* interrupt is disabled before doing this.
|
||||||
|
@ -85,7 +85,7 @@ void irq_handler_set(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* irq_enable - enable an interrupt line
|
* @brief Enable an interrupt line
|
||||||
*
|
*
|
||||||
* Clear possible pending interrupts on the line, and enable the interrupt
|
* Clear possible pending interrupts on the line, and enable the interrupt
|
||||||
* line. After this call, the CPU will receive interrupts for the specified
|
* line. After this call, the CPU will receive interrupts for the specified
|
||||||
|
@ -103,7 +103,7 @@ void irq_enable(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* irq_disable - disable an interrupt line
|
* @brief Disable an interrupt line
|
||||||
*
|
*
|
||||||
* Disable an interrupt line. After this call, the CPU will stop receiving
|
* Disable an interrupt line. After this call, the CPU will stop receiving
|
||||||
* interrupts for the specified <irq>.
|
* interrupts for the specified <irq>.
|
||||||
|
@ -120,7 +120,7 @@ void irq_disable(unsigned int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* irq_priority_set - set an interrupt's priority
|
* @brief Set an interrupt's priority
|
||||||
*
|
*
|
||||||
* Valid values are from 0 to 15. Interrupts of priority 1 are not masked when
|
* Valid values are from 0 to 15. Interrupts of priority 1 are not masked when
|
||||||
* interrupts are locked system-wide, so care must be taken when using them. ISR
|
* interrupts are locked system-wide, so care must be taken when using them. ISR
|
||||||
|
@ -145,7 +145,7 @@ void irq_priority_set(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _irq_spurious - spurious interrupt handler
|
* @brief Spurious interrupt handler
|
||||||
*
|
*
|
||||||
* Installed in all dynamic interrupt slots at boot time. Throws an error if
|
* Installed in all dynamic interrupt slots at boot time. Throws an error if
|
||||||
* called.
|
* called.
|
||||||
|
@ -163,7 +163,7 @@ void _irq_spurious(void *unused)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* irq_connect - connect an ISR to an interrupt line
|
* @brief Connect an ISR to an interrupt line
|
||||||
*
|
*
|
||||||
* <isr> is connected to interrupt line <irq>, a number greater than or equal
|
* <isr> is connected to interrupt line <irq>, a number greater than or equal
|
||||||
* 16. No prior ISR can have been connected on <irq> interrupt line since the
|
* 16. No prior ISR can have been connected on <irq> interrupt line since the
|
||||||
|
@ -188,7 +188,7 @@ int irq_connect(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* irq_disconnect - disconnect an ISR from an interrupt line
|
* @brief Disconnect an ISR from an interrupt line
|
||||||
*
|
*
|
||||||
* Interrupt line <irq> is disconnected from its ISR and the latter is
|
* Interrupt line <irq> is disconnected from its ISR and the latter is
|
||||||
* replaced by _irq_spurious(). irq_disable() should have been called before
|
* replaced by _irq_spurious(). irq_disable() should have been called before
|
||||||
|
|
|
@ -51,7 +51,7 @@ GTEXT(_rirq_exit)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _rirq_enter - work to be done before handing control to an IRQ ISR
|
* @brief Work to be done before handing control to an IRQ ISR
|
||||||
*
|
*
|
||||||
* The processor pushes automatically all registers that need to be saved.
|
* The processor pushes automatically all registers that need to be saved.
|
||||||
* However, since the processor always runs at kernel privilege there is no
|
* However, since the processor always runs at kernel privilege there is no
|
||||||
|
@ -77,7 +77,7 @@ SECTION_FUNC(TEXT, _rirq_enter)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _rirq_exit - work to be done exiting an IRQ
|
* @brief Work to be done exiting an IRQ
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -53,7 +53,7 @@ GDATA(_nanokernel)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _Swap - initiate a cooperative context switch
|
* @brief Initiate a cooperative context switch
|
||||||
*
|
*
|
||||||
* The _Swap() routine is invoked by various nanokernel services to effect
|
* The _Swap() routine is invoked by various nanokernel services to effect
|
||||||
* a cooperative context context switch. Prior to invoking _Swap(), the caller
|
* a cooperative context context switch. Prior to invoking _Swap(), the caller
|
||||||
|
|
|
@ -63,7 +63,7 @@ static inline void nonEssentialTaskAbort(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysFatalErrorHandler - fatal error handler
|
* @brief Fatal error handler
|
||||||
*
|
*
|
||||||
* This routine implements the corrective action to be taken when the system
|
* This routine implements the corrective action to be taken when the system
|
||||||
* detects a fatal error.
|
* detects a fatal error.
|
||||||
|
|
|
@ -240,7 +240,7 @@ static ALWAYS_INLINE void nanoArchInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* fiberRtnValueSet - set the return value for the specified fiber (inline)
|
* @brief Set the return value for the specified fiber (inline)
|
||||||
*
|
*
|
||||||
* The register used to store the return value from a function call invocation
|
* The register used to store the return value from a function call invocation
|
||||||
* to <value>. It is assumed that the specified <fiber> is pending, and thus
|
* to <value>. It is assumed that the specified <fiber> is pending, and thus
|
||||||
|
@ -258,7 +258,7 @@ static ALWAYS_INLINE void fiberRtnValueSet(tCCS *fiber, unsigned int value)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IS_IN_ISR - indicates if kernel is handling interrupt
|
* @brief Indicates if kernel is handling interrupt
|
||||||
*
|
*
|
||||||
* @return 1 if interrupt handler is executed, 0 otherwise
|
* @return 1 if interrupt handler is executed, 0 otherwise
|
||||||
*
|
*
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#define CACHE_CACHE_CONTROLLED 0x20
|
#define CACHE_CACHE_CONTROLLED 0x20
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _icache_enable - sets the I-cache
|
* @brief Sets the I-cache
|
||||||
*
|
*
|
||||||
* Enables cache and sets the direct access.
|
* Enables cache and sets the direct access.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -46,7 +46,7 @@ initialization is performed.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* bssZero - clear BSS
|
* @brief Clear BSS
|
||||||
*
|
*
|
||||||
* This routine clears the BSS region, so all bytes are 0.
|
* This routine clears the BSS region, so all bytes are 0.
|
||||||
*
|
*
|
||||||
|
@ -65,7 +65,7 @@ static void bssZero(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* dataCopy - copy the data section from ROM to RAM
|
* @brief Copy the data section from ROM to RAM
|
||||||
*
|
*
|
||||||
* This routine copies the data section from ROM to RAM.
|
* This routine copies the data section from ROM to RAM.
|
||||||
*
|
*
|
||||||
|
@ -92,7 +92,7 @@ static void dataCopy(void)
|
||||||
extern FUNC_NORETURN void _Cstart(void);
|
extern FUNC_NORETURN void _Cstart(void);
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _PrepC - prepare to and run C code
|
* @brief Prepare to and run C code
|
||||||
*
|
*
|
||||||
* This routine prepares for the execution of and runs C code.
|
* This routine prepares for the execution of and runs C code.
|
||||||
*
|
*
|
||||||
|
|
|
@ -48,7 +48,7 @@ GTEXT(__reset)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __reset - reset vector
|
* @brief Reset vector
|
||||||
*
|
*
|
||||||
* Ran when the system comes out of reset. The processor is at supervisor level.
|
* Ran when the system comes out of reset. The processor is at supervisor level.
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,7 @@ static _NmiHandler_t handler = _SysNmiOnReset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _DefaultHandler - default NMI handler installed when kernel is up
|
* @brief Default NMI handler installed when kernel is up
|
||||||
*
|
*
|
||||||
* The default handler outputs a error message and reboots the target. It is
|
* The default handler outputs a error message and reboots the target. It is
|
||||||
* installed by calling _NmiInit();
|
* installed by calling _NmiInit();
|
||||||
|
@ -70,7 +70,7 @@ static void _DefaultHandler(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NmiInit - install default runtime NMI handler
|
* @brief Install default runtime NMI handler
|
||||||
*
|
*
|
||||||
* Meant to be called by BSP code if they want to install a simple NMI handler
|
* Meant to be called by BSP code if they want to install a simple NMI handler
|
||||||
* that reboots the target. It should be installed after the console is
|
* that reboots the target. It should be installed after the console is
|
||||||
|
@ -86,7 +86,7 @@ void _NmiInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NmiHandlerSet - install a custom runtime NMI handler
|
* @brief Install a custom runtime NMI handler
|
||||||
*
|
*
|
||||||
* Meant to be called by BSP code if they want to install a custom NMI handler
|
* Meant to be called by BSP code if they want to install a custom NMI handler
|
||||||
* that reboots. It should be installed after the console is initialized if it is
|
* that reboots. It should be installed after the console is initialized if it is
|
||||||
|
@ -103,7 +103,7 @@ void _NmiHandlerSet(void (*pHandler)(void))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __nmi - handler installed in the vector table
|
* @brief Handler installed in the vector table
|
||||||
*
|
*
|
||||||
* Simply call what is installed in 'static void(*handler)(void)'.
|
* Simply call what is installed in 'static void(*handler)(void)'.
|
||||||
*
|
*
|
||||||
|
|
|
@ -46,7 +46,7 @@ initialization is performed.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* bssZero - clear BSS
|
* @brief Clear BSS
|
||||||
*
|
*
|
||||||
* This routine clears the BSS region, so all bytes are 0.
|
* This routine clears the BSS region, so all bytes are 0.
|
||||||
*
|
*
|
||||||
|
@ -65,7 +65,7 @@ static void bssZero(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* dataCopy - copy the data section from ROM to RAM
|
* @brief Copy the data section from ROM to RAM
|
||||||
*
|
*
|
||||||
* This routine copies the data section from ROM to RAM.
|
* This routine copies the data section from ROM to RAM.
|
||||||
*
|
*
|
||||||
|
@ -92,7 +92,7 @@ static void dataCopy(void)
|
||||||
extern FUNC_NORETURN void _Cstart(void);
|
extern FUNC_NORETURN void _Cstart(void);
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _PrepC - prepare to and run C code
|
* @brief Prepare to and run C code
|
||||||
*
|
*
|
||||||
* This routine prepares for the execution of and runs C code.
|
* This routine prepares for the execution of and runs C code.
|
||||||
*
|
*
|
||||||
|
|
|
@ -49,7 +49,7 @@ GTEXT(__reset)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __reset - reset vector
|
* @brief Reset vector
|
||||||
*
|
*
|
||||||
* Ran when the system comes out of reset. The processor is in thread mode with
|
* Ran when the system comes out of reset. The processor is in thread mode with
|
||||||
* privileged level. At this point, the main stack pointer (MSP) is already
|
* privileged level. At this point, the main stack pointer (MSP) is already
|
||||||
|
|
|
@ -46,7 +46,7 @@ definitions and more complex routines, if needed.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ScbSystemReset - reset the system
|
* @brief Reset the system
|
||||||
*
|
*
|
||||||
* This routine resets the processor.
|
* This routine resets the processor.
|
||||||
*
|
*
|
||||||
|
@ -65,7 +65,7 @@ void _ScbSystemReset(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ScbNumPriGroupSet - set the number of priority groups based on the number
|
* @brief Set the number of priority groups based on the number
|
||||||
* of exception priorities desired
|
* of exception priorities desired
|
||||||
*
|
*
|
||||||
* Exception priorities can be divided in priority groups, inside which there is
|
* Exception priorities can be divided in priority groups, inside which there is
|
||||||
|
|
|
@ -63,7 +63,7 @@ static inline void nonEssentialTaskAbort(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysFatalErrorHandler - fatal error handler
|
* @brief Fatal error handler
|
||||||
*
|
*
|
||||||
* This routine implements the corrective action to be taken when the system
|
* This routine implements the corrective action to be taken when the system
|
||||||
* detects a fatal error.
|
* detects a fatal error.
|
||||||
|
|
|
@ -61,7 +61,7 @@ GTEXT(atomic_cas)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_clear - atomically clear a memory location
|
* @brief Atomically clear a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically clears the contents of <target> and returns the old
|
* This routine atomically clears the contents of <target> and returns the old
|
||||||
* value that was in <target>.
|
* value that was in <target>.
|
||||||
|
@ -84,7 +84,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_clear_set, atomic_clear)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_set - atomically set a memory location
|
* @brief Atomically set a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically sets the contents of <target> to <value> and returns
|
* This routine atomically sets the contents of <target> to <value> and returns
|
||||||
* the old value that was in <target>.
|
* the old value that was in <target>.
|
||||||
|
@ -116,7 +116,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_clear_set, atomic_set)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_get - Get the value of a shared memory atomically
|
* @brief Get the value of a shared memory atomically
|
||||||
*
|
*
|
||||||
* This routine atomically retrieves the value in *target
|
* This routine atomically retrieves the value in *target
|
||||||
*
|
*
|
||||||
|
@ -135,7 +135,7 @@ SECTION_FUNC(TEXT, atomic_get)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_inc - atomically increment a memory location
|
* @brief Atomically increment a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically increments the value in <target>. The operation is
|
* This routine atomically increments the value in <target>. The operation is
|
||||||
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
||||||
|
@ -161,7 +161,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_inc_add, atomic_inc)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_add - atomically add a value to a memory location
|
* @brief Atomically add a value to a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically adds the contents of <target> and <value>, placing
|
* This routine atomically adds the contents of <target> and <value>, placing
|
||||||
* the result in <target>. The operation is done using signed integer arithmetic.
|
* the result in <target>. The operation is done using signed integer arithmetic.
|
||||||
|
@ -195,7 +195,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_inc_add, atomic_add)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_dec - atomically decrement a memory location
|
* @brief Atomically decrement a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically decrements the value in <target>. The operation is
|
* This routine atomically decrements the value in <target>. The operation is
|
||||||
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
* done using unsigned integer arithmetic. Various CPU architectures may impose
|
||||||
|
@ -221,7 +221,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_decSub, atomic_dec)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_sub - atomically subtract a value from a memory location
|
* @brief Atomically subtract a value from a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically subtracts <value> from the contents of <target>,
|
* This routine atomically subtracts <value> from the contents of <target>,
|
||||||
* placing the result in <target>. The operation is done using signed integer
|
* placing the result in <target>. The operation is done using signed integer
|
||||||
|
@ -255,7 +255,7 @@ SECTION_SUBSEC_FUNC(TEXT, atomic_decSub, atomic_sub)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_nand - atomically perform a bitwise NAND on a memory location
|
* @brief Atomically perform a bitwise NAND on a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise NAND operation of the contents of
|
* This routine atomically performs a bitwise NAND operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -290,7 +290,7 @@ SECTION_FUNC(TEXT, atomic_nand)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_and - atomically perform a bitwise AND on a memory location
|
* @brief Atomically perform a bitwise AND on a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise AND operation of the contents of
|
* This routine atomically performs a bitwise AND operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -324,7 +324,7 @@ SECTION_FUNC(TEXT, atomic_and)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_or - atomically perform a bitwise OR on memory location
|
* @brief Atomically perform a bitwise OR on memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise OR operation of the contents of
|
* This routine atomically performs a bitwise OR operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -358,7 +358,7 @@ SECTION_FUNC(TEXT, atomic_or)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_xor - atomically perform a bitwise XOR on a memory location
|
* @brief Atomically perform a bitwise XOR on a memory location
|
||||||
*
|
*
|
||||||
* This routine atomically performs a bitwise XOR operation of the contents of
|
* This routine atomically performs a bitwise XOR operation of the contents of
|
||||||
* <target> and <value>, placing the result in <target>.
|
* <target> and <value>, placing the result in <target>.
|
||||||
|
@ -392,7 +392,7 @@ SECTION_FUNC(TEXT, atomic_xor)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_cas - atomically compare-and-swap the contents of a memory location
|
* @brief Atomically compare-and-swap the contents of a memory location
|
||||||
*
|
*
|
||||||
* This routine performs an atomic compare-and-swap. testing that the contents of
|
* This routine performs an atomic compare-and-swap. testing that the contents of
|
||||||
* <target> contains <oldValue>, and if it does, setting the value of <target>
|
* <target> contains <oldValue>, and if it does, setting the value of <target>
|
||||||
|
|
|
@ -61,7 +61,7 @@ GTEXT(irq_unlock)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_lock - lock interrupts
|
* @brief Lock interrupts
|
||||||
*
|
*
|
||||||
* Prevent exceptions of priority lower than to the two highest priorities from
|
* Prevent exceptions of priority lower than to the two highest priorities from
|
||||||
* interrupting the CPU.
|
* interrupting the CPU.
|
||||||
|
@ -80,7 +80,7 @@ SECTION_FUNC(TEXT,irq_lock)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_unlock - unlock interrupts
|
* @brief Unlock interrupts
|
||||||
*
|
*
|
||||||
* Return the state of interrupt locking to a previous level, passed in via the
|
* Return the state of interrupt locking to a previous level, passed in via the
|
||||||
* <key> parameter, obtained from a previous call to irq_lock().
|
* <key> parameter, obtained from a previous call to irq_lock().
|
||||||
|
|
|
@ -55,7 +55,7 @@ tNANO _nanokernel = {0};
|
||||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _context_monitor_init - initialize context monitoring support
|
* @brief Initialize context monitoring support
|
||||||
*
|
*
|
||||||
* Currently only inserts the new context in the list of active contexts.
|
* Currently only inserts the new context in the list of active contexts.
|
||||||
*
|
*
|
||||||
|
@ -83,7 +83,7 @@ static ALWAYS_INLINE void _context_monitor_init(struct ccs *pCcs /* context */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NewContext - intialize a new context (thread) from its stack space
|
* @brief Intialize a new context (thread) from its stack space
|
||||||
*
|
*
|
||||||
* The control structure (CCS) is put at the lower address of the stack. An
|
* The control structure (CCS) is put at the lower address of the stack. An
|
||||||
* initial context, to be "restored" by __pendsv(), is put at the other end of
|
* initial context, to be "restored" by __pendsv(), is put at the other end of
|
||||||
|
|
|
@ -58,7 +58,7 @@ GTEXT(nano_cpu_atomic_idle)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _CpuIdleInit - initialization of CPU idle
|
* @brief Initialization of CPU idle
|
||||||
*
|
*
|
||||||
* Only called by nanoArchInit(). Sets SEVONPEND bit once for the system's
|
* Only called by nanoArchInit(). Sets SEVONPEND bit once for the system's
|
||||||
* duration.
|
* duration.
|
||||||
|
@ -80,7 +80,7 @@ SECTION_FUNC(TEXT, _CpuIdleInit)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NanoIdleValGet - get the kernel idle setting
|
* @brief Get the kernel idle setting
|
||||||
*
|
*
|
||||||
* Returns the nanokernel idle setting, in ticks. Only called by __systick().
|
* Returns the nanokernel idle setting, in ticks. Only called by __systick().
|
||||||
*
|
*
|
||||||
|
@ -98,7 +98,7 @@ SECTION_FUNC(TEXT, _NanoIdleValGet)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NanoIdleValClear - clear the kernel idle setting
|
* @brief Clear the kernel idle setting
|
||||||
*
|
*
|
||||||
* Sets the nanokernel idle setting to 0. Only called by __systick().
|
* Sets the nanokernel idle setting to 0. Only called by __systick().
|
||||||
*
|
*
|
||||||
|
@ -119,7 +119,7 @@ SECTION_FUNC(TEXT, _NanoIdleValClear)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nano_cpu_idle - power save idle routine for ARM Cortex-M
|
* @brief Power save idle routine for ARM Cortex-M
|
||||||
*
|
*
|
||||||
* This function will be called by the nanokernel idle loop or possibly within
|
* This function will be called by the nanokernel idle loop or possibly within
|
||||||
* an implementation of _sys_power_save_idle in the microkernel when the
|
* an implementation of _sys_power_save_idle in the microkernel when the
|
||||||
|
@ -144,7 +144,7 @@ SECTION_FUNC(TEXT, nano_cpu_idle)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nano_cpu_atomic_idle - atomically re-enable interrupts and enter low power mode
|
* @brief Atomically re-enable interrupts and enter low power mode
|
||||||
*
|
*
|
||||||
* This function is utilized by the nanokernel object "wait" APIs for task
|
* This function is utilized by the nanokernel object "wait" APIs for task
|
||||||
* contexts, e.g. nano_task_lifo_get_wait(), nano_task_sem_take_wait(), nano_task_stack_pop_wait(),
|
* contexts, e.g. nano_task_lifo_get_wait(), nano_task_sem_take_wait(), nano_task_stack_pop_wait(),
|
||||||
|
|
|
@ -63,7 +63,7 @@ GDATA(_nanokernel)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntExit - kernel housekeeping when exiting interrupt handler installed
|
* @brief Kernel housekeeping when exiting interrupt handler installed
|
||||||
* directly in vector table
|
* directly in vector table
|
||||||
*
|
*
|
||||||
* Kernel allows installing interrupt handlers (ISRs) directly into the vector
|
* Kernel allows installing interrupt handlers (ISRs) directly into the vector
|
||||||
|
@ -94,7 +94,7 @@ SECTION_SUBSEC_FUNC(TEXT, _HandlerModeExit, _IntExit)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ExcExit - kernel housekeeping when exiting exception handler installed
|
* @brief Kernel housekeeping when exiting exception handler installed
|
||||||
* directly in vector table
|
* directly in vector table
|
||||||
*
|
*
|
||||||
* See _IntExit().
|
* See _IntExit().
|
||||||
|
|
|
@ -64,7 +64,7 @@ const NANO_ESF _default_esf = {0xdeaddead, /* a1 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NanoFatalErrorHandler - nanokernel fatal error handler
|
* @brief Nanokernel fatal error handler
|
||||||
*
|
*
|
||||||
* This routine is called when fatal error conditions are detected by software
|
* This routine is called when fatal error conditions are detected by software
|
||||||
* and is responsible only for reporting the error. Once reported, it then
|
* and is responsible only for reporting the error. Once reported, it then
|
||||||
|
|
|
@ -61,7 +61,7 @@ Common fault handler for ARM Cortex-M processors.
|
||||||
#if (CONFIG_FAULT_DUMP == 1)
|
#if (CONFIG_FAULT_DUMP == 1)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FaultDump - dump information regarding fault (FAULT_DUMP == 1)
|
* @brief Dump information regarding fault (FAULT_DUMP == 1)
|
||||||
*
|
*
|
||||||
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 1
|
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 1
|
||||||
* (short form).
|
* (short form).
|
||||||
|
@ -120,7 +120,7 @@ void _FaultDump(const NANO_ESF *esf, int fault)
|
||||||
#if (CONFIG_FAULT_DUMP == 2)
|
#if (CONFIG_FAULT_DUMP == 2)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FaultContextShow - dump context information
|
* @brief Dump context information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -139,7 +139,7 @@ static void _FaultContextShow(const NANO_ESF *esf)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _MpuFault - dump MPU fault information
|
* @brief Dump MPU fault information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -174,7 +174,7 @@ static void _MpuFault(const NANO_ESF *esf,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _BusFault - dump bus fault information
|
* @brief Dump bus fault information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -215,7 +215,7 @@ static void _BusFault(const NANO_ESF *esf,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _UsageFault - dump usage fault information
|
* @brief Dump usage fault information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -255,7 +255,7 @@ static void _UsageFault(const NANO_ESF *esf)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _HardFault - dump hard fault information
|
* @brief Dump hard fault information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -283,7 +283,7 @@ static void _HardFault(const NANO_ESF *esf)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _DebugMonitor - dump debug monitor exception information
|
* @brief Dump debug monitor exception information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -299,7 +299,7 @@ static void _DebugMonitor(const NANO_ESF *esf)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ReservedException - dump reserved exception information
|
* @brief Dump reserved exception information
|
||||||
*
|
*
|
||||||
* See _FaultDump() for example.
|
* See _FaultDump() for example.
|
||||||
*
|
*
|
||||||
|
@ -318,7 +318,7 @@ static void _ReservedException(const NANO_ESF *esf,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FaultDump - dump information regarding fault (FAULT_DUMP == 2)
|
* @brief Dump information regarding fault (FAULT_DUMP == 2)
|
||||||
*
|
*
|
||||||
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 2
|
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 2
|
||||||
* (long form).
|
* (long form).
|
||||||
|
@ -365,7 +365,7 @@ static void _FaultDump(const NANO_ESF *esf, int fault)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _Fault - fault handler
|
* @brief Fault handler
|
||||||
*
|
*
|
||||||
* This routine is called when fatal error conditions are detected by hardware
|
* This routine is called when fatal error conditions are detected by hardware
|
||||||
* and is responsible only for reporting the error. Once reported, it then
|
* and is responsible only for reporting the error. Once reported, it then
|
||||||
|
@ -396,7 +396,7 @@ void _Fault(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FaultInit - initialization of fault handling
|
* @brief Initialization of fault handling
|
||||||
*
|
*
|
||||||
* Turns on the desired hardware faults.
|
* Turns on the desired hardware faults.
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,7 @@ GTEXT(__reserved)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __fault - fault handler installed in the fault and reserved vectors
|
* @brief Fault handler installed in the fault and reserved vectors
|
||||||
*
|
*
|
||||||
* Entry point for the hard fault, MPU fault, bus fault, usage fault, debug
|
* Entry point for the hard fault, MPU fault, bus fault, usage fault, debug
|
||||||
* monitor and reserved exceptions.
|
* monitor and reserved exceptions.
|
||||||
|
|
|
@ -50,7 +50,7 @@ GTEXT(find_first_set)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* find_last_set - find first set bit (searching from the most significant bit)
|
* @brief Find first set bit (searching from the most significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and
|
* This routine finds the first bit set in the argument passed it and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
@ -71,7 +71,7 @@ SECTION_FUNC(TEXT, find_last_set)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* find_first_set - find first set bit (searching from the least significant bit)
|
* @brief Find first set bit (searching from the least significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and
|
* This routine finds the first bit set in the argument passed it and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
|
|
@ -53,7 +53,7 @@ the PendSV exception.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* fiber_abort - abort the currently executing fiber
|
* @brief Abort the currently executing fiber
|
||||||
*
|
*
|
||||||
* Possible reasons for a fiber aborting:
|
* Possible reasons for a fiber aborting:
|
||||||
*
|
*
|
||||||
|
|
|
@ -53,7 +53,7 @@ _ASM_FILE_PROLOGUE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _GdbStubExcEntry - exception entry extra work when GDB_INFO is enabled
|
* @brief Exception entry extra work when GDB_INFO is enabled
|
||||||
*
|
*
|
||||||
* During normal system operation, the callee-saved registers are saved lazily
|
* During normal system operation, the callee-saved registers are saved lazily
|
||||||
* only when a context switch is required. To allow looking at the current
|
* only when a context switch is required. To allow looking at the current
|
||||||
|
@ -97,7 +97,7 @@ SECTION_FUNC(TEXT, _GdbStubExcEntry)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _GdbStubExcExit - exception exit extra clean up when GDB_INFO is enabled
|
* @brief Exception exit extra clean up when GDB_INFO is enabled
|
||||||
*
|
*
|
||||||
* Record the fact that the thread is not interrupted anymore so that VQEMU
|
* Record the fact that the thread is not interrupted anymore so that VQEMU
|
||||||
* looks at the CPU registers and not into the CCS to obtain the current
|
* looks at the CPU registers and not into the CCS to obtain the current
|
||||||
|
@ -131,8 +131,7 @@ SECTION_FUNC(TEXT, _GdbStubExcExit)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _irq_vector_table_entry_with_gdb_stub - stub for ISRs installed directly in
|
* @brief Stub for ISRs installed directly in vector table
|
||||||
* vector table
|
|
||||||
*
|
*
|
||||||
* The kernel on Cortex-M3/4 can be configured so that ISRs
|
* The kernel on Cortex-M3/4 can be configured so that ISRs
|
||||||
* are installed directly in the vector table for maximum efficiency.
|
* are installed directly in the vector table for maximum efficiency.
|
||||||
|
|
|
@ -47,7 +47,7 @@ the PendSV exception.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntLibInit - initialize interrupts
|
* @brief Initialize interrupts
|
||||||
*
|
*
|
||||||
* Ensures all interrupts have their priority set to _EXC_IRQ_DEFAULT_PRIO and
|
* Ensures all interrupts have their priority set to _EXC_IRQ_DEFAULT_PRIO and
|
||||||
* not 0, which they have it set to when coming out of reset. This ensures that
|
* not 0, which they have it set to when coming out of reset. This ensures that
|
||||||
|
|
|
@ -48,7 +48,7 @@ extern void __reserved(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_handler_set - replace an interrupt handler by another
|
* @brief Replace an interrupt handler by another
|
||||||
*
|
*
|
||||||
* An interrupt's ISR can be replaced at runtime. Care must be taken that the
|
* An interrupt's ISR can be replaced at runtime. Care must be taken that the
|
||||||
* interrupt is disabled before doing this.
|
* interrupt is disabled before doing this.
|
||||||
|
@ -78,7 +78,7 @@ void irq_handler_set(unsigned int irq,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_enable - enable an interrupt line
|
* @brief Enable an interrupt line
|
||||||
*
|
*
|
||||||
* Clear possible pending interrupts on the line, and enable the interrupt
|
* Clear possible pending interrupts on the line, and enable the interrupt
|
||||||
* line. After this call, the CPU will receive interrupts for the specified
|
* line. After this call, the CPU will receive interrupts for the specified
|
||||||
|
@ -96,7 +96,7 @@ void irq_enable(unsigned int irq)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_disable - disable an interrupt line
|
* @brief Disable an interrupt line
|
||||||
*
|
*
|
||||||
* Disable an interrupt line. After this call, the CPU will stop receiving
|
* Disable an interrupt line. After this call, the CPU will stop receiving
|
||||||
* interrupts for the specified <irq>.
|
* interrupts for the specified <irq>.
|
||||||
|
@ -111,7 +111,7 @@ void irq_disable(unsigned int irq)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_priority_set - set an interrupt's priority
|
* @brief Set an interrupt's priority
|
||||||
*
|
*
|
||||||
* Valid values are from 1 to 255. Interrupts of priority 1 are not masked when
|
* Valid values are from 1 to 255. Interrupts of priority 1 are not masked when
|
||||||
* interrupts are locked system-wide, so care must be taken when using them. ISR
|
* interrupts are locked system-wide, so care must be taken when using them. ISR
|
||||||
|
@ -133,7 +133,7 @@ void irq_priority_set(unsigned int irq,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _irq_spurious - spurious interrupt handler
|
* @brief Spurious interrupt handler
|
||||||
*
|
*
|
||||||
* Installed in all dynamic interrupt slots at boot time. Throws an error if
|
* Installed in all dynamic interrupt slots at boot time. Throws an error if
|
||||||
* called.
|
* called.
|
||||||
|
@ -151,7 +151,7 @@ void _irq_spurious(void *unused)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_connect - connect an ISR to an interrupt line
|
* @brief Connect an ISR to an interrupt line
|
||||||
*
|
*
|
||||||
* <isr> is connected to interrupt line <irq> (exception #<irq>+16). No prior
|
* <isr> is connected to interrupt line <irq> (exception #<irq>+16). No prior
|
||||||
* ISR can have been connected on <irq> interrupt line since the system booted.
|
* ISR can have been connected on <irq> interrupt line since the system booted.
|
||||||
|
@ -174,7 +174,7 @@ int irq_connect(unsigned int irq,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_disconnect - disconnect an ISR from an interrupt line
|
* @brief Disconnect an ISR from an interrupt line
|
||||||
*
|
*
|
||||||
* Interrupt line <irq> (exception #<irq>+16) is disconnected from its ISR and
|
* Interrupt line <irq> (exception #<irq>+16) is disconnected from its ISR and
|
||||||
* the latter is replaced by _irq_spurious(). irq_disable() should have
|
* the latter is replaced by _irq_spurious(). irq_disable() should have
|
||||||
|
|
|
@ -55,7 +55,7 @@ GTEXT(_IntExit)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _isr_wrapper - wrapper around ISRs when inserted in software ISR table
|
* @brief Wrapper around ISRs when inserted in software ISR table
|
||||||
*
|
*
|
||||||
* When inserted in the vector table, _isr_wrapper() demuxes the ISR table using
|
* When inserted in the vector table, _isr_wrapper() demuxes the ISR table using
|
||||||
* the running interrupt number as the index, and invokes the registered ISR
|
* the running interrupt number as the index, and invokes the registered ISR
|
||||||
|
|
|
@ -53,7 +53,7 @@ GDATA(_nanokernel)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __pendsv - PendSV exception handler, handling context switches
|
* @brief PendSV exception handler, handling context switches
|
||||||
*
|
*
|
||||||
* The PendSV exception is the only context in the system that can perform
|
* The PendSV exception is the only context in the system that can perform
|
||||||
* context switching. When an execution context finds out it has to switch
|
* context switching. When an execution context finds out it has to switch
|
||||||
|
@ -148,7 +148,7 @@ SECTION_FUNC(TEXT, __pendsv)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __svc - service call handler
|
* @brief Service call handler
|
||||||
*
|
*
|
||||||
* The service call (svc) is only used in _Swap() to enter handler mode so we
|
* The service call (svc) is only used in _Swap() to enter handler mode so we
|
||||||
* can go through the PendSV exception to perform a context switch.
|
* can go through the PendSV exception to perform a context switch.
|
||||||
|
@ -180,7 +180,7 @@ SECTION_FUNC(TEXT, __svc)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _Swap - initiate a cooperative context switch
|
* @brief Initiate a cooperative context switch
|
||||||
*
|
*
|
||||||
* The _Swap() routine is invoked by various nanokernel services to effect
|
* The _Swap() routine is invoked by various nanokernel services to effect
|
||||||
* a cooperative context context switch. Prior to invoking _Swap(), the caller
|
* a cooperative context context switch. Prior to invoking _Swap(), the caller
|
||||||
|
|
|
@ -54,7 +54,7 @@ static struct k_args cmd_packet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _TaskAbort - abort the current task
|
* @brief Abort the current task
|
||||||
*
|
*
|
||||||
* Possible reasons for a task aborting:
|
* Possible reasons for a task aborting:
|
||||||
*
|
*
|
||||||
|
|
|
@ -96,7 +96,7 @@ uint8_t __security_frdm_k64f_section __security_frdm_k64f[] = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* clkInit - initialize the system clock
|
* @brief Initialize the system clock
|
||||||
*
|
*
|
||||||
* This routine will configure the multipurpose clock generator (MCG) to
|
* This routine will configure the multipurpose clock generator (MCG) to
|
||||||
* set up the system clock.
|
* set up the system clock.
|
||||||
|
@ -249,7 +249,7 @@ static void clkInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* consoleInit - initialize target-only console
|
* @brief Initialize target-only console
|
||||||
*
|
*
|
||||||
* Only used for debugging.
|
* Only used for debugging.
|
||||||
*
|
*
|
||||||
|
@ -300,7 +300,7 @@ static void consoleInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _InitHardware - perform basic hardware initialization
|
* @brief Perform basic hardware initialization
|
||||||
*
|
*
|
||||||
* Initialize the interrupt controller device drivers and the
|
* Initialize the interrupt controller device drivers and the
|
||||||
* Kinetis UART device driver.
|
* Kinetis UART device driver.
|
||||||
|
|
|
@ -55,7 +55,7 @@ GTEXT(_WdogInit)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _WdogInit - Watchdog timer disable routine
|
* @brief Watchdog timer disable routine
|
||||||
*
|
*
|
||||||
* This routine will disable the watchdog timer.
|
* This routine will disable the watchdog timer.
|
||||||
*
|
*
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IpsrGet - obtain value of IPSR register
|
* @brief Obtain value of IPSR register
|
||||||
*
|
*
|
||||||
* Obtain and return current value of IPSR register.
|
* Obtain and return current value of IPSR register.
|
||||||
*
|
*
|
||||||
|
@ -61,7 +61,7 @@ static ALWAYS_INLINE uint32_t _IpsrGet(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _MspSet - set the value of the Main Stack Pointer register
|
* @brief Set the value of the Main Stack Pointer register
|
||||||
*
|
*
|
||||||
* Store the value of <msp> in MSP register.
|
* Store the value of <msp> in MSP register.
|
||||||
*
|
*
|
||||||
|
|
|
@ -49,7 +49,7 @@ Exception/interrupt context helpers.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IsInIsr - find out if running in an ISR context
|
* @brief Find out if running in an ISR context
|
||||||
*
|
*
|
||||||
* The current executing vector is found in the IPSR register. We consider the
|
* The current executing vector is found in the IPSR register. We consider the
|
||||||
* IRQs (exception 16 and up), and the PendSV and SYSTICK exceptions, to be
|
* IRQs (exception 16 and up), and the PendSV and SYSTICK exceptions, to be
|
||||||
|
@ -69,7 +69,7 @@ static ALWAYS_INLINE int _IsInIsr(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _ExcSetup - setup system exceptions
|
* @brief Setup system exceptions
|
||||||
*
|
*
|
||||||
* Set exception priorities to conform with the BASEPRI locking mechanism.
|
* Set exception priorities to conform with the BASEPRI locking mechanism.
|
||||||
* Set PendSV priority to lowest possible.
|
* Set PendSV priority to lowest possible.
|
||||||
|
|
|
@ -70,7 +70,7 @@ extern char _interrupt_stack[CONFIG_ISR_STACK_SIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _InterruptStackSetup - setup interrupt stack
|
* @brief Setup interrupt stack
|
||||||
*
|
*
|
||||||
* On Cortex-M, the interrupt stack is registered in the MSP (main stack
|
* On Cortex-M, the interrupt stack is registered in the MSP (main stack
|
||||||
* pointer) register, and switched to automatically when taking an exception.
|
* pointer) register, and switched to automatically when taking an exception.
|
||||||
|
|
|
@ -186,7 +186,7 @@ static ALWAYS_INLINE void nanoArchInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* fiberRtnValueSet - set the return value for the specified fiber (inline)
|
* @brief Set the return value for the specified fiber (inline)
|
||||||
*
|
*
|
||||||
* The register used to store the return value from a function call invocation
|
* The register used to store the return value from a function call invocation
|
||||||
* to <value>. It is assumed that the specified <fiber> is pending, and thus
|
* to <value>. It is assumed that the specified <fiber> is pending, and thus
|
||||||
|
|
|
@ -51,7 +51,7 @@ volatile struct __scp __scp_section __scp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ScpMainOscEnable - enable main oscillator with default frequency of 6MHz
|
* @brief Enable main oscillator with default frequency of 6MHz
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -61,7 +61,7 @@ extern void _NmiInit(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_generic_info_init - initialize generic information for one UART
|
* @brief Initialize generic information for one UART
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*
|
*
|
||||||
|
@ -81,7 +81,7 @@ inline void uart_generic_info_init(struct uart_init_info *pInfo)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* consoleInit - initialize target-only console
|
* @brief Initialize target-only console
|
||||||
*
|
*
|
||||||
* Only used for debugging.
|
* Only used for debugging.
|
||||||
*
|
*
|
||||||
|
@ -134,7 +134,7 @@ static void bluetooth_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _InitHardware - perform basic hardware initialization
|
* @brief Perform basic hardware initialization
|
||||||
*
|
*
|
||||||
* Initialize the interrupt controller device drivers and the
|
* Initialize the interrupt controller device drivers and the
|
||||||
* integrated 16550-compatible UART device driver.
|
* integrated 16550-compatible UART device driver.
|
||||||
|
|
|
@ -46,7 +46,7 @@ This module contains functions for manipulation caches.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysCacheFlush - flush a page to main memory
|
* @brief Flush a page to main memory
|
||||||
*
|
*
|
||||||
* No alignment is required for either <virt> or <size>, but since
|
* No alignment is required for either <virt> or <size>, but since
|
||||||
* _SysCacheFlush() iterates on the cache lines, a cache line alignment for both
|
* _SysCacheFlush() iterates on the cache lines, a cache line alignment for both
|
||||||
|
|
|
@ -44,7 +44,7 @@ This module contains functions for manipulating caches.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysCacheFlush - flush a page to main memory
|
* @brief Flush a page to main memory
|
||||||
*
|
*
|
||||||
* This implementation flushes the whole cache.
|
* This implementation flushes the whole cache.
|
||||||
*
|
*
|
||||||
|
|
|
@ -68,7 +68,7 @@ as there is no requirement for this capability.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_cas - atomic compare-and-set primitive
|
* @brief Atomic compare-and-set primitive
|
||||||
*
|
*
|
||||||
* This routine provides the compare-and-set operator. If the original value at
|
* This routine provides the compare-and-set operator. If the original value at
|
||||||
* <target> equals <oldValue>, then <newValue> is stored at <target> and the
|
* <target> equals <oldValue>, then <newValue> is stored at <target> and the
|
||||||
|
@ -115,7 +115,7 @@ BRANCH_LABEL(atomic_cas1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_add - atomic add primitive
|
* @brief Atomic add primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic addition operator. The <value> is
|
* This routine provides the atomic addition operator. The <value> is
|
||||||
* atomically added to the value at <target>, placing the result at <target>,
|
* atomically added to the value at <target>, placing the result at <target>,
|
||||||
|
@ -147,7 +147,7 @@ SECTION_FUNC(TEXT, atomic_add)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_sub - atomic subtraction primitive
|
* @brief Atomic subtraction primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic subtraction operator. The <value> is
|
* This routine provides the atomic subtraction operator. The <value> is
|
||||||
* atomically subtracted from the value at <target>, placing the result at
|
* atomically subtracted from the value at <target>, placing the result at
|
||||||
|
@ -180,7 +180,7 @@ SECTION_FUNC(TEXT, atomic_sub)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_inc - atomic increment primitive
|
* @brief Atomic increment primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic increment operator. The value at <target>
|
* This routine provides the atomic increment operator. The value at <target>
|
||||||
* is atomically incremented by 1, and the old value from <target> is returned.
|
* is atomically incremented by 1, and the old value from <target> is returned.
|
||||||
|
@ -212,7 +212,7 @@ SECTION_FUNC(TEXT, atomic_inc)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_dec - atomic decrement primitive
|
* @brief Atomic decrement primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic decrement operator. The value at <target>
|
* This routine provides the atomic decrement operator. The value at <target>
|
||||||
* is atomically decremented by 1, and the old value from <target> is returned.
|
* is atomically decremented by 1, and the old value from <target> is returned.
|
||||||
|
@ -242,7 +242,7 @@ SECTION_FUNC(TEXT, atomic_dec)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_get - atomic get primitive
|
* @brief Atomic get primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic get primitive to atomically read
|
* This routine provides the atomic get primitive to atomically read
|
||||||
* a value from <target>. It simply does an ordinary load. Note that <target>
|
* a value from <target>. It simply does an ordinary load. Note that <target>
|
||||||
|
@ -266,7 +266,7 @@ SECTION_FUNC(TEXT, atomic_get)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_set - atomic get-and-set primitive
|
* @brief Atomic get-and-set primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic set operator. The <value> is atomically
|
* This routine provides the atomic set operator. The <value> is atomically
|
||||||
* written at <target> and the previous value at <target> is returned.
|
* written at <target> and the previous value at <target> is returned.
|
||||||
|
@ -306,7 +306,7 @@ SECTION_FUNC(TEXT, atomic_set)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_clear - atomic clear primitive
|
* @brief Atomic clear primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic clear operator. The value of 0 is atomically
|
* This routine provides the atomic clear operator. The value of 0 is atomically
|
||||||
* written at <target> and the previous value at <target> is returned. (Hence,
|
* written at <target> and the previous value at <target> is returned. (Hence,
|
||||||
|
@ -343,7 +343,7 @@ SECTION_FUNC(TEXT, atomic_clear)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_or - atomic bitwise inclusive OR primitive
|
* @brief Atomic bitwise inclusive OR primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise inclusive OR operator. The <value>
|
* This routine provides the atomic bitwise inclusive OR operator. The <value>
|
||||||
* is atomically bitwise OR'ed with the value at <target>, placing the result
|
* is atomically bitwise OR'ed with the value at <target>, placing the result
|
||||||
|
@ -381,7 +381,7 @@ BRANCH_LABEL(atomic_or_retry)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_xor - atomic bitwise exclusive OR (XOR) primitive
|
* @brief Atomic bitwise exclusive OR (XOR) primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise exclusive OR operator. The <value>
|
* This routine provides the atomic bitwise exclusive OR operator. The <value>
|
||||||
* is atomically bitwise XOR'ed with the value at <target>, placing the result
|
* is atomically bitwise XOR'ed with the value at <target>, placing the result
|
||||||
|
@ -419,7 +419,7 @@ BRANCH_LABEL(atomic_xor_retry)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_and - atomic bitwise AND primitive
|
* @brief Atomic bitwise AND primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise AND operator. The <value> is
|
* This routine provides the atomic bitwise AND operator. The <value> is
|
||||||
* atomically bitwise AND'ed with the value at <target>, placing the result
|
* atomically bitwise AND'ed with the value at <target>, placing the result
|
||||||
|
@ -457,7 +457,7 @@ BRANCH_LABEL(atomic_and_retry)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_nand - atomic bitwise NAND primitive
|
* @brief Atomic bitwise NAND primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise NAND operator. The <value> is
|
* This routine provides the atomic bitwise NAND operator. The <value> is
|
||||||
* atomically bitwise NAND'ed with the value at <target>, placing the result
|
* atomically bitwise NAND'ed with the value at <target>, placing the result
|
||||||
|
|
|
@ -52,7 +52,7 @@ as there is no requirement for this capability.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_cas - atomic compare-and-set primitive
|
* @brief Atomic compare-and-set primitive
|
||||||
*
|
*
|
||||||
* This routine provides the compare-and-set operator. If the original value at
|
* This routine provides the compare-and-set operator. If the original value at
|
||||||
* <target> equals <oldValue>, then <newValue> is stored at <target> and the
|
* <target> equals <oldValue>, then <newValue> is stored at <target> and the
|
||||||
|
@ -90,7 +90,7 @@ int atomic_cas(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_add - atomic addition primitive
|
* @brief Atomic addition primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic addition operator. The <value> is
|
* This routine provides the atomic addition operator. The <value> is
|
||||||
* atomically added to the value at <target>, placing the result at <target>,
|
* atomically added to the value at <target>, placing the result at <target>,
|
||||||
|
@ -116,7 +116,7 @@ atomic_val_t atomic_add(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_sub - atomic subtraction primitive
|
* @brief Atomic subtraction primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic subtraction operator. The <value> is
|
* This routine provides the atomic subtraction operator. The <value> is
|
||||||
* atomically subtracted from the value at <target>, placing the result at
|
* atomically subtracted from the value at <target>, placing the result at
|
||||||
|
@ -142,7 +142,7 @@ atomic_val_t atomic_sub(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_inc - atomic increment primitive
|
* @brief Atomic increment primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic increment operator. The value at <target>
|
* This routine provides the atomic increment operator. The value at <target>
|
||||||
* is atomically incremented by 1, and the old value from <target> is returned.
|
* is atomically incremented by 1, and the old value from <target> is returned.
|
||||||
|
@ -166,7 +166,7 @@ atomic_val_t atomic_inc(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_dec - atomic decrement primitive
|
* @brief Atomic decrement primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic decrement operator. The value at <target>
|
* This routine provides the atomic decrement operator. The value at <target>
|
||||||
* is atomically decremented by 1, and the old value from <target> is returned.
|
* is atomically decremented by 1, and the old value from <target> is returned.
|
||||||
|
@ -190,7 +190,7 @@ atomic_val_t atomic_dec(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_get - atomic get primitive
|
* @brief Atomic get primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic get primitive to atomically read
|
* This routine provides the atomic get primitive to atomically read
|
||||||
* a value from <target>. It simply does an ordinary load. Note that <target>
|
* a value from <target>. It simply does an ordinary load. Note that <target>
|
||||||
|
@ -207,7 +207,7 @@ atomic_val_t atomic_get(const atomic_t *target /* memory location to read from *
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_set - atomic get-and-set primitive
|
* @brief Atomic get-and-set primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic set operator. The <value> is atomically
|
* This routine provides the atomic set operator. The <value> is atomically
|
||||||
* written at <target> and the previous value at <target> is returned.
|
* written at <target> and the previous value at <target> is returned.
|
||||||
|
@ -232,7 +232,7 @@ atomic_val_t atomic_set(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_clear - atomic clear primitive
|
* @brief Atomic clear primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic clear operator. The value of 0 is atomically
|
* This routine provides the atomic clear operator. The value of 0 is atomically
|
||||||
* written at <target> and the previous value at <target> is returned. (Hence,
|
* written at <target> and the previous value at <target> is returned. (Hence,
|
||||||
|
@ -257,7 +257,7 @@ atomic_val_t atomic_clear(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_or - atomic bitwise inclusive OR primitive
|
* @brief Atomic bitwise inclusive OR primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise inclusive OR operator. The <value>
|
* This routine provides the atomic bitwise inclusive OR operator. The <value>
|
||||||
* is atomically bitwise OR'ed with the value at <target>, placing the result
|
* is atomically bitwise OR'ed with the value at <target>, placing the result
|
||||||
|
@ -283,7 +283,7 @@ atomic_val_t atomic_or(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_xor - atomic bitwise exclusive OR (XOR) primitive
|
* @brief Atomic bitwise exclusive OR (XOR) primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise exclusive OR operator. The <value>
|
* This routine provides the atomic bitwise exclusive OR operator. The <value>
|
||||||
* is atomically bitwise XOR'ed with the value at <target>, placing the result
|
* is atomically bitwise XOR'ed with the value at <target>, placing the result
|
||||||
|
@ -309,7 +309,7 @@ atomic_val_t atomic_xor(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_and - atomic bitwise AND primitive
|
* @brief Atomic bitwise AND primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise AND operator. The <value> is
|
* This routine provides the atomic bitwise AND operator. The <value> is
|
||||||
* atomically bitwise AND'ed with the value at <target>, placing the result
|
* atomically bitwise AND'ed with the value at <target>, placing the result
|
||||||
|
@ -335,7 +335,7 @@ atomic_val_t atomic_and(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* atomic_nand - atomic bitwise NAND primitive
|
* @brief Atomic bitwise NAND primitive
|
||||||
*
|
*
|
||||||
* This routine provides the atomic bitwise NAND operator. The <value> is
|
* This routine provides the atomic bitwise NAND operator. The <value> is
|
||||||
* atomically bitwise NAND'ed with the value at <target>, placing the result
|
* atomically bitwise NAND'ed with the value at <target>, placing the result
|
||||||
|
|
|
@ -59,7 +59,7 @@ void _ContextEntryWrapper(_ContextEntry, _ContextArg, _ContextArg, _ContextArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NewContextInternal - initialize a new execution context
|
* @brief Initialize a new execution context
|
||||||
*
|
*
|
||||||
* This function is utilized to initialize all execution contexts (both fiber
|
* This function is utilized to initialize all execution contexts (both fiber
|
||||||
* and task). The 'priority' parameter will be set to -1 for the creation of
|
* and task). The 'priority' parameter will be set to -1 for the creation of
|
||||||
|
@ -208,7 +208,7 @@ static void _NewContextInternal(
|
||||||
#ifdef CONFIG_GDB_INFO
|
#ifdef CONFIG_GDB_INFO
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ContextEntryWrapper - adjust stack before invoking _context_entry
|
* @brief Adjust stack before invoking _context_entry
|
||||||
*
|
*
|
||||||
* This function adjusts the initial stack frame created by _NewContext()
|
* This function adjusts the initial stack frame created by _NewContext()
|
||||||
* such that the GDB stack frame unwinders recognize it as the outermost frame
|
* such that the GDB stack frame unwinders recognize it as the outermost frame
|
||||||
|
@ -275,7 +275,7 @@ __asm__("\t.globl _context_entry\n"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NewContext - create a new kernel execution context
|
* @brief Create a new kernel execution context
|
||||||
*
|
*
|
||||||
* This function is utilized to create execution contexts for both fiber
|
* This function is utilized to create execution contexts for both fiber
|
||||||
* contexts and kernel task contexts.
|
* contexts and kernel task contexts.
|
||||||
|
|
|
@ -66,7 +66,7 @@ by nano_cpu_atomic_idle().
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nano_cpu_idle - power save idle routine for IA-32
|
* @brief Power save idle routine for IA-32
|
||||||
*
|
*
|
||||||
* This function will be called by the nanokernel idle loop or possibly within
|
* This function will be called by the nanokernel idle loop or possibly within
|
||||||
* an implementation of _sys_power_save_idle in the microkernel when the
|
* an implementation of _sys_power_save_idle in the microkernel when the
|
||||||
|
@ -96,7 +96,7 @@ SECTION_FUNC(TEXT, nano_cpu_idle)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nano_cpu_atomic_idle - atomically re-enable interrupts and enter low power mode
|
* @brief Atomically re-enable interrupts and enter low power mode
|
||||||
*
|
*
|
||||||
* This function is utilized by the nanokernel object "wait" APIs for task
|
* This function is utilized by the nanokernel object "wait" APIs for task
|
||||||
* contexts, e.g. nano_task_lifo_get_wait(), nano_task_sem_take_wait(), nano_task_stack_pop_wait(),
|
* contexts, e.g. nano_task_lifo_get_wait(), nano_task_sem_take_wait(), nano_task_stack_pop_wait(),
|
||||||
|
|
|
@ -88,7 +88,7 @@ void _NanoCpuExcConnectAtDpl(unsigned int vector,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nanoCpuExcConnect - connect a C routine to an exception
|
* @brief Connect a C routine to an exception
|
||||||
*
|
*
|
||||||
* This routine connects an exception handler coded in C to the specified
|
* This routine connects an exception handler coded in C to the specified
|
||||||
* interrupt vector. An exception is defined as a synchronous interrupt, i.e.
|
* interrupt vector. An exception is defined as a synchronous interrupt, i.e.
|
||||||
|
@ -128,7 +128,7 @@ void nanoCpuExcConnect(unsigned int vector, /* interrupt vector: 0 to 255 on
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NanoCpuExcConnectAtDpl - connect a C routine to an exception
|
* @brief Connect a C routine to an exception
|
||||||
*
|
*
|
||||||
* This routine connects an exception handler coded in C to the specified
|
* This routine connects an exception handler coded in C to the specified
|
||||||
* interrupt vector. An exception is defined as a synchronous interrupt, i.e.
|
* interrupt vector. An exception is defined as a synchronous interrupt, i.e.
|
||||||
|
|
|
@ -59,7 +59,7 @@ and exiting a C exception handler.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ExcEnt - inform the kernel of an exception
|
* @brief Inform the kernel of an exception
|
||||||
*
|
*
|
||||||
* This function is called from the exception stub created by nanoCpuExcConnect()
|
* This function is called from the exception stub created by nanoCpuExcConnect()
|
||||||
* to inform the kernel of an exception. This routine currently does
|
* to inform the kernel of an exception. This routine currently does
|
||||||
|
@ -217,7 +217,7 @@ BRANCH_LABEL(allDone)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ExcExit - inform the kernel of an exception exit
|
* @brief Inform the kernel of an exception exit
|
||||||
*
|
*
|
||||||
* This function is called from the exception stub created by nanoCpuExcConnect()
|
* This function is called from the exception stub created by nanoCpuExcConnect()
|
||||||
* to inform the kernel that the processing of an exception has
|
* to inform the kernel that the processing of an exception has
|
||||||
|
|
|
@ -67,7 +67,7 @@ const NANO_ESF _default_esf = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _NanoFatalErrorHandler - nanokernel fatal error handler
|
* @brief Nanokernel fatal error handler
|
||||||
*
|
*
|
||||||
* This routine is called when a fatal error condition is detected by either
|
* This routine is called when a fatal error condition is detected by either
|
||||||
* hardware or software.
|
* hardware or software.
|
||||||
|
|
|
@ -53,7 +53,7 @@ are defined in arch.h.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* find_first_set - find first set bit searching from the LSB
|
* @brief Find first set bit searching from the LSB
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the passed argument and
|
* This routine finds the first bit set in the passed argument and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
@ -96,7 +96,7 @@ BRANCH_LABEL(ffsLsb_argNotZero) /* this label serves find_first_set() & find_las
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* find_last_set - find first set bit searching from the MSB
|
* @brief Find first set bit searching from the MSB
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the passed argument and
|
* This routine finds the first bit set in the passed argument and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
|
|
@ -114,7 +114,7 @@ extern uint32_t _sse_mxcsr_default_value; /* SSE control/status register default
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FpCtxSave - save non-integer context information
|
* @brief Save non-integer context information
|
||||||
*
|
*
|
||||||
* This routine saves the system's "live" non-integer context into the
|
* This routine saves the system's "live" non-integer context into the
|
||||||
* specified CCS. If the specified task or fiber supports SSE then
|
* specified CCS. If the specified task or fiber supports SSE then
|
||||||
|
@ -130,7 +130,7 @@ static void _FpCtxSave(tCCS *ccs)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FpCtxInit - initialize non-integer context information
|
* @brief Initialize non-integer context information
|
||||||
*
|
*
|
||||||
* This routine initializes the system's "live" non-integer context.
|
* This routine initializes the system's "live" non-integer context.
|
||||||
*
|
*
|
||||||
|
@ -144,7 +144,7 @@ static inline void _FpCtxInit(tCCS *ccs)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FpEnable - enable preservation of non-integer context information
|
* @brief Enable preservation of non-integer context information
|
||||||
*
|
*
|
||||||
* This routine allows the specified task/fiber (which may be the active
|
* This routine allows the specified task/fiber (which may be the active
|
||||||
* task/fiber) to safely share the system's floating point registers with
|
* task/fiber) to safely share the system's floating point registers with
|
||||||
|
@ -289,7 +289,7 @@ void _FpEnable(tCCS *ccs,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* fiber_float_enable - enable preservation of non-integer context information
|
* @brief Enable preservation of non-integer context information
|
||||||
*
|
*
|
||||||
* This routine allows a fiber to permit a task/fiber (including itself) to
|
* This routine allows a fiber to permit a task/fiber (including itself) to
|
||||||
* safely share the system's floating point registers with other tasks/fibers.
|
* safely share the system's floating point registers with other tasks/fibers.
|
||||||
|
@ -303,7 +303,7 @@ FUNC_ALIAS(_FpEnable, fiber_float_enable, void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* task_float_enable - enable preservation of non-integer context information
|
* @brief Enable preservation of non-integer context information
|
||||||
*
|
*
|
||||||
* This routine allows a task to permit a task/fiber (including itself) to
|
* This routine allows a task to permit a task/fiber (including itself) to
|
||||||
* safely share the system's floating point registers with other tasks/fibers.
|
* safely share the system's floating point registers with other tasks/fibers.
|
||||||
|
@ -317,7 +317,7 @@ FUNC_ALIAS(_FpEnable, task_float_enable, void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FpDisable - disable preservation of non-integer context information
|
* @brief Disable preservation of non-integer context information
|
||||||
*
|
*
|
||||||
* This routine prevents the specified task/fiber (which may be the active
|
* This routine prevents the specified task/fiber (which may be the active
|
||||||
* task/fiber) from safely sharing any of the system's floating point registers
|
* task/fiber) from safely sharing any of the system's floating point registers
|
||||||
|
@ -378,7 +378,7 @@ void _FpDisable(tCCS *ccs)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* fiber_float_disable - disable preservation of non-integer context
|
* @brief Disable preservation of non-integer context
|
||||||
*information
|
*information
|
||||||
*
|
*
|
||||||
* This routine allows a fiber to disallow a task/fiber (including itself) from
|
* This routine allows a fiber to disallow a task/fiber (including itself) from
|
||||||
|
@ -396,7 +396,7 @@ FUNC_ALIAS(_FpDisable, fiber_float_disable, void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* task_float_disable - disable preservation of non-integer context information
|
* @brief Disable preservation of non-integer context information
|
||||||
*
|
*
|
||||||
* This routine allows a task to disallow a task/fiber (including itself) from
|
* This routine allows a task to disallow a task/fiber (including itself) from
|
||||||
* safely sharing any of the system's floating point registers with other
|
* safely sharing any of the system's floating point registers with other
|
||||||
|
@ -415,7 +415,7 @@ FUNC_ALIAS(_FpDisable, task_float_disable, void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FpNotAvailableExcHandler - handler for "device not available" exception
|
* @brief Handler for "device not available" exception
|
||||||
*
|
*
|
||||||
* This routine is registered to handle the "device not available" exception
|
* This routine is registered to handle the "device not available" exception
|
||||||
* (vector = 7) when the AUTOMATIC_FP_ENABLING configuration option has been
|
* (vector = 7) when the AUTOMATIC_FP_ENABLING configuration option has been
|
||||||
|
|
|
@ -66,7 +66,7 @@ _IntBoiExit() is present.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntBoiExit - exit interrupt handler stub without invoking ISR
|
* @brief Exit interrupt handler stub without invoking ISR
|
||||||
*
|
*
|
||||||
* This routine exits an interrupt handler stub without invoking the associated
|
* This routine exits an interrupt handler stub without invoking the associated
|
||||||
* ISR handler (or the EOI handler, if present). It should only be jumped to
|
* ISR handler (or the EOI handler, if present). It should only be jumped to
|
||||||
|
|
|
@ -160,7 +160,7 @@ static NANO_INT_STUB dynamic_stubs[ALL_DYNAMIC_STUBS] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _int_stub_alloc - allocate dynamic interrupt stub
|
* @brief Allocate dynamic interrupt stub
|
||||||
*
|
*
|
||||||
* @return index of the first available element of the STUB array or -1
|
* @return index of the first available element of the STUB array or -1
|
||||||
* if all elements are used
|
* if all elements are used
|
||||||
|
@ -181,7 +181,7 @@ static int _int_stub_alloc(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntVecSet - connect a routine to an interrupt vector
|
* @brief Connect a routine to an interrupt vector
|
||||||
*
|
*
|
||||||
* This routine "connects" the specified <routine> to the specified interrupt
|
* This routine "connects" the specified <routine> to the specified interrupt
|
||||||
* <vector>. On the IA-32 architecture, an interrupt vector is a value from
|
* <vector>. On the IA-32 architecture, an interrupt vector is a value from
|
||||||
|
@ -235,7 +235,7 @@ void _IntVecSet(
|
||||||
#if ALL_DYNAMIC_STUBS > 0
|
#if ALL_DYNAMIC_STUBS > 0
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_connect - connect a C routine to a hardware interrupt
|
* @brief Connect a C routine to a hardware interrupt
|
||||||
*
|
*
|
||||||
* This routine connects an interrupt service routine (ISR) coded in C to
|
* This routine connects an interrupt service routine (ISR) coded in C to
|
||||||
* the specified hardware <irq>. An interrupt vector will be allocated to
|
* the specified hardware <irq>. An interrupt vector will be allocated to
|
||||||
|
@ -480,7 +480,7 @@ int irq_connect(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntVecAlloc - allocate a free interrupt vector given <priority>
|
* @brief Allocate a free interrupt vector given <priority>
|
||||||
*
|
*
|
||||||
* This routine scans the interrupt_vectors_allocated[] array for a free vector that
|
* This routine scans the interrupt_vectors_allocated[] array for a free vector that
|
||||||
* satisfies the specified <priority>. It is a utility function for use only
|
* satisfies the specified <priority>. It is a utility function for use only
|
||||||
|
@ -603,7 +603,7 @@ int _IntVecAlloc(unsigned int priority)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntVecMarkAllocated - mark interrupt vector as allocated
|
* @brief Mark interrupt vector as allocated
|
||||||
*
|
*
|
||||||
* This routine is used to "reserve" an interrupt vector that is allocated
|
* This routine is used to "reserve" an interrupt vector that is allocated
|
||||||
* or assigned by any means other than _IntVecAllocate(). This marks the vector
|
* or assigned by any means other than _IntVecAllocate(). This marks the vector
|
||||||
|
@ -627,7 +627,7 @@ void _IntVecMarkAllocated(unsigned int vector)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntVecMarkFree - mark interrupt vector as free
|
* @brief Mark interrupt vector as free
|
||||||
*
|
*
|
||||||
* This routine is used to "free" an interrupt vector that is allocated
|
* This routine is used to "free" an interrupt vector that is allocated
|
||||||
* or assigned using _IntVecAllocate() or _IntVecMarkAllocated(). This marks the
|
* or assigned using _IntVecAllocate() or _IntVecMarkAllocated(). This marks the
|
||||||
|
|
|
@ -59,7 +59,7 @@ extern unsigned char _idt_base_address[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_handler_set - set the handler in an already connected stub
|
* @brief Set the handler in an already connected stub
|
||||||
*
|
*
|
||||||
* This routine is used to modify an already fully constructed interrupt stub
|
* This routine is used to modify an already fully constructed interrupt stub
|
||||||
* to specify a new <routine> and/or <parameter>.
|
* to specify a new <routine> and/or <parameter>.
|
||||||
|
|
|
@ -76,7 +76,7 @@ entering and exiting a C interrupt handler.
|
||||||
#endif
|
#endif
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntEnt - inform the kernel of an interrupt
|
* @brief Inform the kernel of an interrupt
|
||||||
*
|
*
|
||||||
* This function is called from the interrupt stub created by irq_connect()
|
* This function is called from the interrupt stub created by irq_connect()
|
||||||
* to inform the kernel of an interrupt. This routine increments
|
* to inform the kernel of an interrupt. This routine increments
|
||||||
|
@ -242,7 +242,7 @@ BRANCH_LABEL(_HandleIdle)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IntExit - inform the kernel of an interrupt exit
|
* @brief Inform the kernel of an interrupt exit
|
||||||
*
|
*
|
||||||
* This function is called from the interrupt stub created by irq_connect()
|
* This function is called from the interrupt stub created by irq_connect()
|
||||||
* to inform the kernel that the processing of an interrupt has
|
* to inform the kernel that the processing of an interrupt has
|
||||||
|
@ -391,7 +391,7 @@ BRANCH_LABEL(nestedInterrupt)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SpuriousIntHandler -
|
* _SpuriousIntHandler -
|
||||||
* _SpuriousIntNoErrCodeHandler - spurious interrupt handler stubs
|
* @brief Spurious interrupt handler stubs
|
||||||
*
|
*
|
||||||
* Interrupt-gate descriptors are statically created for all slots in the IDT
|
* Interrupt-gate descriptors are statically created for all slots in the IDT
|
||||||
* that point to _SpuriousIntHandler() or _SpuriousIntNoErrCodeHandler(). The
|
* that point to _SpuriousIntHandler() or _SpuriousIntNoErrCodeHandler(). The
|
||||||
|
@ -464,7 +464,7 @@ BRANCH_LABEL(callFatalHandler)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_lock - disable interrupts on the local CPU
|
* @brief Disable interrupts on the local CPU
|
||||||
*
|
*
|
||||||
* This routine disables interrupts. It can be called from either interrupt
|
* This routine disables interrupts. It can be called from either interrupt
|
||||||
* or context level. This routine returns an architecture-dependent
|
* or context level. This routine returns an architecture-dependent
|
||||||
|
@ -503,7 +503,7 @@ SECTION_FUNC(TEXT, irq_lock)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_unlock - enable interrupts on the local CPU
|
* @brief Enable interrupts on the local CPU
|
||||||
*
|
*
|
||||||
* This routine re-enables interrupts on the local CPU. The <key> parameter
|
* This routine re-enables interrupts on the local CPU. The <key> parameter
|
||||||
* is an architecture-dependent lock-out key that is returned by a previous
|
* is an architecture-dependent lock-out key that is returned by a previous
|
||||||
|
|
|
@ -47,7 +47,7 @@ utilities.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _MsrWrite - write to a model specific register (MSR)
|
* @brief Write to a model specific register (MSR)
|
||||||
*
|
*
|
||||||
* This function is used to write to an MSR.
|
* This function is used to write to an MSR.
|
||||||
*
|
*
|
||||||
|
@ -78,7 +78,7 @@ SECTION_FUNC(TEXT, _MsrWrite)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _MsrRead - read from a model specific register (MSR)
|
* @brief Read from a model specific register (MSR)
|
||||||
*
|
*
|
||||||
* This function is used to read from an MSR.
|
* This function is used to read from an MSR.
|
||||||
*
|
*
|
||||||
|
|
|
@ -56,7 +56,7 @@ save frame on the stack.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _Swap - initiate a cooperative context switch
|
* @brief Initiate a cooperative context switch
|
||||||
*
|
*
|
||||||
* The _Swap() routine is invoked by various nanokernel services to effect
|
* The _Swap() routine is invoked by various nanokernel services to effect
|
||||||
* a cooperative context context switch. Prior to invoking _Swap(), the
|
* a cooperative context context switch. Prior to invoking _Swap(), the
|
||||||
|
|
|
@ -51,7 +51,7 @@ performed byte-by-byte.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _Unaligned32Write - perform an unaligned 32-bit write operation
|
* @brief Perform an unaligned 32-bit write operation
|
||||||
*
|
*
|
||||||
* This function is used during the interrupt and exception stub code
|
* This function is used during the interrupt and exception stub code
|
||||||
* synthesis step when writing out the 32-bit relative jmp/branch
|
* synthesis step when writing out the 32-bit relative jmp/branch
|
||||||
|
@ -88,7 +88,7 @@ SECTION_FUNC(TEXT, _Unaligned32Write)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _Unaligned32Read - perform an unaligned 32-bit read operation
|
* @brief Perform an unaligned 32-bit read operation
|
||||||
*
|
*
|
||||||
* This function is used during the interrupt and exception stub code
|
* This function is used during the interrupt and exception stub code
|
||||||
* synthesis step when reading the 32-bit relative jmp/branch
|
* synthesis step when reading the 32-bit relative jmp/branch
|
||||||
|
|
|
@ -88,7 +88,7 @@ static inline void ioapicInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_generic_info_init - initialize initialization information for one UART
|
* @brief Initialize initialization information for one UART
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*
|
*
|
||||||
|
@ -108,7 +108,7 @@ void uart_generic_info_init(struct uart_init_info *p_info)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* consoleInit - initialize target-only console
|
* @brief Initialize target-only console
|
||||||
*
|
*
|
||||||
* Only used for debugging.
|
* Only used for debugging.
|
||||||
*
|
*
|
||||||
|
@ -151,7 +151,7 @@ static void bluetooth_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _InitHardware - perform basic hardware initialization
|
* @brief Perform basic hardware initialization
|
||||||
*
|
*
|
||||||
* Initialize the Intel 8259A interrupt controller device driver and the
|
* Initialize the Intel 8259A interrupt controller device driver and the
|
||||||
* Intel 8250 UART device driver.
|
* Intel 8250 UART device driver.
|
||||||
|
|
|
@ -43,7 +43,7 @@ and _AdvIdleStart() functions.
|
||||||
#ifdef CONFIG_ADVANCED_IDLE
|
#ifdef CONFIG_ADVANCED_IDLE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _AdvIdleCheckSleep - determine if advanced sleep has occurred
|
* @brief Determine if advanced sleep has occurred
|
||||||
*
|
*
|
||||||
* This routine checks if the system is recovering from advanced
|
* This routine checks if the system is recovering from advanced
|
||||||
* sleep or cold booting.
|
* sleep or cold booting.
|
||||||
|
@ -55,7 +55,7 @@ and _AdvIdleStart() functions.
|
||||||
extern int _AdvIdleCheckSleep(void);
|
extern int _AdvIdleCheckSleep(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _AdvIdleStart - continue kernel start-up or awaken kernel from sleep
|
* @brief Continue kernel start-up or awaken kernel from sleep
|
||||||
*
|
*
|
||||||
* This routine checks if the system is recovering from advanced sleep and
|
* This routine checks if the system is recovering from advanced sleep and
|
||||||
* either continues the kernel's cold boot sequence at _Cstart or resumes
|
* either continues the kernel's cold boot sequence at _Cstart or resumes
|
||||||
|
@ -73,7 +73,7 @@ extern void _AdvIdleStart(
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _AdvIdleFunc - perform advanced sleep
|
* @brief Perform advanced sleep
|
||||||
*
|
*
|
||||||
* This routine checks if the upcoming kernel idle interval is sufficient to
|
* This routine checks if the upcoming kernel idle interval is sufficient to
|
||||||
* justify entering advanced sleep mode. If it is, the routine puts the system
|
* justify entering advanced sleep mode. If it is, the routine puts the system
|
||||||
|
|
|
@ -65,7 +65,7 @@ extern "C" {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* NANO_CPU_EXC_CONNECT - to generate and register an exception stub
|
* @brief To generate and register an exception stub
|
||||||
*
|
*
|
||||||
* Generates an exception stub for the handler, <h>. It is registered
|
* Generates an exception stub for the handler, <h>. It is registered
|
||||||
* on the vector given by <v> with the privilege level <d>; <d> should always
|
* on the vector given by <v> with the privilege level <d>; <d> should always
|
||||||
|
@ -81,7 +81,7 @@ extern "C" {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* NANO_CPU_EXC_CONNECT_NO_ERR - to generate and register an exception stub
|
* @brief To generate and register an exception stub
|
||||||
*
|
*
|
||||||
* Generates an exception stub for the handler, <h>. It is registered
|
* Generates an exception stub for the handler, <h>. It is registered
|
||||||
* on the vector given by <v> with the privilege level <d>; <d> should always
|
* on the vector given by <v> with the privilege level <d>; <d> should always
|
||||||
|
|
|
@ -47,7 +47,7 @@ NANO_CPU_EXC_CONNECT_NO_ERR(handler,vector,0)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* EflagsGet - return the current value of the EFLAGS register
|
* @brief Return the current value of the EFLAGS register
|
||||||
*
|
*
|
||||||
* @return the EFLAGS register.
|
* @return the EFLAGS register.
|
||||||
*
|
*
|
||||||
|
@ -72,7 +72,7 @@ static inline unsigned int EflagsGet(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _FpAccessDisable - disallow use of floating point capabilities
|
* @brief Disallow use of floating point capabilities
|
||||||
*
|
*
|
||||||
* This routine sets CR0[TS] to 1, which disallows the use of FP instructions
|
* This routine sets CR0[TS] to 1, which disallows the use of FP instructions
|
||||||
* by the currently executing context.
|
* by the currently executing context.
|
||||||
|
@ -96,7 +96,7 @@ static inline void _FpAccessDisable(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _do_fp_ctx_save - save non-integer context information
|
* @brief Save non-integer context information
|
||||||
*
|
*
|
||||||
* This routine saves the system's "live" non-integer context into the
|
* This routine saves the system's "live" non-integer context into the
|
||||||
* specified area. If the specified task or fiber supports SSE then
|
* specified area. If the specified task or fiber supports SSE then
|
||||||
|
@ -128,7 +128,7 @@ static inline void _do_fp_ctx_save(int flags, void *preemp_float_reg)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _do_fp_ctx_init - initialize non-integer context information
|
* @brief Initialize non-integer context information
|
||||||
*
|
*
|
||||||
* This routine initializes the system's "live" non-integer context.
|
* This routine initializes the system's "live" non-integer context.
|
||||||
* Function is invoked by _FpCtxInit(tCCS *ccs)
|
* Function is invoked by _FpCtxInit(tCCS *ccs)
|
||||||
|
|
|
@ -762,7 +762,7 @@ extern tNANO _nanokernel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nanoArchInit - performs architecture-specific initialization
|
* @brief Performs architecture-specific initialization
|
||||||
*
|
*
|
||||||
* This routine performs architecture-specific initialization of the nanokernel.
|
* This routine performs architecture-specific initialization of the nanokernel.
|
||||||
* Trivial stuff is done inline; more complex initialization is done via
|
* Trivial stuff is done inline; more complex initialization is done via
|
||||||
|
@ -811,7 +811,7 @@ static inline void nanoArchInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* fiberRtnValueSet - set the return value for the specified fiber (inline)
|
* @brief Set the return value for the specified fiber (inline)
|
||||||
*
|
*
|
||||||
* The register used to store the return value from a function call invocation is
|
* The register used to store the return value from a function call invocation is
|
||||||
* set to <value>. It is assumed that the specified <fiber> is pending, and
|
* set to <value>. It is assumed that the specified <fiber> is pending, and
|
||||||
|
|
|
@ -154,7 +154,7 @@ the 'Quark' BSP.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* outByte - output byte to memory location
|
* @brief Output byte to memory location
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*
|
*
|
||||||
|
@ -168,7 +168,7 @@ static inline void outByte(uint8_t data, uint32_t addr)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* inByte - obtain byte value from memory location
|
* @brief Obtain byte value from memory location
|
||||||
*
|
*
|
||||||
* This function issues the 'move' instruction to read a byte from the specified
|
* This function issues the 'move' instruction to read a byte from the specified
|
||||||
* memory address.
|
* memory address.
|
||||||
|
@ -196,7 +196,7 @@ static inline uint8_t inByte(uint32_t addr)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* outWord - output word to memory location
|
* @brief Output word to memory location
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*
|
*
|
||||||
|
@ -210,7 +210,7 @@ static inline void outWord(uint16_t data, uint32_t addr)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* inWord - obtain word value from memory location
|
* @brief Obtain word value from memory location
|
||||||
*
|
*
|
||||||
* This function issues the 'move' instruction to read a word from the specified
|
* This function issues the 'move' instruction to read a word from the specified
|
||||||
* memory address.
|
* memory address.
|
||||||
|
@ -238,7 +238,7 @@ static inline uint16_t inWord(uint32_t addr)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* outLong - output long word to memory location
|
* @brief Output long word to memory location
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*
|
*
|
||||||
|
@ -252,7 +252,7 @@ static inline void outLong(uint32_t data, uint32_t addr)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* inLong - obtain long word value from memory location
|
* @brief Obtain long word value from memory location
|
||||||
*
|
*
|
||||||
* This function issues the 'move' instruction to read a word from the specified
|
* This function issues the 'move' instruction to read a word from the specified
|
||||||
* memory address.
|
* memory address.
|
||||||
|
@ -270,7 +270,7 @@ static inline uint32_t inLong(uint32_t addr)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_pin2irq - convert PCI interrupt PIN to IRQ
|
* @brief Convert PCI interrupt PIN to IRQ
|
||||||
*
|
*
|
||||||
* The routine uses "standard design consideration" and implies that
|
* The routine uses "standard design consideration" and implies that
|
||||||
* INTA (pin 1) -> IRQ 16
|
* INTA (pin 1) -> IRQ 16
|
||||||
|
@ -291,7 +291,7 @@ static inline int pci_pin2irq(int pin)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_irq2pin - convert IRQ to PCI interrupt pin
|
* @brief Convert IRQ to PCI interrupt pin
|
||||||
*
|
*
|
||||||
* @return pin number, -1 if the result is incorrect
|
* @return pin number, -1 if the result is incorrect
|
||||||
*
|
*
|
||||||
|
|
|
@ -57,7 +57,7 @@ Handlers for the secondary serial port have not been added.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_generic_info_init - initialize initialization information for one UART
|
* @brief Initialize initialization information for one UART
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*
|
*
|
||||||
|
@ -76,7 +76,7 @@ void uart_generic_info_init(struct uart_init_info *p_info)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* consoleInit - initialize target-only console
|
* @brief Initialize target-only console
|
||||||
*
|
*
|
||||||
* Only used for debugging.
|
* Only used for debugging.
|
||||||
*
|
*
|
||||||
|
@ -103,7 +103,7 @@ static void consoleInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _InitHardware - perform basic hardware initialization
|
* @brief Perform basic hardware initialization
|
||||||
*
|
*
|
||||||
* Initialize the Intel LOAPIC and IOAPIC device driver and the
|
* Initialize the Intel LOAPIC and IOAPIC device driver and the
|
||||||
* Intel 8250 UART device driver.
|
* Intel 8250 UART device driver.
|
||||||
|
|
|
@ -49,7 +49,7 @@ supported BSPs.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysFatalErrorHandler - fatal error handler
|
* @brief Fatal error handler
|
||||||
*
|
*
|
||||||
* This routine implements the corrective action to be taken when the system
|
* This routine implements the corrective action to be taken when the system
|
||||||
* detects a fatal error.
|
* detects a fatal error.
|
||||||
|
|
|
@ -53,7 +53,7 @@ Intel-specific parts of start_task(). Only FP functionality currently.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _StartTaskArch - Intel-specifc parts of task initialization
|
* @brief Intel-specifc parts of task initialization
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
#if 0 /* NOTUSED */
|
#if 0 /* NOTUSED */
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* consoleIn - get a character from UART
|
* @brief Get a character from UART
|
||||||
*
|
*
|
||||||
* @return the character or EOF if nothing present
|
* @return the character or EOF if nothing present
|
||||||
*/
|
*/
|
||||||
|
@ -76,7 +76,7 @@ static int consoleIn(void)
|
||||||
#if defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE)
|
#if defined(CONFIG_PRINTK) || defined(CONFIG_STDOUT_CONSOLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* consoleOut - output one character to UART
|
* @brief Output one character to UART
|
||||||
*
|
*
|
||||||
* Outputs both line feed and carriage return in the case of a '\n'.
|
* Outputs both line feed and carriage return in the case of a '\n'.
|
||||||
*
|
*
|
||||||
|
@ -211,7 +211,7 @@ void uart_register_input(struct nano_fifo *avail, struct nano_fifo *lines)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_console_init - initialize one UART as the console/debug port
|
* @brief Initialize one UART as the console/debug port
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_init - initialize the interrupt unit device driver
|
* @brief Initialize the interrupt unit device driver
|
||||||
*
|
*
|
||||||
* Initializes the interrupt unit device driver and the device
|
* Initializes the interrupt unit device driver and the device
|
||||||
* itself.
|
* itself.
|
||||||
|
@ -69,7 +69,7 @@ void _arc_v2_irq_unit_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_int_eoi - send EOI signal to interrupt unit
|
* @brief Send EOI signal to interrupt unit
|
||||||
*
|
*
|
||||||
* This routine sends an EOI (End Of Interrupt) signal to the interrupt unit
|
* This routine sends an EOI (End Of Interrupt) signal to the interrupt unit
|
||||||
* to clear a pulse-triggered interrupt.
|
* to clear a pulse-triggered interrupt.
|
||||||
|
@ -87,7 +87,7 @@ void _arc_v2_irq_unit_int_eoi(int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_int_trigger_set - sets an IRQ line to level/pulse trigger
|
* @brief Sets an IRQ line to level/pulse trigger
|
||||||
*
|
*
|
||||||
* Sets the IRQ line <irq> to trigger an interrupt based on the level or the
|
* Sets the IRQ line <irq> to trigger an interrupt based on the level or the
|
||||||
* edge of the signal. Valid values for <trigger> are _ARC_V2_INT_LEVEL and
|
* edge of the signal. Valid values for <trigger> are _ARC_V2_INT_LEVEL and
|
||||||
|
|
|
@ -118,7 +118,7 @@ FUNC_ALIAS(_i8259_irq_disable, irq_disable, void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_init - initialize the Intel 8259A PIC device driver
|
* @brief Initialize the Intel 8259A PIC device driver
|
||||||
*
|
*
|
||||||
* This routine initializes the Intel 8259A PIC device driver and the device
|
* This routine initializes the Intel 8259A PIC device driver and the device
|
||||||
* itself.
|
* itself.
|
||||||
|
@ -187,7 +187,7 @@ void _i8259_init(void)
|
||||||
#ifndef CONFIG_SHUTOFF_PIC
|
#ifndef CONFIG_SHUTOFF_PIC
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_eoi_master - send EOI(end of interrupt) signal to the master PIC.
|
* @brief Send EOI(end of interrupt) signal to the master PIC.
|
||||||
*
|
*
|
||||||
* This routine is called at the end of the interrupt handler.
|
* This routine is called at the end of the interrupt handler.
|
||||||
*
|
*
|
||||||
|
@ -209,7 +209,7 @@ void _i8259_eoi_master(unsigned int irq /* IRQ number to
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_eoi_slave - send EOI(end of interrupt) signal to the slave PIC.
|
* @brief Send EOI(end of interrupt) signal to the slave PIC.
|
||||||
*
|
*
|
||||||
* This routine is called at the end of the interrupt handler in the Normal
|
* This routine is called at the end of the interrupt handler in the Normal
|
||||||
* Fully Nested Mode.
|
* Fully Nested Mode.
|
||||||
|
@ -241,7 +241,7 @@ void _i8259_eoi_slave(unsigned int irq /* IRQ number to
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __I8259IntEnable - enable/disable a specified PIC interrupt input line
|
* @brief Enable/disable a specified PIC interrupt input line
|
||||||
*
|
*
|
||||||
* This routine enables or disables a specified PIC interrupt input line. To
|
* This routine enables or disables a specified PIC interrupt input line. To
|
||||||
* enable an interrupt input line, the parameter <enable> must be non-zero.
|
* enable an interrupt input line, the parameter <enable> must be non-zero.
|
||||||
|
@ -292,7 +292,7 @@ static void __I8259IntEnable(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_irq_disable - disable a specified PIC interrupt input line
|
* @brief Disable a specified PIC interrupt input line
|
||||||
*
|
*
|
||||||
* This routine disables a specified PIC interrupt input line.
|
* This routine disables a specified PIC interrupt input line.
|
||||||
*
|
*
|
||||||
|
@ -309,7 +309,7 @@ void _i8259_irq_disable(unsigned int irq /* IRQ number to disable */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_irq_enable - enable a specified PIC interrupt input line
|
* @brief Enable a specified PIC interrupt input line
|
||||||
*
|
*
|
||||||
* This routine enables a specified PIC interrupt input line.
|
* This routine enables a specified PIC interrupt input line.
|
||||||
*
|
*
|
||||||
|
|
|
@ -61,7 +61,7 @@ a real IRQ has been inserted.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_boi_master - detect whether it is spurious interrupt or not
|
* @brief Detect whether it is spurious interrupt or not
|
||||||
*
|
*
|
||||||
* This routine is called before the user's interrupt handler to detect the
|
* This routine is called before the user's interrupt handler to detect the
|
||||||
* spurious interrupt on the master PIC. If a spurious interrupt condition is
|
* spurious interrupt on the master PIC. If a spurious interrupt condition is
|
||||||
|
@ -95,7 +95,7 @@ SECTION_FUNC(TEXT, _i8259_boi_master)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8259_boi_slave - detect whether it is spurious interrupt or not
|
* @brief Detect whether it is spurious interrupt or not
|
||||||
*
|
*
|
||||||
* This routine is called before the user's interrupt handler to detect the
|
* This routine is called before the user's interrupt handler to detect the
|
||||||
* spurious interrupt on the slave PIC. If a spurious interrupt condition is
|
* spurious interrupt on the slave PIC. If a spurious interrupt condition is
|
||||||
|
|
|
@ -211,7 +211,7 @@ static void _IoApicRedUpdateLo(unsigned int irq, uint32_t value,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_init - initialize the IO APIC or xAPIC
|
* @brief Initialize the IO APIC or xAPIC
|
||||||
*
|
*
|
||||||
* This routine initializes the IO APIC or xAPIC.
|
* This routine initializes the IO APIC or xAPIC.
|
||||||
*
|
*
|
||||||
|
@ -263,7 +263,7 @@ void _ioapic_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_eoi - send EOI (End Of Interrupt) signal to IO APIC
|
* @brief Send EOI (End Of Interrupt) signal to IO APIC
|
||||||
*
|
*
|
||||||
* This routine sends an EOI signal to the IO APIC's interrupting source.
|
* This routine sends an EOI signal to the IO APIC's interrupting source.
|
||||||
*
|
*
|
||||||
|
@ -279,7 +279,7 @@ void _ioapic_eoi(unsigned int irq /* INT number to send EOI */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_eoi_get - get EOI (End Of Interrupt) information
|
* @brief Get EOI (End Of Interrupt) information
|
||||||
*
|
*
|
||||||
* This routine returns EOI signalling information for a specific IRQ.
|
* This routine returns EOI signalling information for a specific IRQ.
|
||||||
*
|
*
|
||||||
|
@ -319,7 +319,7 @@ void *_ioapic_eoi_get(unsigned int irq, /* INTIN number of interest */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_irq_enable - enable a specified APIC interrupt input line
|
* @brief Enable a specified APIC interrupt input line
|
||||||
*
|
*
|
||||||
* This routine enables a specified APIC interrupt input line.
|
* This routine enables a specified APIC interrupt input line.
|
||||||
*
|
*
|
||||||
|
@ -334,7 +334,7 @@ void _ioapic_irq_enable(unsigned int irq /* INTIN number to enable */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_irq_disable - disable a specified APIC interrupt input line
|
* @brief Disable a specified APIC interrupt input line
|
||||||
*
|
*
|
||||||
* This routine disables a specified APIC interrupt input line.
|
* This routine disables a specified APIC interrupt input line.
|
||||||
*
|
*
|
||||||
|
@ -349,7 +349,7 @@ void _ioapic_irq_disable(unsigned int irq /* INTIN number to disable */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_irq_set - programs the interrupt redirection table
|
* @brief Programs the interrupt redirection table
|
||||||
*
|
*
|
||||||
* This routine sets up the redirection table entry for the specified IRQ
|
* This routine sets up the redirection table entry for the specified IRQ
|
||||||
*
|
*
|
||||||
|
@ -370,7 +370,7 @@ void _ioapic_irq_set(unsigned int irq, /* virtualized IRQ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _ioapic_int_vec_set - program interrupt vector for specified irq
|
* @brief Program interrupt vector for specified irq
|
||||||
*
|
*
|
||||||
* The routine writes the interrupt vector in the Interrupt Redirection
|
* The routine writes the interrupt vector in the Interrupt Redirection
|
||||||
* Table for specified irq number
|
* Table for specified irq number
|
||||||
|
@ -388,7 +388,7 @@ void _ioapic_int_vec_set(unsigned int irq, /* INT number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __IoApicGet - read a 32 bit IO APIC register
|
* @brief Read a 32 bit IO APIC register
|
||||||
*
|
*
|
||||||
* This routine reads the specified IO APIC register using indirect addressing.
|
* This routine reads the specified IO APIC register using indirect addressing.
|
||||||
*
|
*
|
||||||
|
@ -416,7 +416,7 @@ static uint32_t __IoApicGet(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* __IoApicSet - write a 32 bit IO APIC register
|
* @brief Write a 32 bit IO APIC register
|
||||||
*
|
*
|
||||||
* This routine writes the specified IO APIC register using indirect addressing.
|
* This routine writes the specified IO APIC register using indirect addressing.
|
||||||
*
|
*
|
||||||
|
@ -444,7 +444,7 @@ static void __IoApicSet(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* ioApicRedGetLo - get low 32 bits of Redirection Table entry
|
* @brief Get low 32 bits of Redirection Table entry
|
||||||
*
|
*
|
||||||
* This routine reads the low-order 32 bits of a Redirection Table entry.
|
* This routine reads the low-order 32 bits of a Redirection Table entry.
|
||||||
*
|
*
|
||||||
|
@ -470,7 +470,7 @@ static uint32_t ioApicRedGetLo(unsigned int irq /* INTIN number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* ioApicRedSetLo - set low 32 bits of Redirection Table entry
|
* @brief Set low 32 bits of Redirection Table entry
|
||||||
*
|
*
|
||||||
* This routine writes the low-order 32 bits of a Redirection Table entry.
|
* This routine writes the low-order 32 bits of a Redirection Table entry.
|
||||||
*
|
*
|
||||||
|
@ -497,7 +497,7 @@ static void ioApicRedSetLo(unsigned int irq, /* INTIN number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* ioApicRedSetHi - set high 32 bits of Redirection Table entry
|
* @brief Set high 32 bits of Redirection Table entry
|
||||||
*
|
*
|
||||||
* This routine writes the high-order 32 bits of a Redirection Table entry.
|
* This routine writes the high-order 32 bits of a Redirection Table entry.
|
||||||
*
|
*
|
||||||
|
@ -524,7 +524,7 @@ static void ioApicRedSetHi(unsigned int irq, /* INTIN number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IoApicRedUpdateLo - modify low 32 bits of Redirection Table entry
|
* @brief Modify low 32 bits of Redirection Table entry
|
||||||
*
|
*
|
||||||
* This routine modifies selected portions of the low-order 32 bits of a
|
* This routine modifies selected portions of the low-order 32 bits of a
|
||||||
* Redirection Table entry, as indicated by the associate bit mask.
|
* Redirection Table entry, as indicated by the associate bit mask.
|
||||||
|
@ -550,7 +550,7 @@ static void _IoApicRedUpdateLo(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IoApicRteConfigSet - write to the RTE config register for specified IRQ
|
* @brief Write to the RTE config register for specified IRQ
|
||||||
*
|
*
|
||||||
* This routine writes the specified 32-bit <value> into the RTE configuration
|
* This routine writes the specified 32-bit <value> into the RTE configuration
|
||||||
* register for the specified <irq> (0 to (IOAPIC_NUM_RTES - 1))
|
* register for the specified <irq> (0 to (IOAPIC_NUM_RTES - 1))
|
||||||
|
@ -578,7 +578,7 @@ static void _IoApicRteConfigSet(unsigned int irq, /* INTIN number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _IoApicRedirRegSet - write to the specified MSI redirection register
|
* @brief Write to the specified MSI redirection register
|
||||||
*
|
*
|
||||||
* This routine writes the 32-bit <value> into the redirection register
|
* This routine writes the 32-bit <value> into the redirection register
|
||||||
* specified by <reg>.
|
* specified by <reg>.
|
||||||
|
|
|
@ -200,7 +200,7 @@ INCLUDE FILES: loapic.h
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_init - initialize the Local APIC or xAPIC
|
* @brief Initialize the Local APIC or xAPIC
|
||||||
*
|
*
|
||||||
* This routine initializes Local APIC or xAPIC.
|
* This routine initializes Local APIC or xAPIC.
|
||||||
*
|
*
|
||||||
|
@ -262,7 +262,7 @@ void _loapic_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_enable - enable the Local xAPIC
|
* @brief Enable the Local xAPIC
|
||||||
*
|
*
|
||||||
* This routine enables the Local xAPIC.
|
* This routine enables the Local xAPIC.
|
||||||
*
|
*
|
||||||
|
@ -280,7 +280,7 @@ void _loapic_enable(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_disable - disable the Local xAPIC
|
* @brief Disable the Local xAPIC
|
||||||
*
|
*
|
||||||
* This routine disables the Local xAPIC.
|
* This routine disables the Local xAPIC.
|
||||||
*
|
*
|
||||||
|
@ -298,7 +298,7 @@ void _loapic_disable(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_eoi - send EOI (End Of Interrupt) signal to Local APIC
|
* @brief send EOI (End Of Interrupt) signal to Local APIC
|
||||||
*
|
*
|
||||||
* This routine sends an EOI signal to the Local APIC's interrupting source.
|
* This routine sends an EOI signal to the Local APIC's interrupting source.
|
||||||
*
|
*
|
||||||
|
@ -313,7 +313,7 @@ void _loapic_eoi(unsigned int irq)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_int_vec_set - set the vector field in the specified RTE
|
* @brief Set the vector field in the specified RTE
|
||||||
*
|
*
|
||||||
* This routine is utilized by the BSP provided routined _SysIntVecAllocate()
|
* This routine is utilized by the BSP provided routined _SysIntVecAllocate()
|
||||||
* which in turn is provided to support the irq_connect() API. Once
|
* which in turn is provided to support the irq_connect() API. Once
|
||||||
|
@ -356,7 +356,7 @@ void _loapic_int_vec_set(unsigned int irq, /* IRQ number of the
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_irq_enable - enable an individual LOAPIC interrupt (IRQ)
|
* @brief Enable an individual LOAPIC interrupt (IRQ)
|
||||||
*
|
*
|
||||||
* This routine clears the interrupt mask bit in the LVT for the specified IRQ
|
* This routine clears the interrupt mask bit in the LVT for the specified IRQ
|
||||||
*
|
*
|
||||||
|
@ -386,7 +386,7 @@ void _loapic_irq_enable(unsigned int irq /* IRQ number of
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loapic_irq_disable - disable an individual LOAPIC interrupt (IRQ)
|
* @brief Disable an individual LOAPIC interrupt (IRQ)
|
||||||
*
|
*
|
||||||
* This routine clears the interrupt mask bit in the LVT for the specified IRQ
|
* This routine clears the interrupt mask bit in the LVT for the specified IRQ
|
||||||
*
|
*
|
||||||
|
|
|
@ -45,7 +45,7 @@ for the atom_n28xx variant of generic_pc BSP.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysIntVecAlloc - allocate interrupt vector
|
* @brief Allocate interrupt vector
|
||||||
*
|
*
|
||||||
* This BSP provided routine supports the irq_connect() API. This
|
* This BSP provided routine supports the irq_connect() API. This
|
||||||
* routine is required to perform the following 3 functions:
|
* routine is required to perform the following 3 functions:
|
||||||
|
@ -63,13 +63,13 @@ for the atom_n28xx variant of generic_pc BSP.
|
||||||
*
|
*
|
||||||
* The board virtualizes IRQs as follows:
|
* The board virtualizes IRQs as follows:
|
||||||
*
|
*
|
||||||
* - The first IOAPIC_NUM_RTES IRQs are provided by the IOAPIC
|
* - The first IOAPIC_NUM_RTES IRQs are provided by the IOAPIC
|
||||||
* - The remaining IRQs are provided by the LOAPIC.
|
* - The remaining IRQs are provided by the LOAPIC.
|
||||||
*
|
*
|
||||||
* Thus, for example, if the IOAPIC supports 24 IRQs:
|
* Thus, for example, if the IOAPIC supports 24 IRQs:
|
||||||
*
|
*
|
||||||
* - IRQ0 to IRQ23 map to IOAPIC IRQ0 to IRQ23
|
* - IRQ0 to IRQ23 map to IOAPIC IRQ0 to IRQ23
|
||||||
* - IRQ24 to IRQ29 map to LOAPIC LVT entries as follows:
|
* - IRQ24 to IRQ29 map to LOAPIC LVT entries as follows:
|
||||||
*
|
*
|
||||||
* IRQ24 -> LOAPIC_TIMER
|
* IRQ24 -> LOAPIC_TIMER
|
||||||
* IRQ25 -> LOAPIC_THERMAL
|
* IRQ25 -> LOAPIC_THERMAL
|
||||||
|
@ -172,7 +172,7 @@ int _SysIntVecAlloc(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysIntVecProgram - program interrupt controller
|
* @brief Program interrupt controller
|
||||||
*
|
*
|
||||||
* This BSP provided routine programs the appropriate interrupt controller
|
* This BSP provided routine programs the appropriate interrupt controller
|
||||||
* with the given vector based on the given IRQ parameter.
|
* with the given vector based on the given IRQ parameter.
|
||||||
|
@ -182,9 +182,9 @@ int _SysIntVecAlloc(
|
||||||
*
|
*
|
||||||
* The Clanton board virtualizes IRQs as follows:
|
* The Clanton board virtualizes IRQs as follows:
|
||||||
*
|
*
|
||||||
* - The first IOAPIC_NUM_RTES IRQs are provided by the IOAPIC so the IOAPIC
|
* - The first IOAPIC_NUM_RTES IRQs are provided by the IOAPIC so the IOAPIC
|
||||||
* is programmed for these IRQs
|
* is programmed for these IRQs
|
||||||
* - The remaining IRQs are provided by the LOAPIC and hence the LOAPIC is
|
* - The remaining IRQs are provided by the LOAPIC and hence the LOAPIC is
|
||||||
* programmed.
|
* programmed.
|
||||||
*
|
*
|
||||||
* The IOAPIC_NUM_RTES macro is provided by board.h, and it specifies the number
|
* The IOAPIC_NUM_RTES macro is provided by board.h, and it specifies the number
|
||||||
|
@ -207,7 +207,7 @@ void _SysIntVecProgram(unsigned int vector, /* vector number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_enable - enable an individual interrupt (IRQ)
|
* @brief Enable an individual interrupt (IRQ)
|
||||||
*
|
*
|
||||||
* The public interface for enabling/disabling a specific IRQ for the IA-32
|
* The public interface for enabling/disabling a specific IRQ for the IA-32
|
||||||
* architecture is defined as follows in include/nanokernel/x86/arch.h
|
* architecture is defined as follows in include/nanokernel/x86/arch.h
|
||||||
|
@ -233,7 +233,7 @@ void irq_enable(unsigned int irq)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_disable - disable an individual interrupt (IRQ)
|
* @brief Disable an individual interrupt (IRQ)
|
||||||
*
|
*
|
||||||
* The irq_disable() routine is provided by the BSP due to the
|
* The irq_disable() routine is provided by the BSP due to the
|
||||||
* IRQ virtualization that is performed by this BSP. See the comments
|
* IRQ virtualization that is performed by this BSP. See the comments
|
||||||
|
|
|
@ -47,7 +47,7 @@ IRQ_CONNECT_STATIC(pic_slave, PIC_SLAVE_STRAY_INT_LVL, 0, _i8259_boi_slave, 0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysIntVecAlloc - allocate interrupt vector
|
* @brief Allocate interrupt vector
|
||||||
*
|
*
|
||||||
* This BSP provided routine supports the irq_connect() API. This
|
* This BSP provided routine supports the irq_connect() API. This
|
||||||
* routine performs the following functions:
|
* routine performs the following functions:
|
||||||
|
@ -64,8 +64,8 @@ IRQ_CONNECT_STATIC(pic_slave, PIC_SLAVE_STRAY_INT_LVL, 0, _i8259_boi_slave, 0);
|
||||||
*
|
*
|
||||||
* The pcPentium4 board virtualizes IRQs as follows:
|
* The pcPentium4 board virtualizes IRQs as follows:
|
||||||
*
|
*
|
||||||
* - IRQ0 to IRQ7 are provided by the master i8259 PIC
|
* - IRQ0 to IRQ7 are provided by the master i8259 PIC
|
||||||
* - IRQ8 to IRQ15 are provided by the slave i8259 PIC
|
* - IRQ8 to IRQ15 are provided by the slave i8259 PIC
|
||||||
*
|
*
|
||||||
* @return the allocated interrupt vector
|
* @return the allocated interrupt vector
|
||||||
*
|
*
|
||||||
|
@ -149,7 +149,7 @@ int _SysIntVecAlloc(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _SysIntVecProgram - program interrupt controller
|
* @brief Program interrupt controller
|
||||||
*
|
*
|
||||||
* This BSP provided routine programs the appropriate interrupt controller
|
* This BSP provided routine programs the appropriate interrupt controller
|
||||||
* with the given vector based on the given IRQ parameter.
|
* with the given vector based on the given IRQ parameter.
|
||||||
|
|
|
@ -169,7 +169,7 @@ static struct lookup_data __noinit lookup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_get_bar_config - return the configuration for the specified BAR
|
* @brief Return the configuration for the specified BAR
|
||||||
*
|
*
|
||||||
* @return 0 if BAR is implemented, -1 if not.
|
* @return 0 if BAR is implemented, -1 if not.
|
||||||
*/
|
*/
|
||||||
|
@ -214,7 +214,7 @@ static inline int pci_bar_config_get(union pci_addr_reg pci_ctrl_addr,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_bar_params_get - retrieve the I/O address and IRQ of the specified BAR
|
* @brief Retrieve the I/O address and IRQ of the specified BAR
|
||||||
*
|
*
|
||||||
* @return -1 on error, 0 if 32 bit BAR retrieved or 1 if 64 bit BAR retrieved
|
* @return -1 on error, 0 if 32 bit BAR retrieved or 1 if 64 bit BAR retrieved
|
||||||
*
|
*
|
||||||
|
@ -265,7 +265,7 @@ static inline int pci_bar_params_get(union pci_addr_reg pci_ctrl_addr,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_dev_scan - scan the specified PCI device for all sub functions
|
* @brief Scan the specified PCI device for all sub functions
|
||||||
*
|
*
|
||||||
* @return 1 if a device has been found, 0 otherwise.
|
* @return 1 if a device has been found, 0 otherwise.
|
||||||
*
|
*
|
||||||
|
@ -376,7 +376,7 @@ void pci_bus_scan_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_bus_scan - scans PCI bus for devices
|
* @brief Scans PCI bus for devices
|
||||||
*
|
*
|
||||||
* The routine scans the PCI bus for the devices on criterias provided in the
|
* The routine scans the PCI bus for the devices on criterias provided in the
|
||||||
* given dev_info at first call. Which criterias can be class and/or
|
* given dev_info at first call. Which criterias can be class and/or
|
||||||
|
@ -430,7 +430,7 @@ int pci_bus_scan(struct pci_dev_info *dev_info)
|
||||||
#ifdef CONFIG_PCI_DEBUG
|
#ifdef CONFIG_PCI_DEBUG
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_show - Show PCI device
|
* @brief Show PCI device
|
||||||
*
|
*
|
||||||
* Shows the PCI device found provided as parameter.
|
* Shows the PCI device found provided as parameter.
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,7 @@ This module implements the PCI config space access functions
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_out_long - write a 32bit data to pci reg in offset
|
* @brief Write a 32bit data to pci reg in offset
|
||||||
*
|
*
|
||||||
* @param bus_no Bus number.
|
* @param bus_no Bus number.
|
||||||
* @param device_no Device number
|
* @param device_no Device number
|
||||||
|
@ -84,7 +84,7 @@ void pci_config_out_long(uint32_t bus_no, uint32_t device_no, uint32_t func_no,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_out_word - write a 16bit data to pci reg in offset
|
* @brief Write a 16bit data to pci reg in offset
|
||||||
*
|
*
|
||||||
* @param bus_no Bus number.
|
* @param bus_no Bus number.
|
||||||
* @param device_no Device number.
|
* @param device_no Device number.
|
||||||
|
@ -114,7 +114,7 @@ void pci_config_out_word(uint32_t bus_no, uint32_t device_no, uint32_t func_no,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_out_byte - write a 8bit data to pci reg in offset
|
* @brief Write a 8bit data to pci reg in offset
|
||||||
*
|
*
|
||||||
* @param bus_no Bus number.
|
* @param bus_no Bus number.
|
||||||
* @param device_no Device number.
|
* @param device_no Device number.
|
||||||
|
@ -144,7 +144,7 @@ void pci_config_out_byte(uint32_t bus_no, uint32_t device_no, uint32_t func_no,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_in_long - read a 32bit data from pci reg in offset
|
* @brief Read a 32bit data from pci reg in offset
|
||||||
*
|
*
|
||||||
* @param bus_no Bus number.
|
* @param bus_no Bus number.
|
||||||
* @param device_no Device number.
|
* @param device_no Device number.
|
||||||
|
@ -175,7 +175,7 @@ void pci_config_in_long(uint32_t bus_no, uint32_t device_no, uint32_t func_no,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_in_word - read in a 16bit data from a pci reg in offset
|
* @brief Read in a 16bit data from a pci reg in offset
|
||||||
*
|
*
|
||||||
* @param bus_no Bus number.
|
* @param bus_no Bus number.
|
||||||
* @param device_no Device number.
|
* @param device_no Device number.
|
||||||
|
@ -212,7 +212,7 @@ void pci_config_in_word(uint32_t bus_no, uint32_t device_no, uint32_t func_no,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_in_byte - read in a 8bit data from a pci reg in offset
|
* @brief Read in a 8bit data from a pci reg in offset
|
||||||
*
|
*
|
||||||
* @param bus_no Bus number.
|
* @param bus_no Bus number.
|
||||||
* @param device_no Device number.
|
* @param device_no Device number.
|
||||||
|
@ -249,7 +249,7 @@ void pci_config_in_byte(uint32_t bus_no, uint32_t device_no, uint32_t func_no,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_config_ext_cap_ptr_find - find extended capability in ECP linked list
|
* @brief Find extended capability in ECP linked list
|
||||||
*
|
*
|
||||||
* This routine searches for an extended capability in the linked list of
|
* This routine searches for an extended capability in the linked list of
|
||||||
* capabilities in config space. If found, the offset of the first byte
|
* capabilities in config space. If found, the offset of the first byte
|
||||||
|
|
|
@ -54,7 +54,7 @@ This module implements the PCI H/W access functions.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_ctrl_read - read a PCI controller register
|
* @brief Read a PCI controller register
|
||||||
*
|
*
|
||||||
* This routine reads the specified register from the PCI controller and
|
* This routine reads the specified register from the PCI controller and
|
||||||
* places the data into the provided buffer.
|
* places the data into the provided buffer.
|
||||||
|
@ -88,7 +88,7 @@ static void pci_ctrl_read(uint32_t reg, /* PCI register to read */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_ctrl_write - write a PCI controller register
|
* @brief Write a PCI controller register
|
||||||
*
|
*
|
||||||
* This routine writes the provided data to the specified register in the PCI
|
* This routine writes the provided data to the specified register in the PCI
|
||||||
* controller.
|
* controller.
|
||||||
|
@ -123,7 +123,7 @@ static void pci_ctrl_write(uint32_t reg, /* PCI register to write */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_ctrl_data_read - read the PCI controller data register
|
* @brief Read the PCI controller data register
|
||||||
*
|
*
|
||||||
* This routine reads the data register of the specified PCI controller.
|
* This routine reads the data register of the specified PCI controller.
|
||||||
*
|
*
|
||||||
|
@ -149,7 +149,7 @@ static int pci_ctrl_data_read(uint32_t controller, /* controller number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_ctrl_data_write - write the PCI controller data register
|
* @brief Write the PCI controller data register
|
||||||
*
|
*
|
||||||
* This routine writes the provided data to the data register of the
|
* This routine writes the provided data to the data register of the
|
||||||
* specified PCI controller.
|
* specified PCI controller.
|
||||||
|
@ -176,7 +176,7 @@ static int pci_ctrl_data_write(uint32_t controller, /* controller number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_ctrl_addr_write - write the PCI controller address register
|
* @brief Write the PCI controller address register
|
||||||
*
|
*
|
||||||
* This routine writes the provided data to the address register of the
|
* This routine writes the provided data to the address register of the
|
||||||
* specified PCI controller.
|
* specified PCI controller.
|
||||||
|
@ -202,7 +202,7 @@ static int pci_ctrl_addr_write(uint32_t controller, /* controller number */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_read - read a PCI register from a device
|
* @brief Read a PCI register from a device
|
||||||
*
|
*
|
||||||
* This routine reads data from a PCI device's configuration space. The
|
* This routine reads data from a PCI device's configuration space. The
|
||||||
* device and register to read is specified by the address parameter ("addr")
|
* device and register to read is specified by the address parameter ("addr")
|
||||||
|
@ -292,7 +292,7 @@ void pci_read(uint32_t controller, /* PCI controller to use */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_write - write a to a PCI register
|
* @brief Write a to a PCI register
|
||||||
*
|
*
|
||||||
* This routine writes data to a PCI device's configuration space. The
|
* This routine writes data to a PCI device's configuration space. The
|
||||||
* device and register to write is specified by the address parameter ("addr")
|
* device and register to write is specified by the address parameter ("addr")
|
||||||
|
@ -381,7 +381,7 @@ void pci_write(uint32_t controller, /* controller to use */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pci_header_get - get the PCI header for a device
|
* @brief Get the PCI header for a device
|
||||||
*
|
*
|
||||||
* This routine reads the PCI header for the specified device and puts the
|
* This routine reads the PCI header for the specified device and puts the
|
||||||
* result in the supplied header structure.
|
* result in the supplied header structure.
|
||||||
|
|
|
@ -55,7 +55,7 @@ static atomic_val_t _rand32_counter = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sys_rand32_init - initialize the random number generator
|
* @brief Initialize the random number generator
|
||||||
*
|
*
|
||||||
* The non-random number generator does not require any initialization.
|
* The non-random number generator does not require any initialization.
|
||||||
* This routine is automatically invoked by the kernel during system
|
* This routine is automatically invoked by the kernel during system
|
||||||
|
@ -71,7 +71,7 @@ void sys_rand32_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sys_rand32_get - get a 32 bit random number
|
* @brief Get a 32 bit random number
|
||||||
*
|
*
|
||||||
* The non-random number generator returns values that are based off the
|
* The non-random number generator returns values that are based off the
|
||||||
* target's clock counter, which means that successive calls will return
|
* target's clock counter, which means that successive calls will return
|
||||||
|
|
|
@ -44,7 +44,7 @@ number generator.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sys_rand32_init - initialize the random number generator
|
* @brief Initialize the random number generator
|
||||||
*
|
*
|
||||||
* The non-random number generator does not require any initialization.
|
* The non-random number generator does not require any initialization.
|
||||||
* Routine is automatically invoked by the kernel during system startup.
|
* Routine is automatically invoked by the kernel during system startup.
|
||||||
|
@ -58,7 +58,7 @@ void sys_rand32_init(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sys_rand32_get - get a 32 bit random number
|
* @brief Get a 32 bit random number
|
||||||
*
|
*
|
||||||
* The non-random number generator returns values that are based off the
|
* The non-random number generator returns values that are based off the
|
||||||
* CPU's timestamp counter, which means that successive calls will normally
|
* CPU's timestamp counter, which means that successive calls will normally
|
||||||
|
|
|
@ -61,7 +61,7 @@ UART_PORTS_CONFIGURE(_k20Uart_t, uart);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_init - initialize UART channel
|
* @brief Initialize UART channel
|
||||||
*
|
*
|
||||||
* This routine is called to reset the chip in a quiescent state.
|
* This routine is called to reset the chip in a quiescent state.
|
||||||
* It is assumed that this function is called only once per UART.
|
* It is assumed that this function is called only once per UART.
|
||||||
|
@ -109,7 +109,7 @@ void uart_init(int port, /* UART channel to initialize */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_poll_in - poll the device for input.
|
* @brief Poll the device for input.
|
||||||
*
|
*
|
||||||
* @return 0 if a character arrived, -1 if the input buffer if empty.
|
* @return 0 if a character arrived, -1 if the input buffer if empty.
|
||||||
*/
|
*/
|
||||||
|
@ -131,7 +131,7 @@ int uart_poll_in(int port, /* UART channel to select for input */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_poll_out - output a character in polled mode.
|
* @brief Output a character in polled mode.
|
||||||
*
|
*
|
||||||
* Checks if the transmitter is empty. If empty, a character is written to
|
* Checks if the transmitter is empty. If empty, a character is written to
|
||||||
* the data register.
|
* the data register.
|
||||||
|
@ -161,7 +161,7 @@ unsigned char uart_poll_out(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_fifo_fill - fill FIFO with data
|
* @brief Fill FIFO with data
|
||||||
|
|
||||||
* @return number of bytes sent
|
* @return number of bytes sent
|
||||||
*/
|
*/
|
||||||
|
@ -183,7 +183,7 @@ int uart_fifo_fill(int port, /* UART on port to send */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_fifo_read - read data from FIFO
|
* @brief Read data from FIFO
|
||||||
*
|
*
|
||||||
* @return number of bytes read
|
* @return number of bytes read
|
||||||
*/
|
*/
|
||||||
|
@ -205,7 +205,7 @@ int uart_fifo_read(int port, /* UART to receive from */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_enable - enable TX interrupt
|
* @brief Enable TX interrupt
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -221,7 +221,7 @@ void uart_irq_tx_enable(int port /* UART to enable Tx
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_disable - disable TX interrupt in IER
|
* @brief Disable TX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -237,7 +237,7 @@ void uart_irq_tx_disable(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_ready - check if Tx IRQ has been raised
|
* @brief Check if Tx IRQ has been raised
|
||||||
*
|
*
|
||||||
* @return 1 if an IRQ is ready, 0 otherwise
|
* @return 1 if an IRQ is ready, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -252,7 +252,7 @@ int uart_irq_tx_ready(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_enable - enable RX interrupt in IER
|
* @brief Enable RX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -268,7 +268,7 @@ void uart_irq_rx_enable(int port /* UART to enable Rx
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_disable - disable RX interrupt in IER
|
* @brief Disable RX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -284,7 +284,7 @@ void uart_irq_rx_disable(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_ready - check if Rx IRQ has been raised
|
* @brief Check if Rx IRQ has been raised
|
||||||
*
|
*
|
||||||
* @return 1 if an IRQ is ready, 0 otherwise
|
* @return 1 if an IRQ is ready, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -299,7 +299,7 @@ int uart_irq_rx_ready(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_err_enable - enable error interrupt
|
* @brief Enable error interrupt
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -318,7 +318,7 @@ void uart_irq_err_enable(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_err_disable - disable error interrupt
|
* @brief Disable error interrupt
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -338,7 +338,7 @@ void uart_irq_err_disable(int port /* UART to disable Rx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_is_pending - check if Tx or Rx IRQ is pending
|
* @brief Check if Tx or Rx IRQ is pending
|
||||||
*
|
*
|
||||||
* @return 1 if a Tx or Rx IRQ is pending, 0 otherwise
|
* @return 1 if a Tx or Rx IRQ is pending, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -357,7 +357,7 @@ int uart_irq_is_pending(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_update - update IRQ status
|
* @brief Update IRQ status
|
||||||
*
|
*
|
||||||
* @return always 1
|
* @return always 1
|
||||||
*/
|
*/
|
||||||
|
@ -369,7 +369,7 @@ int uart_irq_update(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_get - returns UART interrupt number
|
* @brief Returns UART interrupt number
|
||||||
*
|
*
|
||||||
* Returns the IRQ number used by the specified UART port
|
* Returns the IRQ number used by the specified UART port
|
||||||
*
|
*
|
||||||
|
|
|
@ -259,7 +259,7 @@ UART_PORTS_CONFIGURE(struct ns16550, uart);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_init - initialize the chip
|
* @brief Initialize the chip
|
||||||
*
|
*
|
||||||
* This routine is called to reset the chip in a quiescent state.
|
* This routine is called to reset the chip in a quiescent state.
|
||||||
*
|
*
|
||||||
|
@ -312,7 +312,7 @@ void uart_init(int port, /* UART channel to initialize */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_poll_in - poll the device for input.
|
* @brief Poll the device for input.
|
||||||
*
|
*
|
||||||
* @return 0 if a character arrived, -1 if the input buffer if empty.
|
* @return 0 if a character arrived, -1 if the input buffer if empty.
|
||||||
*/
|
*/
|
||||||
|
@ -332,7 +332,7 @@ int uart_poll_in(int port, /* UART channel to select for input */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_poll_out - output a character in polled mode.
|
* @brief Output a character in polled mode.
|
||||||
*
|
*
|
||||||
* Checks if the transmitter is empty. If empty, a character is written to
|
* Checks if the transmitter is empty. If empty, a character is written to
|
||||||
* the data register.
|
* the data register.
|
||||||
|
@ -359,7 +359,7 @@ unsigned char uart_poll_out(
|
||||||
#if CONFIG_UART_INTERRUPT_DRIVEN
|
#if CONFIG_UART_INTERRUPT_DRIVEN
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_fifo_fill - fill FIFO with data
|
* @brief Fill FIFO with data
|
||||||
*
|
*
|
||||||
* @return number of bytes sent
|
* @return number of bytes sent
|
||||||
*/
|
*/
|
||||||
|
@ -379,7 +379,7 @@ int uart_fifo_fill(int port, /* UART on port to send */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_fifo_read - read data from FIFO
|
* @brief Read data from FIFO
|
||||||
*
|
*
|
||||||
* @return number of bytes read
|
* @return number of bytes read
|
||||||
*/
|
*/
|
||||||
|
@ -400,7 +400,7 @@ int uart_fifo_read(int port, /* UART to receive from */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_enable - enable TX interrupt in IER
|
* @brief Enable TX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -414,7 +414,7 @@ void uart_irq_tx_enable(int port /* UART to enable Tx
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_disable - disable TX interrupt in IER
|
* @brief Disable TX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -427,7 +427,7 @@ void uart_irq_tx_disable(int port /* UART to disable Tx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_ready - check if Tx IRQ has been raised
|
* @brief Check if Tx IRQ has been raised
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -440,7 +440,7 @@ int uart_irq_tx_ready(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _uart_irq_rx_enable - enable RX interrupt in IER
|
* @brief Enable RX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -454,7 +454,7 @@ void uart_irq_rx_enable(int port /* UART to enable Rx
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_disable - disable RX interrupt in IER
|
* @brief Disable RX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -467,7 +467,7 @@ void uart_irq_rx_disable(int port /* UART to disable Rx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_ready - check if Rx IRQ has been raised
|
* @brief Check if Rx IRQ has been raised
|
||||||
*
|
*
|
||||||
* @return 1 if an IRQ is ready, 0 otherwise
|
* @return 1 if an IRQ is ready, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -480,7 +480,7 @@ int uart_irq_rx_ready(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_err_enable - enable error interrupt in IER
|
* @brief Enable error interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -493,7 +493,7 @@ void uart_irq_err_enable(int port /* UART to enable Rx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_err_disable - disable error interrupt in IER
|
* @brief Disable error interrupt in IER
|
||||||
*
|
*
|
||||||
* @return 1 if an IRQ is ready, 0 otherwise
|
* @return 1 if an IRQ is ready, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -506,7 +506,7 @@ void uart_irq_err_disable(int port /* UART to disable Rx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_is_pending - check if any IRQ is pending
|
* @brief Check if any IRQ is pending
|
||||||
*
|
*
|
||||||
* @return 1 if an IRQ is pending, 0 otherwise
|
* @return 1 if an IRQ is pending, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -519,7 +519,7 @@ int uart_irq_is_pending(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_update - update cached contents of IIR
|
* @brief Update cached contents of IIR
|
||||||
*
|
*
|
||||||
* @return always 1
|
* @return always 1
|
||||||
*/
|
*/
|
||||||
|
@ -534,7 +534,7 @@ int uart_irq_update(int port /* UART to update */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_get - returns UART interrupt number
|
* @brief Returns UART interrupt number
|
||||||
*
|
*
|
||||||
* Returns the IRQ number used by the specified UART port
|
* Returns the IRQ number used by the specified UART port
|
||||||
*
|
*
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct uart {
|
||||||
static struct uart __noinit uart[CONFIG_UART_NUM_SYSTEM_PORTS];
|
static struct uart __noinit uart[CONFIG_UART_NUM_SYSTEM_PORTS];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* uart_init - initialize fake serial port
|
* @brief Initialize fake serial port
|
||||||
* @which: port number
|
* @which: port number
|
||||||
* @init_info: pointer to initialization information
|
* @init_info: pointer to initialization information
|
||||||
*/
|
*/
|
||||||
|
@ -66,7 +66,7 @@ void uart_init(int which, const struct uart_init_info * const init_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* uart_poll_out - output a character to serial port
|
* @brief Output a character to serial port
|
||||||
* @port: port number
|
* @port: port number
|
||||||
* @c: character to output
|
* @c: character to output
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -155,7 +155,7 @@ UART_PORTS_CONFIGURE(struct _StellarisUartPort, ports);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* baudrateSet - set the baud rate
|
* @brief Set the baud rate
|
||||||
*
|
*
|
||||||
* This routine set the given baud rate for the UART.
|
* This routine set the given baud rate for the UART.
|
||||||
*
|
*
|
||||||
|
@ -186,7 +186,7 @@ static void baudrateSet(int port, uint32_t baudrate, uint32_t sysClkFreqInHz)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* enable - enable the UART
|
* @brief Enable the UART
|
||||||
*
|
*
|
||||||
* This routine enables the given UART.
|
* This routine enables the given UART.
|
||||||
*
|
*
|
||||||
|
@ -202,7 +202,7 @@ static inline void enable(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* disable - disable the UART
|
* @brief Disable the UART
|
||||||
*
|
*
|
||||||
* This routine disables the given UART.
|
* This routine disables the given UART.
|
||||||
*
|
*
|
||||||
|
@ -235,7 +235,7 @@ static inline void disable(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* lineControlDefaultsSet - set the default UART line controls
|
* @brief Set the default UART line controls
|
||||||
*
|
*
|
||||||
* This routine sets the given UART's line controls to their default settings.
|
* This routine sets the given UART's line controls to their default settings.
|
||||||
*
|
*
|
||||||
|
@ -251,7 +251,7 @@ static inline void lineControlDefaultsSet(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_init - initialize UART channel
|
* @brief Initialize UART channel
|
||||||
*
|
*
|
||||||
* This routine is called to reset the chip in a quiescent state.
|
* This routine is called to reset the chip in a quiescent state.
|
||||||
* It is assumed that this function is called only once per UART.
|
* It is assumed that this function is called only once per UART.
|
||||||
|
@ -272,7 +272,7 @@ void uart_init(int port, /* UART channel to initialize */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* pollTxReady - get the UART transmit ready status
|
* @brief Get the UART transmit ready status
|
||||||
*
|
*
|
||||||
* This routine returns the given UART's transmit ready status.
|
* This routine returns the given UART's transmit ready status.
|
||||||
*
|
*
|
||||||
|
@ -288,7 +288,7 @@ static int pollTxReady(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_poll_in - poll the device for input.
|
* @brief Poll the device for input.
|
||||||
*
|
*
|
||||||
* @return 0 if a character arrived, -1 if the input buffer if empty.
|
* @return 0 if a character arrived, -1 if the input buffer if empty.
|
||||||
*/
|
*/
|
||||||
|
@ -310,7 +310,7 @@ int uart_poll_in(int port, /* UART channel to select for input */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_poll_out - output a character in polled mode.
|
* @brief Output a character in polled mode.
|
||||||
*
|
*
|
||||||
* Checks if the transmitter is empty. If empty, a character is written to
|
* Checks if the transmitter is empty. If empty, a character is written to
|
||||||
* the data register.
|
* the data register.
|
||||||
|
@ -333,7 +333,7 @@ unsigned char uart_poll_out(int port, unsigned char c)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_fifo_fill - fill FIFO with data
|
* @brief Fill FIFO with data
|
||||||
*
|
*
|
||||||
* @return number of bytes sent
|
* @return number of bytes sent
|
||||||
*/
|
*/
|
||||||
|
@ -355,7 +355,7 @@ int uart_fifo_fill(int port, /* UART on which to send */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_fifo_read - read data from FIFO
|
* @brief Read data from FIFO
|
||||||
*
|
*
|
||||||
* @return number of bytes read
|
* @return number of bytes read
|
||||||
*/
|
*/
|
||||||
|
@ -377,7 +377,7 @@ int uart_fifo_read(int port, /* UART to receive from */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_enable - enable TX interrupt
|
* @brief Enable TX interrupt
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -432,7 +432,7 @@ void uart_irq_tx_enable(int port /* UART to enable Tx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_disable - disable TX interrupt in IER
|
* @brief Disable TX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -447,7 +447,7 @@ void uart_irq_tx_disable(int port /* UART to disable Tx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_tx_ready - check if Tx IRQ has been raised
|
* @brief Check if Tx IRQ has been raised
|
||||||
*
|
*
|
||||||
* @return 1 if a Tx IRQ is pending, 0 otherwise
|
* @return 1 if a Tx IRQ is pending, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -462,7 +462,7 @@ int uart_irq_tx_ready(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_enable - enable RX interrupt in IER
|
* @brief Enable RX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -477,7 +477,7 @@ void uart_irq_rx_enable(int port /* UART to enable Rx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_disable - disable RX interrupt in IER
|
* @brief Disable RX interrupt in IER
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -492,7 +492,7 @@ void uart_irq_rx_disable(int port /* UART to disable Rx interrupt */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_rx_ready - check if Rx IRQ has been raised
|
* @brief Check if Rx IRQ has been raised
|
||||||
*
|
*
|
||||||
* @return 1 if an IRQ is ready, 0 otherwise
|
* @return 1 if an IRQ is ready, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -507,7 +507,7 @@ int uart_irq_rx_ready(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_err_enable - enable error interrupts
|
* @brief Enable error interrupts
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -523,7 +523,7 @@ void uart_irq_err_enable(int port /* UART to enable interrupts for */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_err_disable - disable error interrupts
|
* @brief Disable error interrupts
|
||||||
*
|
*
|
||||||
* @return N/A
|
* @return N/A
|
||||||
*/
|
*/
|
||||||
|
@ -539,7 +539,7 @@ void uart_irq_err_disable(int port /* UART to disable interrupts for */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_is_pending - check if Tx or Rx IRQ is pending
|
* @brief Check if Tx or Rx IRQ is pending
|
||||||
*
|
*
|
||||||
* @return 1 if a Tx or Rx IRQ is pending, 0 otherwise
|
* @return 1 if a Tx or Rx IRQ is pending, 0 otherwise
|
||||||
*/
|
*/
|
||||||
|
@ -555,7 +555,7 @@ int uart_irq_is_pending(int port /* UART to check */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_update - update IRQ status
|
* @brief Update IRQ status
|
||||||
*
|
*
|
||||||
* @return always 1
|
* @return always 1
|
||||||
*/
|
*/
|
||||||
|
@ -567,7 +567,7 @@ int uart_irq_update(int port)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* uart_irq_get - returns UART interrupt number
|
* @brief Returns UART interrupt number
|
||||||
*
|
*
|
||||||
* Returns the IRQ number used by the specified UART port
|
* Returns the IRQ number used by the specified UART port
|
||||||
*
|
*
|
||||||
|
|
|
@ -70,7 +70,7 @@ static uint32_t clock_accumulated_count = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* enable - enable the timer with the given limit/countup value
|
* @brief Enable the timer with the given limit/countup value
|
||||||
*
|
*
|
||||||
* This routine sets up the timer for operation by:
|
* This routine sets up the timer for operation by:
|
||||||
* - setting value to which the timer will count up to;
|
* - setting value to which the timer will count up to;
|
||||||
|
@ -97,7 +97,7 @@ static ALWAYS_INLINE void enable(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* count_get - get the current counter value
|
* @brief Get the current counter value
|
||||||
*
|
*
|
||||||
* This routine gets the value from the timer's count register. This
|
* This routine gets the value from the timer's count register. This
|
||||||
* value is the 'time' elapsed from the starting count (assumed to be 0).
|
* value is the 'time' elapsed from the starting count (assumed to be 0).
|
||||||
|
@ -113,7 +113,7 @@ static ALWAYS_INLINE uint32_t count_get(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* limit_get - get the limit/countup value
|
* @brief Get the limit/countup value
|
||||||
*
|
*
|
||||||
* This routine gets the value from the timer's limit register, which is the
|
* This routine gets the value from the timer's limit register, which is the
|
||||||
* value to which the timer will count up to.
|
* value to which the timer will count up to.
|
||||||
|
@ -129,7 +129,7 @@ static ALWAYS_INLINE uint32_t limit_get(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_int_handler - system clock periodic tick handler
|
* @brief System clock periodic tick handler
|
||||||
*
|
*
|
||||||
* This routine handles the system clock periodic tick interrupt. A TICK_EVENT
|
* This routine handles the system clock periodic tick interrupt. A TICK_EVENT
|
||||||
* event is pushed onto the microkernel stack.
|
* event is pushed onto the microkernel stack.
|
||||||
|
@ -155,7 +155,7 @@ void _timer_int_handler(void *unused)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_driver - initialize and enable the system clock
|
* @brief Initialize and enable the system clock
|
||||||
*
|
*
|
||||||
* This routine is used to program the ARCv2 timer to deliver interrupts at the
|
* This routine is used to program the ARCv2 timer to deliver interrupts at the
|
||||||
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
||||||
|
@ -191,7 +191,7 @@ void timer_driver(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_read - read the BSP timer hardware
|
* @brief Read the BSP timer hardware
|
||||||
*
|
*
|
||||||
* This routine returns the current time in terms of timer hardware clock cycles.
|
* This routine returns the current time in terms of timer hardware clock cycles.
|
||||||
*
|
*
|
||||||
|
@ -206,7 +206,7 @@ uint32_t timer_read(void)
|
||||||
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_disable - stop announcing ticks into the kernel
|
* @brief Stop announcing ticks into the kernel
|
||||||
*
|
*
|
||||||
* This routine disables timer interrupt generation and delivery.
|
* This routine disables timer interrupt generation and delivery.
|
||||||
* Note that the timer's counting cannot be stopped by software.
|
* Note that the timer's counting cannot be stopped by software.
|
||||||
|
|
|
@ -129,7 +129,7 @@ static unsigned char idle_mode = IDLE_NOT_TICKLESS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sysTickStop - stop the timer
|
* @brief Stop the timer
|
||||||
*
|
*
|
||||||
* This routine disables the systick counter.
|
* This routine disables the systick counter.
|
||||||
*
|
*
|
||||||
|
@ -158,7 +158,7 @@ static ALWAYS_INLINE void sysTickStop(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sysTickStart - start the timer
|
* @brief Start the timer
|
||||||
*
|
*
|
||||||
* This routine enables the systick counter.
|
* This routine enables the systick counter.
|
||||||
*
|
*
|
||||||
|
@ -185,7 +185,7 @@ static ALWAYS_INLINE void sysTickStart(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sysTickCurrentGet - get the current counter value
|
* @brief Get the current counter value
|
||||||
*
|
*
|
||||||
* This routine gets the value from the timer's current value register. This
|
* This routine gets the value from the timer's current value register. This
|
||||||
* value is the 'time' remaining to decrement before the timer triggers an
|
* value is the 'time' remaining to decrement before the timer triggers an
|
||||||
|
@ -202,7 +202,7 @@ static ALWAYS_INLINE uint32_t sysTickCurrentGet(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sysTickReloadGet - get the reload/countdown value
|
* @brief Get the reload/countdown value
|
||||||
*
|
*
|
||||||
* This routine returns the value from the reload value register.
|
* This routine returns the value from the reload value register.
|
||||||
*
|
*
|
||||||
|
@ -219,7 +219,7 @@ static ALWAYS_INLINE uint32_t sysTickReloadGet(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sysTickReloadSet - set the reload/countdown value
|
* @brief Set the reload/countdown value
|
||||||
*
|
*
|
||||||
* This routine sets value from which the timer will count down and also
|
* This routine sets value from which the timer will count down and also
|
||||||
* sets the timer's current value register to zero.
|
* sets the timer's current value register to zero.
|
||||||
|
@ -246,7 +246,7 @@ static ALWAYS_INLINE void sysTickReloadSet(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _TIMER_INT_HANDLER - system clock tick handler
|
* @brief System clock tick handler
|
||||||
*
|
*
|
||||||
* This routine handles the system clock tick interrupt. A TICK_EVENT event
|
* This routine handles the system clock tick interrupt. A TICK_EVENT event
|
||||||
* is pushed onto the microkernel stack.
|
* is pushed onto the microkernel stack.
|
||||||
|
@ -379,7 +379,7 @@ void _TIMER_INT_HANDLER(void *unused)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* sysTickTicklessIdleInit - initialize the tickless idle feature
|
* @brief Initialize the tickless idle feature
|
||||||
*
|
*
|
||||||
* This routine initializes the tickless idle feature by calculating the
|
* This routine initializes the tickless idle feature by calculating the
|
||||||
* necessary hardware-specific parameters.
|
* necessary hardware-specific parameters.
|
||||||
|
@ -460,7 +460,7 @@ static void sysTickTicklessIdleInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_enter - Place the system timer into idle state
|
* @brief Place the system timer into idle state
|
||||||
*
|
*
|
||||||
* Re-program the timer to enter into the idle state for the given number of
|
* Re-program the timer to enter into the idle state for the given number of
|
||||||
* ticks. It is set to a "one shot" mode where it will fire in the number of
|
* ticks. It is set to a "one shot" mode where it will fire in the number of
|
||||||
|
@ -516,7 +516,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_exit - handling of tickless idle when interrupted
|
* @brief Handling of tickless idle when interrupted
|
||||||
*
|
*
|
||||||
* The routine, called by _sys_power_save_idle_exit, is responsible for taking
|
* The routine, called by _sys_power_save_idle_exit, is responsible for taking
|
||||||
* the timer out of idle mode and generating an interrupt at the next
|
* the timer out of idle mode and generating an interrupt at the next
|
||||||
|
@ -608,7 +608,7 @@ void _timer_idle_exit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_driver - initialize and enable the system clock
|
* @brief Initialize and enable the system clock
|
||||||
*
|
*
|
||||||
* This routine is used to program the systick to deliver interrupts at the
|
* This routine is used to program the systick to deliver interrupts at the
|
||||||
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
||||||
|
@ -648,7 +648,7 @@ void timer_driver(int priority /* priority parameter is ignored by this driver
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_read - read the BSP timer hardware
|
* @brief Read the BSP timer hardware
|
||||||
*
|
*
|
||||||
* This routine returns the current time in terms of timer hardware clock cycles.
|
* This routine returns the current time in terms of timer hardware clock cycles.
|
||||||
* Some kernel facilities (e.g. benchmarking code) directly call timer_read()
|
* Some kernel facilities (e.g. benchmarking code) directly call timer_read()
|
||||||
|
@ -670,7 +670,7 @@ uint32_t timer_read(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_disable - stop announcing ticks into the kernel
|
* @brief Stop announcing ticks into the kernel
|
||||||
*
|
*
|
||||||
* This routine disables the systick so that timer interrupts are no
|
* This routine disables the systick so that timer interrupts are no
|
||||||
* longer delivered.
|
* longer delivered.
|
||||||
|
|
|
@ -221,7 +221,7 @@ static int stale_irq_check =
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _hpetMainCounterAtomic - safely read the main HPET up counter
|
* @brief Safely read the main HPET up counter
|
||||||
*
|
*
|
||||||
* This routine simulates an atomic read of the 64-bit system clock on CPUs
|
* This routine simulates an atomic read of the 64-bit system clock on CPUs
|
||||||
* that only support 32-bit memory accesses. The most significant word
|
* that only support 32-bit memory accesses. The most significant word
|
||||||
|
@ -250,7 +250,7 @@ static uint64_t _hpetMainCounterAtomic(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_int_handler - system clock tick handler
|
* @brief System clock tick handler
|
||||||
*
|
*
|
||||||
* This routine handles the system clock tick interrupt. A TICK_EVENT event
|
* This routine handles the system clock tick interrupt. A TICK_EVENT event
|
||||||
* is pushed onto the microkernel stack.
|
* is pushed onto the microkernel stack.
|
||||||
|
@ -351,7 +351,7 @@ void _timer_int_handler(void *unused)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_enter - Place system timer into idle state
|
* @brief Place system timer into idle state
|
||||||
*
|
*
|
||||||
* Re-program the timer to enter into the idle state for the given number of
|
* Re-program the timer to enter into the idle state for the given number of
|
||||||
* ticks (-1 means infinite number of ticks).
|
* ticks (-1 means infinite number of ticks).
|
||||||
|
@ -380,7 +380,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_exit - Take system timer out of idle state
|
* @brief Take system timer out of idle state
|
||||||
*
|
*
|
||||||
* Determine how long timer has been idling and reprogram it to interrupt at the
|
* Determine how long timer has been idling and reprogram it to interrupt at the
|
||||||
* next tick.
|
* next tick.
|
||||||
|
@ -489,7 +489,7 @@ void _timer_idle_exit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_driver - initialize and enable the system clock
|
* @brief Initialize and enable the system clock
|
||||||
*
|
*
|
||||||
* This routine is used to program the HPET to deliver interrupts at the
|
* This routine is used to program the HPET to deliver interrupts at the
|
||||||
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
||||||
|
@ -622,7 +622,7 @@ void timer_driver(int priority /* priority parameter is ignored by this driver
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_read - read the BSP timer hardware
|
* @brief Read the BSP timer hardware
|
||||||
*
|
*
|
||||||
* This routine returns the current time in terms of timer hardware clock cycles.
|
* This routine returns the current time in terms of timer hardware clock cycles.
|
||||||
*
|
*
|
||||||
|
@ -642,7 +642,7 @@ uint32_t timer_read(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_disable - stop announcing ticks into the kernel
|
* @brief Stop announcing ticks into the kernel
|
||||||
*
|
*
|
||||||
* This routine disables the HPET so that timer interrupts are no
|
* This routine disables the HPET so that timer interrupts are no
|
||||||
* longer delivered.
|
* longer delivered.
|
||||||
|
|
|
@ -144,7 +144,7 @@ extern struct nano_stack _k_command_stack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8253CounterRead - read the i8253 counter register's value
|
* @brief Read the i8253 counter register's value
|
||||||
*
|
*
|
||||||
* This routine reads the 16 bit value from the i8253 counter register.
|
* This routine reads the 16 bit value from the i8253 counter register.
|
||||||
*
|
*
|
||||||
|
@ -171,7 +171,7 @@ static inline uint16_t _i8253CounterRead(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8253CounterSet - set the i8253 counter register's value
|
* @brief Set the i8253 counter register's value
|
||||||
*
|
*
|
||||||
* This routine sets the 16 bit value from which the i8253 timer will
|
* This routine sets the 16 bit value from which the i8253 timer will
|
||||||
* decrement and sets that counter register to its value.
|
* decrement and sets that counter register to its value.
|
||||||
|
@ -194,7 +194,7 @@ static inline void _i8253CounterSet(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8253CounterPeriodic - set the i8253 timer to fire periodically
|
* @brief Set the i8253 timer to fire periodically
|
||||||
*
|
*
|
||||||
* This routine sets the i8253 to fire on a periodic basis.
|
* This routine sets the i8253 to fire on a periodic basis.
|
||||||
*
|
*
|
||||||
|
@ -214,7 +214,7 @@ static inline void _i8253CounterPeriodic(
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8253CounterOneShot - set the i8253 timer to fire once only
|
* @brief Set the i8253 timer to fire once only
|
||||||
*
|
*
|
||||||
* This routine sets the i8253 to fire once only.
|
* This routine sets the i8253 to fire once only.
|
||||||
*
|
*
|
||||||
|
@ -234,7 +234,7 @@ static inline void _i8253CounterOneShot(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_int_handler - system clock periodic tick handler
|
* @brief System clock periodic tick handler
|
||||||
*
|
*
|
||||||
* This routine handles the system clock periodic tick interrupt. A TICK_EVENT
|
* This routine handles the system clock periodic tick interrupt. A TICK_EVENT
|
||||||
* event is pushed onto the microkernel stack.
|
* event is pushed onto the microkernel stack.
|
||||||
|
@ -307,7 +307,7 @@ void _timer_int_handler(void *unusedArg /* not used */
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8253TicklessIdleInit - initialize the tickless idle feature
|
* @brief Initialize the tickless idle feature
|
||||||
*
|
*
|
||||||
* This routine initializes the tickless idle feature. Note that maximum
|
* This routine initializes the tickless idle feature. Note that maximum
|
||||||
* number of ticks that can elapse during a "tickless idle" is limited by
|
* number of ticks that can elapse during a "tickless idle" is limited by
|
||||||
|
@ -345,7 +345,7 @@ static void _i8253TicklessIdleSkew(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_enter - Place system timer into idle state
|
* @brief Place system timer into idle state
|
||||||
*
|
*
|
||||||
* Re-program the timer to enter into the idle state for the given number of
|
* Re-program the timer to enter into the idle state for the given number of
|
||||||
* ticks. It is placed into one shot mode where it will fire in the number of
|
* ticks. It is placed into one shot mode where it will fire in the number of
|
||||||
|
@ -402,7 +402,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_exit - handling of tickless idle when interrupted
|
* @brief Handling of tickless idle when interrupted
|
||||||
*
|
*
|
||||||
* The routine is responsible for taking the timer out of idle mode and
|
* The routine is responsible for taking the timer out of idle mode and
|
||||||
* generating an interrupt at the next tick interval.
|
* generating an interrupt at the next tick interval.
|
||||||
|
@ -468,7 +468,7 @@ void _timer_idle_exit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_driver - initialize and enable the system clock
|
* @brief Initialize and enable the system clock
|
||||||
*
|
*
|
||||||
* This routine is used to program the PIT to deliver interrupts at the
|
* This routine is used to program the PIT to deliver interrupts at the
|
||||||
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
||||||
|
@ -503,7 +503,7 @@ void timer_driver(int priority /* priority parameter ignored by this driver */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_read - read the BSP timer hardware
|
* @brief Read the BSP timer hardware
|
||||||
*
|
*
|
||||||
* This routine returns the current time in terms of timer hardware clock cycles.
|
* This routine returns the current time in terms of timer hardware clock cycles.
|
||||||
*
|
*
|
||||||
|
@ -558,7 +558,7 @@ uint32_t timer_read(void)
|
||||||
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_disable - stop announcing ticks into the kernel
|
* @brief Stop announcing ticks into the kernel
|
||||||
*
|
*
|
||||||
* This routine simply disables the PIT counter such that interrupts are no
|
* This routine simply disables the PIT counter such that interrupts are no
|
||||||
* longer delivered.
|
* longer delivered.
|
||||||
|
|
|
@ -134,7 +134,7 @@ extern struct nano_stack _k_command_stack;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerPeriodic - set the timer for periodic mode
|
* @brief Set the timer for periodic mode
|
||||||
*
|
*
|
||||||
* This routine sets the timer for periodic mode.
|
* This routine sets the timer for periodic mode.
|
||||||
*
|
*
|
||||||
|
@ -153,7 +153,7 @@ static inline void _loApicTimerPeriodic(void)
|
||||||
defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerStop - stop the timer
|
* @brief Stop the timer
|
||||||
*
|
*
|
||||||
* This routine stops the timer.
|
* This routine stops the timer.
|
||||||
*
|
*
|
||||||
|
@ -172,7 +172,7 @@ static inline void _loApicTimerStop(void)
|
||||||
defined(LOAPIC_TIMER_PERIODIC_WORKAROUND)
|
defined(LOAPIC_TIMER_PERIODIC_WORKAROUND)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerStart - start the timer
|
* @brief Start the timer
|
||||||
*
|
*
|
||||||
* This routine starts the timer.
|
* This routine starts the timer.
|
||||||
*
|
*
|
||||||
|
@ -189,7 +189,7 @@ static inline void _loApicTimerStart(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerSetCount - set countdown value
|
* @brief Set countdown value
|
||||||
*
|
*
|
||||||
* This routine sets value from which the timer will count down.
|
* This routine sets value from which the timer will count down.
|
||||||
*
|
*
|
||||||
|
@ -208,7 +208,7 @@ static inline void _loApicTimerSetCount(
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerOneShot - set the timer for one shot mode
|
* @brief Set the timer for one shot mode
|
||||||
*
|
*
|
||||||
* This routine sets the timer for one shot mode.
|
* This routine sets the timer for one shot mode.
|
||||||
*
|
*
|
||||||
|
@ -225,7 +225,7 @@ static inline void _loApicTimerOneShot(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerSetDivider - set the rate at which the timer is decremented
|
* @brief Set the rate at which the timer is decremented
|
||||||
*
|
*
|
||||||
* This routine sets rate at which the timer is decremented to match the
|
* This routine sets rate at which the timer is decremented to match the
|
||||||
* external bus frequency.
|
* external bus frequency.
|
||||||
|
@ -242,7 +242,7 @@ static inline void _loApicTimerSetDivider(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerGetRemaining - get the value from the current count register
|
* @brief Get the value from the current count register
|
||||||
*
|
*
|
||||||
* This routine gets the value from the timer's current count register. This
|
* This routine gets the value from the timer's current count register. This
|
||||||
* value is the 'time' remaining to decrement before the timer triggers an
|
* value is the 'time' remaining to decrement before the timer triggers an
|
||||||
|
@ -260,7 +260,7 @@ static inline uint32_t _loApicTimerGetRemaining(void)
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerGetCount - get the value from the initial count register
|
* @brief Get the value from the initial count register
|
||||||
*
|
*
|
||||||
* This routine gets the value from the initial count register.
|
* This routine gets the value from the initial count register.
|
||||||
*
|
*
|
||||||
|
@ -276,7 +276,7 @@ static inline uint32_t _loApicTimerGetCount(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_int_handler - system clock tick handler
|
* @brief System clock tick handler
|
||||||
*
|
*
|
||||||
* This routine handles the system clock tick interrupt. A TICK_EVENT event
|
* This routine handles the system clock tick interrupt. A TICK_EVENT event
|
||||||
* is pushed onto the microkernel stack.
|
* is pushed onto the microkernel stack.
|
||||||
|
@ -352,7 +352,7 @@ void _timer_int_handler(void *unused /* parameter is not used */
|
||||||
#if defined(TIMER_SUPPORTS_TICKLESS)
|
#if defined(TIMER_SUPPORTS_TICKLESS)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _loApicTimerTicklessIdleInit - initialize the tickless idle feature
|
* @brief Initialize the tickless idle feature
|
||||||
*
|
*
|
||||||
* This routine initializes the tickless idle feature. Note that the maximum
|
* This routine initializes the tickless idle feature. Note that the maximum
|
||||||
* number of ticks that can elapse during a "tickless idle" is limited by
|
* number of ticks that can elapse during a "tickless idle" is limited by
|
||||||
|
@ -375,7 +375,7 @@ static void _loApicTimerTicklessIdleInit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _i8253TicklessIdleSkew - calculate the skew from idle mode switching
|
* @brief Calculate the skew from idle mode switching
|
||||||
*
|
*
|
||||||
* This routine calculates the skew from switching the timer in and out of idle
|
* This routine calculates the skew from switching the timer in and out of idle
|
||||||
* mode. The typical sequence is:
|
* mode. The typical sequence is:
|
||||||
|
@ -409,7 +409,7 @@ static void _loApicTimerTicklessIdleSkew(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_enter - Place system timer into idle state
|
* @brief Place system timer into idle state
|
||||||
*
|
*
|
||||||
* Re-program the timer to enter into the idle state for the given number of
|
* Re-program the timer to enter into the idle state for the given number of
|
||||||
* ticks. It is placed into one shot mode where it will fire in the number of
|
* ticks. It is placed into one shot mode where it will fire in the number of
|
||||||
|
@ -462,7 +462,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* _timer_idle_exit - handling of tickless idle when interrupted
|
* @brief Handling of tickless idle when interrupted
|
||||||
*
|
*
|
||||||
* The routine is responsible for taking the timer out of idle mode and
|
* The routine is responsible for taking the timer out of idle mode and
|
||||||
* generating an interrupt at the next tick interval.
|
* generating an interrupt at the next tick interval.
|
||||||
|
@ -532,7 +532,7 @@ void _timer_idle_exit(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_driver - initialize and enable the system clock
|
* @brief Initialize and enable the system clock
|
||||||
*
|
*
|
||||||
* This routine is used to program the PIT to deliver interrupts at the
|
* This routine is used to program the PIT to deliver interrupts at the
|
||||||
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
* rate specified via the 'sys_clock_us_per_tick' global variable.
|
||||||
|
@ -572,7 +572,7 @@ void timer_driver(int priority /* priority parameter ignored by this driver */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_read - read the BSP timer hardware
|
* @brief Read the BSP timer hardware
|
||||||
*
|
*
|
||||||
* This routine returns the current time in terms of timer hardware clock cycles.
|
* This routine returns the current time in terms of timer hardware clock cycles.
|
||||||
*
|
*
|
||||||
|
@ -601,7 +601,7 @@ uint32_t timer_read(void)
|
||||||
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* timer_disable - stop announcing ticks into the kernel
|
* @brief Stop announcing ticks into the kernel
|
||||||
*
|
*
|
||||||
* This routine simply disables the LOAPIC counter such that interrupts are no
|
* This routine simply disables the LOAPIC counter such that interrupts are no
|
||||||
* longer delivered.
|
* longer delivered.
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_irq_enable_set - enable/disable interrupt
|
* @brief Enable/disable interrupt
|
||||||
*
|
*
|
||||||
* Enables or disables the specified interrupt
|
* Enables or disables the specified interrupt
|
||||||
*
|
*
|
||||||
|
@ -78,7 +78,7 @@ static inline void _arc_v2_irq_unit_irq_enable_set(
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_int_enable - enable interrupt
|
* @brief Enable interrupt
|
||||||
*
|
*
|
||||||
* Enables the specified interrupt
|
* Enables the specified interrupt
|
||||||
*
|
*
|
||||||
|
@ -91,7 +91,7 @@ static inline void _arc_v2_irq_unit_int_enable(int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_int_disable - disable interrupt
|
* @brief Disable interrupt
|
||||||
*
|
*
|
||||||
* Disables the specified interrupt
|
* Disables the specified interrupt
|
||||||
*
|
*
|
||||||
|
@ -104,7 +104,7 @@ static inline void _arc_v2_irq_unit_int_disable(int irq)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _arc_v2_irq_unit_prio_set - set interrupt priority
|
* @brief Set interrupt priority
|
||||||
*
|
*
|
||||||
* Set the priority of the specified interrupt
|
* Set the priority of the specified interrupt
|
||||||
*
|
*
|
||||||
|
|
|
@ -47,7 +47,7 @@ extern unsigned nanoFfsMsb(unsigned int);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nanoFfsMsb_inline - Find First Set bit (searching from most significant bit)
|
* @brief Find First Set bit (searching from most significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and returns
|
* This routine finds the first bit set in the argument passed it and returns
|
||||||
* the index of that bit. Bits are numbered starting at 1 from the least
|
* the index of that bit. Bits are numbered starting at 1 from the least
|
||||||
|
@ -76,7 +76,7 @@ static ALWAYS_INLINE unsigned int nanoFfsMsb_inline(unsigned int op)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* nanoFfsLsb - find first set bit (searching from the least significant bit)
|
* @brief Find first set bit (searching from the least significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and
|
* This routine finds the first bit set in the argument passed it and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
|
|
@ -73,7 +73,7 @@ extern void _irq_exit(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_lock_inline - disable all interrupts on the CPU (inline)
|
* @brief Disable all interrupts on the CPU (inline)
|
||||||
*
|
*
|
||||||
* See irq_lock() for full description
|
* See irq_lock() for full description
|
||||||
*
|
*
|
||||||
|
@ -93,7 +93,7 @@ static ALWAYS_INLINE unsigned int irq_lock_inline(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_unlock_inline - enable all interrupts on the CPU (inline)
|
* @brief Enable all interrupts on the CPU (inline)
|
||||||
*
|
*
|
||||||
* See irq_unlock() for full description
|
* See irq_unlock() for full description
|
||||||
*
|
*
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* find_last_set_inline - find first set bit (searching from most significant bit)
|
* @brief Find first set bit (searching from most significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and returns
|
* This routine finds the first bit set in the argument passed it and returns
|
||||||
* the index of that bit. Bits are numbered starting at 1 from the least
|
* the index of that bit. Bits are numbered starting at 1 from the least
|
||||||
|
@ -82,7 +82,7 @@ static ALWAYS_INLINE unsigned int find_last_set_inline(unsigned int op)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* find_first_set_inline - find first set bit (from the least significant bit)
|
* @brief Find first set bit (from the least significant bit)
|
||||||
*
|
*
|
||||||
* This routine finds the first bit set in the argument passed it and
|
* This routine finds the first bit set in the argument passed it and
|
||||||
* returns the index of that bit. Bits are numbered starting
|
* returns the index of that bit. Bits are numbered starting
|
||||||
|
@ -111,7 +111,7 @@ static ALWAYS_INLINE unsigned int find_first_set_inline(unsigned int op)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_lock_inline - disable all interrupts on the CPU (inline)
|
* @brief Disable all interrupts on the CPU (inline)
|
||||||
*
|
*
|
||||||
* This routine disables interrupts. It can be called from either interrupt,
|
* This routine disables interrupts. It can be called from either interrupt,
|
||||||
* task or fiber level. This routine returns an architecture-dependent
|
* task or fiber level. This routine returns an architecture-dependent
|
||||||
|
@ -158,7 +158,7 @@ static ALWAYS_INLINE unsigned int irq_lock_inline(void)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* irq_unlock_inline - enable all interrupts on the CPU (inline)
|
* @brief Enable all interrupts on the CPU (inline)
|
||||||
*
|
*
|
||||||
* This routine re-enables interrupts on the CPU. The <key> parameter
|
* This routine re-enables interrupts on the CPU. The <key> parameter
|
||||||
* is an architecture-dependent lock-out key that is returned by a previous
|
* is an architecture-dependent lock-out key that is returned by a previous
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue