1 | /*-------------------------------------------------------------------------+ |
---|
2 | | This file contains the PC386 BSP startup package. It includes application, |
---|
3 | | board, and monitor specific initialization and configuration. The generic CPU |
---|
4 | | dependent initialization has been performed before this routine is invoked. |
---|
5 | +--------------------------------------------------------------------------+ |
---|
6 | | (C) Copyright 2009 RTEMS Project |
---|
7 | | Chris Johns (chrisj@rtems.org) |
---|
8 | +--------------------------------------------------------------------------+ |
---|
9 | | Disclaimer: |
---|
10 | | |
---|
11 | | This file is provided "AS IS" without warranty of any kind, either |
---|
12 | | expressed or implied. |
---|
13 | +--------------------------------------------------------------------------+ |
---|
14 | | This code is based on: |
---|
15 | | common sense |
---|
16 | | With the following copyright notice: |
---|
17 | | ************************************************************************** |
---|
18 | | * COPYRIGHT (c) 1989-2008. |
---|
19 | | * On-Line Applications Research Corporation (OAR). |
---|
20 | | * |
---|
21 | | * The license and distribution terms for this file may be |
---|
22 | | * found in the file LICENSE in this distribution or at |
---|
23 | | * http://www.rtems.org/license/LICENSE. |
---|
24 | | ************************************************************************** |
---|
25 | +--------------------------------------------------------------------------*/ |
---|
26 | |
---|
27 | #include <bsp.h> |
---|
28 | #include <rtems/pci.h> |
---|
29 | #include <libcpu/cpuModel.h> |
---|
30 | |
---|
31 | /* |
---|
32 | * External data |
---|
33 | */ |
---|
34 | extern uint32_t _boot_multiboot_flags; |
---|
35 | extern uint32_t _boot_multiboot_memory[2]; |
---|
36 | extern const char _boot_multiboot_cmdline[256]; |
---|
37 | |
---|
38 | /*-------------------------------------------------------------------------+ |
---|
39 | | Function: bsp_cmdline |
---|
40 | | Description: Call when you want the command line. |
---|
41 | | Global Variables: The multiboot values copied from the loader. |
---|
42 | | Arguments: None. |
---|
43 | | Returns: The whole command line. |
---|
44 | +--------------------------------------------------------------------------*/ |
---|
45 | const char* bsp_cmdline( void ) |
---|
46 | { |
---|
47 | return _boot_multiboot_cmdline; |
---|
48 | } |
---|
49 | |
---|
50 | /*-------------------------------------------------------------------------+ |
---|
51 | | Function: bsp_cmdline_arg |
---|
52 | | Description: Call to search for an argument. |
---|
53 | | Global Variables: The multiboot values copied from the loader. |
---|
54 | | Arguments: The option start. |
---|
55 | | Returns: The option if found or nothing. |
---|
56 | +--------------------------------------------------------------------------*/ |
---|
57 | const char* bsp_cmdline_arg( const char* arg ) |
---|
58 | { |
---|
59 | return strstr (bsp_cmdline (), arg); |
---|
60 | } |
---|