This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RE: IXP2400 Redboot / Ram Monitor / PCI Init... ?


Hello

As such We are able to get RAM monitor working on ENP2611 (IXP2400).
We were using Bootmonitor provided with their SDK3.0
Now, we are able to run Redboot[Ram] from Redboot[RomRam] and then we are able
to run Linux. At end, it turned out to be easy, hope same for future
modifications we plan to try. At end of this email, I've written
the modifications we did.

But still I wonder on following issues, if someone could 
guide us why non-existent devices PCI query stucks in RAM monitor and
not for ROM monitor,
that shall be very helpful to overcome any non-obvious mistake.

Main Problem faced was PCI portion of code.
1.   As RAM Monitor, __pci_abort_handler hooked in pci_config_setup is
not invoked,
     when non-existent PCI devices are queried.
     It returns paddr, and when
cyg_pci_find_next/cyg_hal_pci_read_word deference it
     to read config space field at particular offset, there it stucks.

2.   For ENP2611, after pci bus configuration [ixdp2400_pci.c],
     I dunno why author did not excluded logic to find SLAVE.
     RAM monitor stucks here again while pci find dev(=6),
     though we see redboot prompt but system hangs.
     (Refer Modification "5" below) 


Modifications:
1.   Update CDL file, to have RAM as legal value.
2.   Modify ECM to say START type is RAM and avoid both ROM_MONITOR or
USE_ROM_MONITOR
3.   Copy *RomRam.ldi file to *Ram.ldi file and make following
     changes:
      Memory
      {
	ram: ORIGIN = 0x00000000, LENGTH = 0x20000000
      }
      SECTIONS
      {
          ...
          /* RomRam version shows start of DRAM available (in our case
0x00200000) */
          SECTION_rom_vectors (ram, 0x00200000, LMA_EQ_VMA) 
          SECTION_text (ram, 0x00202000, LMA_EQ_VMA)
          SECTION_data (ram, 0x00240000, LMA_EQ_VMA)
          ...
      }
4.   Implement HAL_PCI_IGNORE_DEVICE, we allowed to query
     only existent pci devices (refer ENP2611 manual)
5.   Relocate ENP2611 macro to exclude query for master processor
     file: ixdp2400_pci.c
    [snip]... 
#ifdef ENP2611
            // prepare dev_id so that we skip slave
			master_dev_id = CYG_PCI_DEV_MAKE_ID(0, CYG_PCI_DEV_MAKE_DEVFN(6, 0));
	
			printf("Master Device ID %p\n",master_dev_id);		
		
			cyg_pci_find_device(IXP2400_VENDOR_ID, IXP2400_DEVICE_ID, &master_dev_id);

			printf("\nCYG PCI FIND IXP2400 SUCCESFULLY COMPLETED\n");
	
/* #ifdef ENP2611 */
			slave_found = 0;
#else
     [snip]...

=======================================

--
Nalin Gupta
Apropos Infotech Pvt. Ltd. (www.apropos.co.in)
Bangalore, India

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]