i386: move idle thread into BSP layer

This commit is contained in:
Gedare Bloom
2016-01-08 12:15:46 -05:00
parent e56266cb3e
commit fd05a055e6
5 changed files with 24 additions and 9 deletions

View File

@@ -148,6 +148,7 @@ include_HEADERS += ../../i386/shared/comm/uart.h
# startup # startup
libbsp_a_SOURCES += ../../shared/bsppredriverhook.c libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
libbsp_a_SOURCES += startup/bspgetworkarea.c libbsp_a_SOURCES += startup/bspgetworkarea.c
libbsp_a_SOURCES += startup/bspidle.S
libbsp_a_SOURCES += startup/bspstart.c libbsp_a_SOURCES += startup/bspstart.c
libbsp_a_SOURCES += startup/bspcmdline.c libbsp_a_SOURCES += startup/bspcmdline.c
libbsp_a_SOURCES += ../../shared/bspclean.c libbsp_a_SOURCES += ../../shared/bspclean.c

View File

@@ -213,6 +213,9 @@ void rtems_irq_mngt_init(void); /* from 'irq_init.c' */
} while ( 0 ) } while ( 0 )
#endif /* edison */ #endif /* edison */
void *bsp_idle_thread( uintptr_t ignored );
#define BSP_IDLE_TASK_BODY bsp_idle_thread
void kbd_reset_setup(char *str, int *ints); /* from 'pc_keyb.c' */ void kbd_reset_setup(char *str, int *ints); /* from 'pc_keyb.c' */
size_t read_aux(char * buffer, size_t count); /* from 'ps2_mouse.c' */ size_t read_aux(char * buffer, size_t count); /* from 'ps2_mouse.c' */

View File

@@ -0,0 +1,19 @@
/*
* Idle Thread Body
*
* COPYRIGHT (c) 2016.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.org/license/LICENSE.
*/
#include <rtems/asm.h>
.p2align 4
PUBLIC(bsp_idle_thread)
SYM(bsp_idle_thread):
hltloop: hlt
jmp hltloop

View File

@@ -120,14 +120,6 @@ uint32_t _CPU_ISR_Get_level( void )
return level; return level;
} }
void *_CPU_Thread_Idle_body( uintptr_t ignored )
{
while(1){
__asm__ volatile ("hlt");
}
return NULL;
}
struct Frame_ { struct Frame_ {
struct Frame_ *up; struct Frame_ *up;
uintptr_t pc; uintptr_t pc;

View File

@@ -117,7 +117,7 @@ extern "C" {
* not provide one. * not provide one.
*/ */
#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE #define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
/* /*
* Define what is required to specify how the network to host conversion * Define what is required to specify how the network to host conversion