source: rtems/c/src/lib/libbsp/i386/pc386/startup/bspstart.c @ 93546b8

4.115
Last change on this file since 93546b8 was 93546b8, checked in by Joel Sherrill <joel.sherrill@…>, on 12/11/14 at 21:16:34

pc386: Add BSP_ENABLE_IDE BSP option

This allows the IDE support to be completely disabled. It is needed to
prevent hangs on some hardware. In particular, the Intel Edison where
it is not present.

  • Property mode set to 100644
File size: 2.8 KB
RevLine 
[7150f00f]1/*-------------------------------------------------------------------------+
2| This file contains the PC386 BSP startup package. It includes application,
3| board, and monitor specific initialization and configuration. The generic CPU
[6128a4a]4| dependent initialization has been performed before this routine is invoked.
[7150f00f]5+--------------------------------------------------------------------------+
6| (C) Copyright 1997 -
7| - NavIST Group - Real-Time Distributed Systems and Industrial Automation
8|
9| http://pandora.ist.utl.pt
10|
11| Instituto Superior Tecnico * Lisboa * PORTUGAL
12+--------------------------------------------------------------------------+
13| Disclaimer:
14|
15| This file is provided "AS IS" without warranty of any kind, either
16| expressed or implied.
17+--------------------------------------------------------------------------+
18| This code is based on:
19|   bspstart.c,v 1.8 1996/05/28 13:12:40 joel Exp - go32 BSP
20| With the following copyright notice:
21| **************************************************************************
[ef37cb6]22| *  COPYRIGHT (c) 1989-2008.
[6f9c75c3]23| *  On-Line Applications Research Corporation (OAR).
24| *
25| *  The license and distribution terms for this file may be
[ba64905]26| *  found in the file LICENSE in this distribution or at
[c499856]27| *  http://www.rtems.org/license/LICENSE.
[7150f00f]28| **************************************************************************
29+--------------------------------------------------------------------------*/
30
31#include <bsp.h>
[8a7ed82]32#include <bsp/irq.h>
[71319f77]33#include <rtems/pci.h>
[ab0df696]34#include <libcpu/cpuModel.h>
35
[6128a4a]36/*
[ef37cb6]37 *  External routines
[662c157]38 */
[8a7ed82]39void Clock_driver_install_handler(void);
[e3a1d425]40
[7150f00f]41/*-------------------------------------------------------------------------+
[e2a2ec60]42|         Function: bsp_start
43|      Description: Called before main is invoked.
[7150f00f]44| Global Variables: None.
45|        Arguments: None.
[6128a4a]46|          Returns: Nothing.
[7150f00f]47+--------------------------------------------------------------------------*/
[3785ed6c]48static void bsp_start_default( void )
[7150f00f]49{
[71319f77]50  int pci_init_retval;
[6128a4a]51
[ef37cb6]52  /*
53   *  We need to determine how much memory there is in the system.
54   */
55  bsp_size_memory();
56
[eff217e]57  /*
58   * Calibrate variable for 1ms-loop (see timer.c)
59   */
60  Calibrate_loop_1ms();
[8a496e46]61
[67a2288]62  /*
[eb562f2]63   * Init rtems interrupt management
[67a2288]64   */
65  rtems_irq_mngt_init();
[45550867]66
[eb562f2]67  /*
68   * Init rtems exceptions management
69   */
70  rtems_exception_init_mngt();
[71319f77]71
72  /*
73   * init PCI Bios interface...
74   */
75  pci_init_retval = pci_initialize();
76  if (pci_init_retval != PCIB_ERR_SUCCESS) {
77      printk("PCI bus: could not initialize PCI BIOS interface\n");
78  }
[1c5ebc5]79
[8a7ed82]80  Clock_driver_install_handler();
81
[93546b8]82#if BSP_ENABLE_IDE
[45550867]83  bsp_ide_cmdline_init();
[93546b8]84#endif
[1c5ebc5]85
[3785ed6c]86} /* bsp_start_default */
[45544f0]87
88/*
89 *  By making this a weak alias for bsp_start_default, a brave soul
90 *  can override the actual bsp_start routine used.
91 */
92void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default")));
Note: See TracBrowser for help on using the repository browser.