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: flash_query throws an exception (Redboot_ROM version)


Hi all,

Back to my flash_query problem..

As I said earlier, I downloaded the latest cvs sources and built them successfully. I've included the intel npe packages which have pulled in the strata flash code - I have 16MBytes of strata flash STRATAX16 on my board. Incidentally, I build the image download it to flash and then start executing.

Earlier when I said that I'd built the exact identical sources, I was not completely accurate When I started executing I noticed I was choking whenever I had the dcache enabled: so I disabled the dcache enabling in two places

a) /usr/src/ecos/packages/hal/arm/xscale/ixdp425/current/include/hal_platform_setup.h -> 4 lines of assembly

DISPLAY 0x1007, r7, r8

       // enable D cache
       //mrc     p15, 0, r0, c1, c0, 0
       //orr     r0, r0, #MMU_Control_C
       //mcr     p15, 0, r0, c1, c0, 0
       //CPWAIT  r0

DISPLAY 0x1008, r7, r8

b) /usr/src/ecos/packages/hal/arm/xscale/ixp425/current/src/ixp425_misc.c: function hal_hardware_init()
void
hal_hardware_init(void)
{
hal_xscale_core_init();


   // all interrupt sources to IRQ and disabled
   *IXP425_INTR_SEL = 0;
   *IXP425_INTR_EN = 0;

   // Enable caches
   //HAL_DCACHE_ENABLE();
   HAL_ICACHE_ENABLE();

   // Let the timer run at a default rate (for delays)
   hal_clock_initialize(CYGNUM_HAL_RTC_PERIOD);

   // Set up eCos/ROM interfaces
   hal_if_init();

   // Perform any platform specific initializations
   plf_hardware_init();

#ifdef CYGPKG_IO_PCI
   cyg_hal_plf_pci_init();
#endif
}

Without these lines and just the vanilla version of the ixdp425 redboot rom template, I have a fully functioning redboot - I get a command prompt and everything. I figured that the only thing that would be affected is the fact that I would have a slower running board - no data cacheing support. I figured I would take care of this later. (I guess later is now)

Q1: Any ideas why this might be happening? I throw an exception everytime it attempts to execute instructions that enable the data cache

When I include the npe's and include the strata flash, to query the flash configuration, I noticed that the io/flash code disables data caching if it was turned on before it probes the flash. I figured that since the HAL_FLASH macros are used to turn off the dcache if its on and to reenable them only if they were originally on, I was okay - I'd disabled the data cache and so the HAL_FLASH routines in /usr/src/ecos/packages/io/flash/current/src/flash.c would be pretty much nops (possibly incorrect assumption :-))

Q2: In the remote event, I was correct, any ideas why I choke at the exact same place as before flash_query: third instruction...

Thanks a lot!

Krishna


-------------------------------------------------
----- Original Message ----- From: "Mark Salter" <msalter@redhat.com>
To: "Krishna Ganugapati" <krishnag@marakicorp.com>
Cc: <ecos-discuss@sources.redhat.com>
Sent: Monday, September 20, 2004 10:16 AM
Subject: Re: [ECOS] flash_query throws an exception (Redboot_ROM version)



On Mon, 2004-09-20 at 12:33, Krishna Ganugapati wrote:
Hello Andrew.

Thanks for the response.

Yes 0x50000000 is the beginning of the FLASH - through gdb and through
BDI2000's telnet client, I can dump the flash at 0x50000000 and view the
contents.


This sounds like a bus configuration problem. I take it that this is a custom board. Is the EXP_WR_EN bit turned on for the CS0 config register?

--Mark



--
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]