[PATCH] pc386 BSP: initialization of PCI bus

Joel Sherrill <joel@OARcorp.com> joel.sherrill at OARcorp.com
Thu Aug 18 22:24:34 UTC 2005



Karel Gardas wrote:
> 
> Hello,
> 
> IIRC Gregory Melke recommended to initializa PCI bus in bsp_startup 
> function of pc386 BSP early this year. Attach patch tries to implement 
> this. It is tested on two x86 systems one with 3C905C-TX and other with 
> Intel's Ethernet NICs.
> 
> Since till now, initialization of PCI bus was done in appropriate device 
> driver on pc386 BSP, I hope it is right to place its initialization 
> after all needed initializations of IRQ and exceptions management code.


I would assume so as well and this looks safe given your testing.

I have applied this to the CVS trunk.

--joel

> Cheers,
> Karel
> -- 
> Karel Gardas                  kgardas at objectsecurity.com
> ObjectSecurity Ltd.           http://www.objectsecurity.com
> 
> 
> ------------------------------------------------------------------------
> 
> Index: c/src/lib/libbsp/i386/pc386/ChangeLog
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/i386/pc386/ChangeLog,v
> retrieving revision 1.125
> diff -u -r1.125 ChangeLog
> --- c/src/lib/libbsp/i386/pc386/ChangeLog	18 Jul 2005 14:34:41 -0000	1.125
> +++ c/src/lib/libbsp/i386/pc386/ChangeLog	18 Aug 2005 18:51:22 -0000
> @@ -1,3 +1,7 @@
> +2005-08-18  Karel Gardas  <kgardas at objectsecurity.com>
> +
> +	* startup/bspstart.c: Initialize PCI bus in bsp_start function.
> +
>  2005-07-18	Lars Munch <lars at segv.dk>
>  
>  	PR 813/networking
> Index: c/src/lib/libbsp/i386/pc386/startup/bspstart.c
> ===================================================================
> RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/i386/pc386/startup/bspstart.c,v
> retrieving revision 1.33
> diff -u -r1.33 bspstart.c
> --- c/src/lib/libbsp/i386/pc386/startup/bspstart.c	21 May 2004 15:30:30 -0000	1.33
> +++ c/src/lib/libbsp/i386/pc386/startup/bspstart.c	18 Aug 2005 18:51:23 -0000
> @@ -33,6 +33,7 @@
>  #include <bsp.h>
>  #include <rtems/libio.h>
>  #include <rtems/libcsupport.h>
> +#include <rtems/pci.h>
>  #include <libcpu/cpuModel.h>
>  
>  /*-------------------------------------------------------------------------+
> @@ -134,6 +135,7 @@
>  +--------------------------------------------------------------------------*/
>  void bsp_start_default( void )
>  {
> +  int pci_init_retval;
>    void Calibrate_loop_1ms(void);
>  
>    /*
> @@ -173,6 +175,15 @@
>     * Init rtems exceptions management
>     */
>    rtems_exception_init_mngt();
> +
> +  /*
> +   * init PCI Bios interface...
> +   */
> +  pci_init_retval = pci_initialize();
> +  if (pci_init_retval != PCIB_ERR_SUCCESS) {
> +      printk("PCI bus: could not initialize PCI BIOS interface\n");
> +  }
> +
>    /*
>     *  The following information is very useful when debugging.
>     */


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the users mailing list