summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2009-04-28 06:20:35 +0000
committerChris Johns <chrisj@rtems.org>2009-04-28 06:20:35 +0000
commit1c5ebc542167a74791cf5e82845e00b4f8ff6330 (patch)
treee0b839e0a1ef204877767c7d0b9b1f90b1f45a2e /c/src/lib/libbsp/i386/pc386/startup
parent2009-04-28 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-1c5ebc542167a74791cf5e82845e00b4f8ff6330.tar.bz2
2009-04-28 Chris Johns <chrisj@rtems.org>
* Makefile.am: Add bspcmdline.c. * include/bsp.h: Add boot command line interfaces. * start/start.c: Save the multiboot command line. Pass the command line to boot_card. * start/start.S: Update for boot_card command line change. * startup/bspstart.c: Initialise the command line. * startup/bspcmdline.c: New. * console/console.c, ide/idecfg.c: Add boot command line support.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/startup')
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspcmdline.c62
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c3
2 files changed, 65 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspcmdline.c b/c/src/lib/libbsp/i386/pc386/startup/bspcmdline.c
new file mode 100644
index 0000000000..29b3df7a7b
--- /dev/null
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspcmdline.c
@@ -0,0 +1,62 @@
+/*-------------------------------------------------------------------------+
+| 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.
++--------------------------------------------------------------------------+
+| (C) Copyright 2009 RTEMS Project
+| Chris Johns (chrisj@rtems.org)
++--------------------------------------------------------------------------+
+| Disclaimer:
+|
+| This file is provided "AS IS" without warranty of any kind, either
+| expressed or implied.
++--------------------------------------------------------------------------+
+| This code is based on:
+| common sense
+| With the following copyright notice:
+| **************************************************************************
+| * COPYRIGHT (c) 1989-2008.
+| * On-Line Applications Research Corporation (OAR).
+| *
+| * The license and distribution terms for this file may be
+| * found in found in the file LICENSE in this distribution or at
+| * http://www.rtems.com/license/LICENSE.
+| **************************************************************************
+|
+| $Id$
++--------------------------------------------------------------------------*/
+
+#include <bsp.h>
+#include <rtems/pci.h>
+#include <libcpu/cpuModel.h>
+
+/*
+ * External data
+ */
+extern uint32_t _boot_multiboot_flags;
+extern uint32_t _boot_multiboot_memory[2];
+extern const char _boot_multiboot_cmdline[256];
+
+/*-------------------------------------------------------------------------+
+| Function: bsp_cmdline
+| Description: Call when you want the command line.
+| Global Variables: The multiboot values copied from the loader.
+| Arguments: None.
+| Returns: The whole command line.
++--------------------------------------------------------------------------*/
+const char* bsp_cmdline( void )
+{
+ return _boot_multiboot_cmdline;
+}
+
+/*-------------------------------------------------------------------------+
+| Function: bsp_cmdline_arg
+| Description: Call to search for an argument.
+| Global Variables: The multiboot values copied from the loader.
+| Arguments: The option start.
+| Returns: The option if found or nothing.
++--------------------------------------------------------------------------*/
+const char* bsp_cmdline_arg( const char* arg )
+{
+ return strstr (bsp_cmdline (), arg);
+}
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 3d87a1cf7d..cdbdd42fae 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -78,6 +78,9 @@ void bsp_start_default( void )
if (pci_init_retval != PCIB_ERR_SUCCESS) {
printk("PCI bus: could not initialize PCI BIOS interface\n");
}
+
+ bsp_ide_cmdline_init ();
+
} /* bsp_start */
/*