summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-04-21 10:43:04 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-04-21 10:43:04 +0000
commit6128a4aa5e791ed4e0a655bfd346a52d92da7883 (patch)
treeaf53ca3f67ce405b6fbc6c98399c8e0c87e01a9e /c/src/lib/libbsp/i386/pc386/startup
parent2004-04-20 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-6128a4aa5e791ed4e0a655bfd346a52d92da7883.tar.bz2
Remove stray white spaces.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/startup')
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c28
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S48
2 files changed, 38 insertions, 38 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 3535f2b735..56a4e3ad60 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------+
| This file contains the PC386 BSP startup package. It includes application,
| board, and monitor specific initialization and configuration. The generic CPU
-| dependent initialization has been performed before this routine is invoked.
+| dependent initialization has been performed before this routine is invoked.
+--------------------------------------------------------------------------+
| (C) Copyright 1997 -
| - NavIST Group - Real-Time Distributed Systems and Industrial Automation
@@ -40,11 +40,11 @@
| Global Variables
+--------------------------------------------------------------------------*/
extern uint32_t _end; /* End of BSS. Defined in 'linkcmds'. */
-/*
- * Size of heap if it is 0 it will be dynamically defined by memory size,
- * otherwise the value should be changed by binary patch
+/*
+ * Size of heap if it is 0 it will be dynamically defined by memory size,
+ * otherwise the value should be changed by binary patch
*/
-uint32_t _heap_size = 0;
+uint32_t _heap_size = 0;
/* Size of stack used during initialization. Defined in 'start.s'. */
extern uint32_t _stack_size;
@@ -77,20 +77,20 @@ void bsp_postdriver_hook(void);
| since drivers are not yet initialized.
| Global Variables: None.
| Arguments: None.
-| Returns: Nothing.
+| Returns: Nothing.
+--------------------------------------------------------------------------*/
void bsp_pretasking_hook(void)
{
uint32_t topAddr, val;
int i;
-
-
+
+
if (rtemsFreeMemStart & (CPU_ALIGNMENT - 1)) /* not aligned => align it */
rtemsFreeMemStart = (rtemsFreeMemStart+CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
if(_heap_size == 0)
{
- /*
+ /*
* We have to dynamically size memory. Memory size can be anything
* between 2M and 2048M.
* let us first write
@@ -110,12 +110,12 @@ void bsp_pretasking_hook(void)
break;
}
}
-
+
topAddr = (i-1)*1024*1024 - 4;
_heap_size = topAddr - rtemsFreeMemStart;
}
-
+
bsp_libc_init((void *)rtemsFreeMemStart, _heap_size, 0);
rtemsFreeMemStart += _heap_size; /* HEAP_SIZE in KBytes */
@@ -126,19 +126,19 @@ void bsp_pretasking_hook(void)
#endif /* RTEMS_DEBUG */
} /* bsp_pretasking_hook */
-
+
/*-------------------------------------------------------------------------+
| Function: bsp_start
| Description: Called before main is invoked.
| Global Variables: None.
| Arguments: None.
-| Returns: Nothing.
+| Returns: Nothing.
+--------------------------------------------------------------------------*/
void bsp_start_default( void )
{
void Calibrate_loop_1ms(void);
-
+
/*
* Calibrate variable for 1ms-loop (see timer.c)
*/
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 1ca9b1b415..f9279c292b 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -41,7 +41,7 @@
| CODE section
+----------------------------------------------------------------------------*/
EXTERN (rtems_i8259_masks)
-
+
BEGIN_CODE
EXTERN (_establish_stack)
@@ -51,17 +51,17 @@ BEGIN_CODE
/*----------------------------------------------------------------------------+
| pc386_delay
+------------------------------------------------------------------------------
-| Delay is needed after doing I/O.
+| Delay is needed after doing I/O.
|
| The outb version is OK on most machines BUT the loop version ...
-|
+|
| will delay for 1us on 1Gz machine, it will take a little bit
| longer on slower machines, however, it does not matter because we
| are going to call this function only a few times
+----------------------------------------------------------------------------*/
#define DELAY_USE_OUTB
-
+
.p2align 4
.globl _pc386_delay
.globl pc386_delay
@@ -88,10 +88,10 @@ pc386_delay1:
| with apropriate values + reprogram PIC.
| Global Variables: None.
| Arguments: None.
-| Returns: Nothing.
+| Returns: Nothing.
+--------------------------------------------------------------------------*/
.p2align 4
-
+
PUBLIC (_load_segments)
SYM (_load_segments):
@@ -101,7 +101,7 @@ SYM (_load_segments):
/* Load CS, flush prefetched queue */
ljmp $0x8, $next_step
-next_step:
+next_step:
/* Load segment registers */
movw $0x10, ax
movw ax, ss
@@ -125,27 +125,27 @@ next_step:
call SYM(pc386_delay)
outb al, $0xA0 /* and to 8259A-2 */
call SYM(pc386_delay)
-
+
movb $0x20, al /* start of hardware int's (0x20) */
outb al, $0x21
call SYM(pc386_delay)
movb $0x28, al /* start of hardware int's 2 (0x28) */
outb al, $0xA1
call SYM(pc386_delay)
-
+
movb $0x04, al /* 8259-1 is master */
outb al, $0x21
call SYM(pc386_delay)
movb $0x02, al /* 8259-2 is slave */
outb al, $0xA1
call SYM(pc386_delay)
-
+
movb $0x01, al /* 8086 mode for both */
outb al, $0x21
call SYM(pc386_delay)
outb al, $0xA1
call SYM(pc386_delay)
-
+
movb $0xFF, al /* mask off all interrupts for now */
outb al, $0xA1
call SYM(pc386_delay)
@@ -154,7 +154,7 @@ next_step:
call SYM(pc386_delay)
movw $0xFFFB, SYM(i8259s_cache) /* set up same values in cache */
-
+
jmp SYM (_establish_stack) # return to the bsp entry code
/*-------------------------------------------------------------------------+
@@ -162,11 +162,11 @@ next_step:
| Description: Return to board's monitor (we have none so simply restart).
| Global Variables: None.
| Arguments: None.
-| Returns: Nothing.
+| Returns: Nothing.
+--------------------------------------------------------------------------*/
.p2align 4
-
+
PUBLIC (_return_to_monitor)
SYM (_return_to_monitor):
@@ -179,21 +179,21 @@ SYM (_return_to_monitor):
| Description: default interrupt handler
| Global Variables: None.
| Arguments: None.
-| Returns: Nothing.
+| Returns: Nothing.
+--------------------------------------------------------------------------*/
.p2align 4
-
+
/*---------------------------------------------------------------------------+
| GDT itself
+--------------------------------------------------------------------------*/
.p2align 4
-
+
PUBLIC (_Global_descriptor_table)
SYM (_Global_descriptor_table):
/* NULL segment */
- .word 0, 0
+ .word 0, 0
.byte 0, 0, 0, 0
/* code segment */
@@ -203,13 +203,13 @@ SYM (_Global_descriptor_table):
/* data segment */
.word 0xffff, 0
.byte 0, 0x92, 0xcf, 0
-
+
/*---------------------------------------------------------------------------+
| Descriptor of GDT
+--------------------------------------------------------------------------*/
SYM (gdtdesc):
- .word (3*8 - 1)
+ .word (3*8 - 1)
.long SYM (_Global_descriptor_table)
@@ -218,23 +218,23 @@ SYM (gdtdesc):
+---------------------------------------------------------------------------*/
BEGIN_DATA
.p2align 4
-
+
PUBLIC(Interrupt_descriptor_table)
SYM(Interrupt_descriptor_table):
.rept 256
.word 0,0,0,0
.endr
END_DATA
-
+
/*---------------------------------------------------------------------------+
| Descriptor of IDT
+--------------------------------------------------------------------------*/
BEGIN_CODE
.p2align 4
-SYM(idtdesc):
+SYM(idtdesc):
.word (256*8 - 1)
.long SYM (Interrupt_descriptor_table)
-
+
END_CODE
.section .m_hdr