forked from Imagelibrary/rtems
Patch from Aleksey <qqi@world.std.com>:
It fixes netboot build problem, KA9Q configuration
for pc386, some compiler wardning, it also removed some stuff
ifdef'ed with '#if 0'.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include <rtems/libio.h>
|
||||
#include <termios.h>
|
||||
#include <pc386uart.h>
|
||||
#include <libcpu/cpuModel.h>
|
||||
|
||||
int PC386ConsolePort = PC386_CONSOLE_PORT_CONSOLE;
|
||||
|
||||
@@ -61,8 +62,8 @@ static rtems_irq_connect_data console_isr_data = {PC_386_KEYBOARD,
|
||||
|
||||
|
||||
extern rtems_boolean _IBMPC_scankey(char *); /* defined in 'inch.c' */
|
||||
extern BSP_polling_getchar_function_type BSP_wait_polled_input();
|
||||
extern void _IBMPC_initVideo();
|
||||
extern char BSP_wait_polled_input(void);
|
||||
extern void _IBMPC_initVideo(void);
|
||||
|
||||
void console_reserve_resources(rtems_configuration_table *conf)
|
||||
{
|
||||
@@ -169,9 +170,9 @@ console_initialize(rtems_device_major_number major,
|
||||
{
|
||||
|
||||
/* Install keyboard interrupt handler */
|
||||
status = pc386_install_rtems_irq_handler(&console_isr_data);
|
||||
status = pc386_install_rtems_irq_handler(&console_isr_data);
|
||||
|
||||
if (!status)
|
||||
if (!status)
|
||||
{
|
||||
printk("Error installing keyboard interrupt handler!\n");
|
||||
rtems_fatal_error_occurred(status);
|
||||
@@ -481,8 +482,11 @@ conSetAttr(int minor, const struct termios *t)
|
||||
* BSP initialization
|
||||
*/
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = (BSP_output_char_function_type) _IBMPC_outch;
|
||||
BSP_polling_getchar_function_type BSP_poll_char = BSP_wait_polled_input;
|
||||
BSP_output_char_function_type BSP_output_char =
|
||||
(BSP_output_char_function_type) _IBMPC_outch;
|
||||
|
||||
BSP_polling_getchar_function_type BSP_poll_char = BSP_wait_polled_input;
|
||||
|
||||
void BSP_emergency_output_init()
|
||||
{
|
||||
_IBMPC_initVideo();
|
||||
|
||||
@@ -511,7 +511,7 @@ rtems_ka9q_driver_attach (int argc, char *argv[], void *p)
|
||||
sscanf(argv[++argIndex], "%x", &(dp->port));
|
||||
}
|
||||
else if (strcmp ("bpar", argv[argIndex]) == 0) {
|
||||
sscanf(argv[++argIndex], "%x", (unsigned) &(dp->bpar));
|
||||
sscanf(argv[++argIndex], "%x", (unsigned *) &(dp->bpar));
|
||||
dp->base = (unsigned char *)(dp->bpar);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -64,7 +64,6 @@ ${ARCH}/start16.o: start16.s
|
||||
$(AS) $(ASFLAGS) -o $@ $*.i
|
||||
|
||||
${ARCH}/start16.bin: ${ARCH}/start16.o
|
||||
- $(LD) -N -T $(LINKCMDS) -Ttext $(START16ADDR) -e start16 -nostdlib \
|
||||
$(LD) -N -T $(LINKCMDS) -Ttext $(START16ADDR) -e start16 -nostdlib \
|
||||
--oformat=elf32-i386 -o $(basename $@).obj $(basename $@).o
|
||||
- $(OBJCOPY) -O binary $(basename $@).obj $@
|
||||
cp $(basename $@).o $(basename $@).bin
|
||||
$(OBJCOPY) -O binary $(basename $@).obj $@
|
||||
|
||||
@@ -106,7 +106,7 @@ speakl: jmp speakl # and SPIN!!!
|
||||
call printk
|
||||
addl $4, esp
|
||||
|
||||
call debugPollingGetChar
|
||||
/* call debugPollingGetChar */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -55,9 +55,8 @@ volatile rtems_unsigned32 Ttimer_val;
|
||||
/*-------------------------------------------------------------------------+
|
||||
| External Prototypes
|
||||
+--------------------------------------------------------------------------*/
|
||||
extern void timerisr();
|
||||
extern void timerisr(void);
|
||||
/* timer (int 08h) Interrupt Service Routine (defined in 'timerisr.s') */
|
||||
extern int clockIsOn(const rtems_irq_connect_data*);
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Pentium optimized timer handling.
|
||||
@@ -155,7 +154,7 @@ Read_timer(void)
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
static void
|
||||
timerOff(const rtems_raw_irq_connect_data* used)
|
||||
{
|
||||
/*
|
||||
@@ -169,7 +168,8 @@ timerOff(const rtems_raw_irq_connect_data* used)
|
||||
} /* Timer_exit */
|
||||
|
||||
|
||||
void timerOn(const rtems_raw_irq_connect_data* used)
|
||||
static void
|
||||
timerOn(const rtems_raw_irq_connect_data* used)
|
||||
{
|
||||
/* load timer for US_PER_ISR microsecond period */
|
||||
outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN);
|
||||
@@ -181,12 +181,17 @@ void timerOn(const rtems_raw_irq_connect_data* used)
|
||||
pc386_irq_enable_at_i8259s(used->idtIndex - PC386_IRQ_VECTOR_BASE);
|
||||
}
|
||||
|
||||
static int
|
||||
timerIsOn(const rtems_raw_irq_connect_data *used)
|
||||
{
|
||||
return pc386_irq_enabled_at_i8259s(used->idtIndex - PC386_IRQ_VECTOR_BASE);}
|
||||
|
||||
static rtems_raw_irq_connect_data timer_raw_irq_data = {
|
||||
PC_386_PERIODIC_TIMER + PC386_IRQ_VECTOR_BASE,
|
||||
timerisr,
|
||||
timerOn,
|
||||
timerOff,
|
||||
clockIsOn
|
||||
timerIsOn
|
||||
};
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
|
||||
@@ -8,7 +8,11 @@ VPATH = @srcdir@
|
||||
RTEMS_ROOT = @top_srcdir@
|
||||
PROJECT_ROOT = @PROJECT_ROOT@
|
||||
|
||||
BSP_PIECES=startup clock console timer pc386dev network
|
||||
# We only build the Network library if HAS_KA9Q was defined
|
||||
NETWORK_yes_V = network
|
||||
NETWORK = $(NETWORK_$(HAS_KA9Q)_V)
|
||||
|
||||
BSP_PIECES=startup clock console timer pc386dev $(NETWORK)
|
||||
GENERIC_PIECES=
|
||||
|
||||
# bummer; have to use $foreach since % pattern subst rules only replace 1x
|
||||
@@ -52,3 +56,4 @@ all: ${ARCH} $(SRCS) $(LIB)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@
|
||||
* functionnality described after the next command.
|
||||
*/
|
||||
typedef void (*BSP_output_char_function_type) (char c);
|
||||
typedef char (*BSP_polling_getchar_function_type) (char c);
|
||||
typedef char (*BSP_polling_getchar_function_type) (void);
|
||||
|
||||
extern BSP_output_char_function_type BSP_output_char;
|
||||
extern BSP_polling_getchar_function_type BSP_poll_char;
|
||||
extern void BSP_emergency_output_init();
|
||||
extern void BSP_emergency_output_init(void);
|
||||
/*
|
||||
* All the function declared as extern after this comment
|
||||
* are available for each ix86 BSP by compiling and linking
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
|
||||
|
||||
/*PAGE
|
||||
* void _new_ISR_Displatch()
|
||||
* void _New_ISR_Displatch()
|
||||
*
|
||||
* Entry point from the outermost interrupt service routine exit.
|
||||
* The current stack is the supervisor mode stack.
|
||||
*/
|
||||
|
||||
PUBLIC (_new_ISR_Displatch)
|
||||
PUBLIC (_New_ISR_Displatch)
|
||||
SYM (_New_ISR_Displatch):
|
||||
|
||||
call SYM (_Thread_Dispatch) # invoke Dispatcher
|
||||
|
||||
Reference in New Issue
Block a user