summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-05 15:15:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-05 15:15:46 +0000
commitab0df696d09f6b53b33345d207f8aead63a6fcab (patch)
treee446f792382e49b1169482837cd842a82fb2350b /c/src/lib/libbsp/i386/pc386
parentFixed name of Buffer so this would compile. (diff)
downloadrtems-ab0df696d09f6b53b33345d207f8aead63a6fcab.tar.bz2
Automatic CPU type detection code from Eric Valette <valette@crf.canon.fr>.
Enabled on the pc386.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386')
-rw-r--r--c/src/lib/libbsp/i386/pc386/console/console.c6
-rw-r--r--c/src/lib/libbsp/i386/pc386/start/start.s13
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c6
3 files changed, 14 insertions, 11 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/console/console.c b/c/src/lib/libbsp/i386/pc386/console/console.c
index c8d9a2c4f4..fb711ef578 100644
--- a/c/src/lib/libbsp/i386/pc386/console/console.c
+++ b/c/src/lib/libbsp/i386/pc386/console/console.c
@@ -232,7 +232,11 @@ console_initialize(rtems_device_major_number major,
printk("Initialized console on port COM2 9600-8-N-1\n\n");
}
}
-
+#define DISPLAY_CPU_INFO
+#ifdef DISPLAY_CPU_INFO
+ printCpuInfo();
+#endif
+
return RTEMS_SUCCESSFUL;
} /* console_initialize */
diff --git a/c/src/lib/libbsp/i386/pc386/start/start.s b/c/src/lib/libbsp/i386/pc386/start/start.s
index 36fad8153c..5ff92f3134 100644
--- a/c/src/lib/libbsp/i386/pc386/start/start.s
+++ b/c/src/lib/libbsp/i386/pc386/start/start.s
@@ -64,6 +64,8 @@ BEGIN_CODE
EXTERN (_return_to_monitor)
EXTERN (_IBMPC_initVideo)
EXTERN (debugPollingGetChar)
+ EXTERN (checkCPUtypeSetCr0)
+
/*
* In case this crashes on your machine and this is not due
@@ -87,8 +89,8 @@ speakl: jmp speakl # and SPIN!!!
nop
cli # DISABLE INTERRUPTS!!!
-#ifdef DEBUG_EARLY_START
cld
+#ifdef DEBUG_EARLY_START
/*
* Must get video attribute to have a working printk.
* Note that the following code assume we already have
@@ -149,14 +151,9 @@ SYM (zero_bss):
stosl # clear a long in the bss
/*---------------------------------------------------------------------+
-| Initialize the i387.
-|
-| Using the NO WAIT form of the instruction insures that if it is not
-| present the board will not lock up or get an exception.
+| Check CPU type. Enable Cache and init coprocessor if needed.
+---------------------------------------------------------------------*/
-
- fninit # MUST USE NO-WAIT FORM
-
+ call checkCPUtypeSetCr0
/*---------------------------------------------------------------------+
| Transfer control to User's Board Support Package
+---------------------------------------------------------------------*/
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 744808b3be..24303b36a7 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -37,7 +37,8 @@
#include <bsp.h>
#include <libcsupport.h>
#include <rtems/libio.h>
-
+#include <libcpu/cpuModel.h>
+
/*-------------------------------------------------------------------------+
| Global Variables
+--------------------------------------------------------------------------*/
@@ -58,6 +59,7 @@ extern rtems_configuration_table Configuration;
rtems_cpu_table Cpu_table; /* CPU configuration table. */
char *rtems_progname; /* Program name - from main(). */
+extern void debugPollingGetChar();
/*-------------------------------------------------------------------------+
| External Prototypes
@@ -130,7 +132,7 @@ void bsp_start( void )
console_reserve_resources(&BSP_Configuration);
/*
- * Init trems_interrupt_management
+ * Init rtems_interrupt_management
*/
rtems_irq_mngt_init();