From 1362b7a6d067d26e0409b226947f676016ee7135 Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Tue, 8 Jan 2013 11:39:08 -0600 Subject: score: Doxygen Clean Up Task #4 --- cpukit/score/cpu/sparc64/rtems/asm.h | 21 +++++---- cpukit/score/cpu/sparc64/rtems/score/cpu.h | 64 ++++++++++++++------------ cpukit/score/cpu/sparc64/rtems/score/sparc64.h | 49 +++++++++++--------- cpukit/score/cpu/sparc64/rtems/score/types.h | 10 ++-- 4 files changed, 78 insertions(+), 66 deletions(-) (limited to 'cpukit/score/cpu/sparc64') diff --git a/cpukit/score/cpu/sparc64/rtems/asm.h b/cpukit/score/cpu/sparc64/rtems/asm.h index d670fc6149..f4448b03a5 100644 --- a/cpukit/score/cpu/sparc64/rtems/asm.h +++ b/cpukit/score/cpu/sparc64/rtems/asm.h @@ -1,17 +1,20 @@ /** - * @file rtems/asm.h + * @file * - * This include file attempts to address the problems - * caused by incompatible flavors of assemblers and - * toolsets. It primarily addresses variations in the - * use of leading underscores on symbols and the requirement - * that register names be preceded by a %. + * @brief Address the Problems Caused by Incompatible Flavor of + * Assemblers and Toolsets + * + * This include file attempts to address the problems + * caused by incompatible flavors of assemblers and + * toolsets. It primarily addresses variations in the + * use of leading underscores on symbols and the requirement + * that register names be preceded by a %. + * + * NOTE: The spacing in the use of these macros + * is critical to them working as advertised. */ /* - * NOTE: The spacing in the use of these macros - * is critical to them working as advertised. - * * COPYRIGHT: * * This file is based on similar code found in newlib available diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h index f78400f564..36c7144a19 100644 --- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h +++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h @@ -1,15 +1,19 @@ /** - * @file rtems/score/cpu.h + * @file + * + * @brief SPARC64 CPU Department Source + * + * This include file contains information pertaining to the port of + * the executive to the SPARC64 processor. */ /* - * This include file contains information pertaining to the port of - * the executive to the SPARC64 processor. + * * * COPYRIGHT (c) 1989-2006. * On-Line Applications Research Corporation (OAR). * - * This file is based on the SPARC cpu.h file. Modifications are made + * This file is based on the SPARC cpu.h file. Modifications are made * to support the SPARC64 processor. * COPYRIGHT (c) 2010. Gedare Bloom. * @@ -103,7 +107,7 @@ extern "C" { /* * Does the RTEMS invoke the user's ISR with the vector number and - * a pointer to the saved interrupt frame (1) or just the vector + * a pointer to the saved interrupt frame (1) or just the vector * number (0)? */ @@ -191,10 +195,10 @@ extern "C" { * the minimum requirements of the compiler in order to have as * much of the critical data area as possible in a cache line. * - * The SPARC does not appear to have particularly strict alignment + * The SPARC does not appear to have particularly strict alignment * requirements. This value (16) was chosen to take advantages of caches. * - * SPARC 64 requirements on floating point alignment is at least 8, + * SPARC 64 requirements on floating point alignment is at least 8, * and is 16 if quad-word fp instructions are available (e.g. LDQF). */ @@ -221,7 +225,7 @@ extern "C" { #define CPU_MODES_INTERRUPT_MASK 0x0000000F /* - * This structure represents the organization of the minimum stack frame + * This structure represents the organization of the minimum stack frame * for the SPARC. More framing information is required in certain situaions * such as when there are a large number of out parameters or when the callee * must save floating point registers. @@ -490,7 +494,7 @@ typedef struct { * NOTE: The tstate, tpc, and tnpc are saved in this structure * to allow resetting the TL while still being able to return * from a trap later. The PIL is saved because - * if this is an external interrupt, we will mask lower + * if this is an external interrupt, we will mask lower * priority interrupts until finishing. Even though the y register * is deprecated, gcc still uses it. */ @@ -549,11 +553,11 @@ typedef struct { #define ISF_O7_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x98 #define ISF_TVEC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0xA0 -#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE CPU_MINIMUM_STACK_FRAME_SIZE + 0xA8 +#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE CPU_MINIMUM_STACK_FRAME_SIZE + 0xA8 #ifndef ASM /* * This variable is contains the initialize context for the FP unit. - * It is filled in by _CPU_Initialize and copied into the task's FP + * It is filled in by _CPU_Initialize and copied into the task's FP * context area during _CPU_Context_Initialize. */ @@ -592,9 +596,9 @@ SCORE_EXTERN volatile uint32_t _CPU_ISR_Dispatch_disable; * long jump. The other instructions load one register with the * trap type (a.k.a. vector) and another with the psr. */ -/* For SPARC V9, we must use 6 of these instructions to perform a long - * jump, because the _handler value is now 64-bits. We also need to store - * temporary values in the global register set at this trap level. Because +/* For SPARC V9, we must use 6 of these instructions to perform a long + * jump, because the _handler value is now 64-bits. We also need to store + * temporary values in the global register set at this trap level. Because * the handler runs at TL > 0 with GL > 0, it should be OK to use g2 and g3 * to pass parameters to ISR_Handler. * @@ -614,7 +618,7 @@ typedef struct { uint32_t jmp_to_low_of_handler_plus_g3; /* jmp %g3 + %lo(_handler) */ uint32_t mov_vector_g2; /* mov _vector, %g2 */ } CPU_Trap_table_entry; - + /* * This is the set of opcodes for the instructions loaded into a trap * table entry. The routine which installs a handler is responsible @@ -624,11 +628,11 @@ typedef struct { * The constants following this structure are masks for the fields which * must be filled in when the handler is installed. */ - + extern const CPU_Trap_table_entry _CPU_Trap_slot_template; /* - * The size of the floating point context area. + * The size of the floating point context area. */ #define CPU_CONTEXT_FP_SIZE sizeof( Context_Control_fp ) @@ -666,7 +670,7 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template; * an asynchronous trap. This will avoid the executive changing the return * address. */ -/* On SPARC v9, there are 512 vectors. The same philosophy applies to +/* On SPARC v9, there are 512 vectors. The same philosophy applies to * vector installation and use, we just provide a larger table. */ #define CPU_INTERRUPT_NUMBER_OF_VECTORS 512 @@ -796,14 +800,14 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template; /* * Map interrupt level in task mode onto the hardware that the CPU * actually provides. Currently, interrupt levels which do not - * map onto the CPU in a straight fashion are undefined. + * map onto the CPU in a straight fashion are undefined. */ #define _CPU_ISR_Set_level( _newlevel ) \ sparc_enable_interrupts( _newlevel) uint32_t _CPU_ISR_Get_level( void ); - + /* end of ISR handler macros */ /* Context handler macros */ @@ -839,7 +843,7 @@ void _CPU_Context_Initialize( * On the SPARC, this is setting the frame pointer so GDB is happy. * Make GDB stop unwinding at _Thread_Handler, previous register window * Frame pointer is 0 and calling address must be a function with starting - * with a SAVE instruction. If return address is leaf-function (no SAVE) + * with a SAVE instruction. If return address is leaf-function (no SAVE) * GDB will not look at prev reg window fp. * * _Thread_Handler is known to start with SAVE. @@ -852,7 +856,7 @@ void _CPU_Context_Initialize( /* * This routine is responsible for somehow restarting the currently - * executing task. + * executing task. * * On the SPARC, this is is relatively painless but requires a small * amount of wrapper code before using the regular restore code in @@ -874,7 +878,7 @@ void _CPU_Context_Initialize( * This routine initializes the FP context area passed to it to. * * The SPARC allows us to use the simple initialization model - * in which an "initial" FP context was saved into _CPU_Null_fp_context + * in which an "initial" FP context was saved into _CPU_Null_fp_context * at CPU initialization and it is simply copied into the destination * context. */ @@ -950,7 +954,7 @@ void _CPU_Initialize(void); * This routine installs new_handler to be directly called from the trap * table. */ - + void _CPU_ISR_install_raw_handler( uint32_t vector, proc_ptr new_handler, @@ -970,14 +974,14 @@ void _CPU_ISR_install_vector( ); #if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE) - + /* * _CPU_Thread_Idle_body * * Some SPARC implementations have low power, sleep, or idle modes. This * tries to take advantage of those models. */ - + void *_CPU_Thread_Idle_body( uintptr_t ignored ); #endif /* CPU_PROVIDES_IDLE_THREAD_BODY */ @@ -1036,7 +1040,7 @@ void _CPU_Exception_frame_print( const CPU_Exception_frame *frame ); * It must be static because it is referenced indirectly. * * This version will work on any processor, but if you come across a better - * way for the SPARC PLEASE use it. The most common way to swap a 32-bit + * way for the SPARC PLEASE use it. The most common way to swap a 32-bit * entity as shown below is not any more efficient on the SPARC. * * swap least significant two bytes with 16-bit rotate @@ -1047,18 +1051,18 @@ void _CPU_Exception_frame_print( const CPU_Exception_frame *frame ); * generic code. gcc 2.7.0 only generates about 12 instructions for the * following code at optimization level four (i.e. -O4). */ - + static inline uint32_t CPU_swap_u32( uint32_t value ) { uint32_t byte1, byte2, byte3, byte4, swapped; - + byte4 = (value >> 24) & 0xff; byte3 = (value >> 16) & 0xff; byte2 = (value >> 8) & 0xff; byte1 = value & 0xff; - + swapped = (byte1 << 24) | (byte2 << 16) | (byte3 << 8) | byte4; return( swapped ); } diff --git a/cpukit/score/cpu/sparc64/rtems/score/sparc64.h b/cpukit/score/cpu/sparc64/rtems/score/sparc64.h index b7ac2c5137..b2df9c17a5 100644 --- a/cpukit/score/cpu/sparc64/rtems/score/sparc64.h +++ b/cpukit/score/cpu/sparc64/rtems/score/sparc64.h @@ -1,15 +1,18 @@ /** - * @file rtems/score/sparc64.h + * @file + * + * @brief Information Required to Build RTEMS for a Particular Member + * of the SPARC Family + * + * This include file contains information pertaining to the SPARC + * processor family. */ /* - * This include file contains information pertaining to the SPARC - * processor family. - * * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * - * This file is based on the SPARC sparc.h file. Modifications are made + * This file is based on the SPARC sparc.h file. Modifications are made * to support the SPARC64 processor. * COPYRIGHT (c) 2010. Gedare Bloom. * @@ -34,19 +37,19 @@ extern "C" { * * Currently recognized feature flags: * - * + SPARC_HAS_FPU + * + SPARC_HAS_FPU * 0 - no HW FPU * 1 - has HW FPU (assumed to be compatible w/90C602) * - * + SPARC_HAS_BITSCAN + * + SPARC_HAS_BITSCAN * 0 - does not have scan instructions * 1 - has scan instruction (not currently implemented) - * + * * + SPARC_NUMBER_OF_REGISTER_WINDOWS * 8 is the most common number supported by SPARC implementations. * SPARC_PSR_CWP_MASK is derived from this value. */ - + /* * Some higher end SPARCs have a bitscan instructions. It would * be nice to take advantage of them. Right now, there is no @@ -67,9 +70,9 @@ extern "C" { */ #define SPARC_NUMBER_OF_REGISTER_WINDOWS 8 - + /* - * This should be determined based on some soft float derived + * This should be determined based on some soft float derived * cpp predefine but gcc does not currently give us that information. */ @@ -96,7 +99,7 @@ extern "C" { * Miscellaneous constants */ -/* +/* * The PSR is deprecated and deleted. * * The following registers represent fields of the PSR: @@ -145,7 +148,7 @@ extern "C" { #ifdef ASM -/* +/* * To enable the FPU we need to set both PSTATE.pef and FPRS.fef */ @@ -237,9 +240,9 @@ extern "C" { /* * read the stick register * - * Note: + * Note: * stick asr=24, mnemonic=stick - * Note: stick does not appear to be a valid ASR for US3, although it is + * Note: stick does not appear to be a valid ASR for US3, although it is * implemented in US3i. */ #define sparc64_read_stick( _stick ) \ @@ -249,11 +252,11 @@ extern "C" { } while ( 0 ) /* - * write the stick_cmpr register + * write the stick_cmpr register * - * Note: + * Note: * stick_cmpr asr=25, mnemonic=stick_cmpr - * Note: stick_cmpr does not appear to be a valid ASR for US3, although it is + * Note: stick_cmpr does not appear to be a valid ASR for US3, although it is * implemented in US3i. */ #define sparc64_write_stick_cmpr( _stick_cmpr ) \ @@ -280,7 +283,7 @@ extern "C" { : "0" (_tick_cmpr) ); \ } while ( 0 ) -/* +/* * Clear the softint register. * * sun4u and sun4v: softint_clr asr = 21, with mnemonic clear_softint @@ -296,12 +299,12 @@ extern "C" { /* * Get and set the Y */ - + #define sparc_get_y( _y ) \ do { \ __asm__ volatile( "rd %%y, %0" : "=r" (_y) : "0" (_y) ); \ } while ( 0 ) - + #define sparc_set_y( _y ) \ do { \ __asm__ volatile( "wr %0, %%y" : "=r" (_y) : "0" (_y) ); \ @@ -310,12 +313,12 @@ extern "C" { /************* /DEPRECATED ****************/ /* - * Manipulate the interrupt level in the pstate + * Manipulate the interrupt level in the pstate */ uint32_t sparc_disable_interrupts(void); void sparc_enable_interrupts(uint32_t); - + #define sparc_flash_interrupts( _level ) \ do { \ register uint32_t _ignored = 0; \ diff --git a/cpukit/score/cpu/sparc64/rtems/score/types.h b/cpukit/score/cpu/sparc64/rtems/score/types.h index 3d289a586a..06b7844042 100644 --- a/cpukit/score/cpu/sparc64/rtems/score/types.h +++ b/cpukit/score/cpu/sparc64/rtems/score/types.h @@ -1,11 +1,13 @@ /** - * @file rtems/score/types.h + * @file + * + * @brief SPARC64 CPU Type Definitions + * + * This include file contains type definitions pertaining to the + * SPARC-v9 processor family. */ /* - * This include file contains type definitions pertaining to the - * SPARC-v9 processor family. - * * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * -- cgit v1.2.3