* RE: Porting RedBoot to a 64MB GRG based board
@ 2005-01-26 15:12 Daly, Jeffrey
0 siblings, 0 replies; 4+ messages in thread
From: Daly, Jeffrey @ 2005-01-26 15:12 UTC (permalink / raw)
To: ecos-devel
Hal_platform_extras.h will have some memory maps that you'll need to
update.
>-----Original Message-----
>From: ecos-devel-owner@sources.redhat.com
>[mailto:ecos-devel-owner@sources.redhat.com] On Behalf Of Dan Searle
>Sent: Wednesday, January 26, 2005 10:11 AM
>To: ecos-devel@sources.redhat.com
>Subject: Porting RedBoot to a 64MB GRG based board
>
>Hi,
>
>I have a development board based on the GRG (ADI Coyote) reference
>design. The only real difference is that my board has 64MB of SDRAM
>instead of the standard 32 for GRG boards. The RAM is a 2 chip setup
>with 256Mbit chips instead of 128Mbit.
>
>I have managed to recompile the RedBoot 1.94 sources using the
>following sequence of commands...
>
>cd /home/admin/redboot/redboot-intel-xscale-040330
>export TOPDIR=`pwd`
>export ECOS_REPOSITORY=${TOPDIR}/packages
>export VERSION=current
>mkdir ${TOPDIR}/build
>cd ${TOPDIR}/build
>../packages/ecosadmin.tcl add ../npe-1.4.epk
>cp ../IxNpeMicrocode.c
>${ECOS_REPOSITORY}/devs/eth/intel/npe/v1_4/src/npeDl
>ecosconfig new grg redboot
>ecosconfig import
>${ECOS_REPOSITORY}/hal/arm/xscale/grg/${VERSION}/misc/redboot_ROM.ecm
>ecosconfig remove i82559_eth_driver
>ecosconfig remove devs_eth_arm_grg_i82559
>ecosconfig add intel_npe
>ecosconfig add grg_npe
>ecosconfig tree
>perl -pi.bak -e 's/xscale-elf-/arm-linux-/g' `find -name makefile`
>perl -pi.bak -e 's/CFLAGS :=/CFLAGS := -D__ECOS=1 -U__linux/g'
>`find -name makefile`
>make
>
>I got errors as some #ifdefs are broken, so I had to edit the
>IxOsServices.c file and fix the #ifdefs to make sure it uses the
>__ECOS code fragment for the MutexTryLock function.
>
>Anyway, it now builds and runs from the Flash chip on my board
>perfectly, except that it only recognises the first 32MB of RAM.
>
>I realised that the SDRAM controller would need configuring
>differently so edited the files:
>
>build/install/include/cyg/hal/grg.h:
> #define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
> SDRAM_CONFIG_2x8Mx16)
>now reads:
> #define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
> SDRAM_CONFIG_2x16Mx16)
>
>I also changed the source file in the packages directory to avoid a
>"ecosconfig tree" from reverting my changes.
>
>I then saw that there were various references to: 0x02000000 through
>the source code realating to RAM size. I have changed all of these
>(not all references to 0x02000000, just the ones to do with RAM size).
>
>Now when I do a:
>
>make clean
>make
>
>Then re-flash my board using a JTAG and boot RedBoot, it crashes:
>
>+$T0a0f:5001790c;0d:00012b64;#81
>
>Some GDB gibberish which I can't make sence of.
>
>What am I doing wrong? Can anyone point out the proper way to
>re-configure RedBoot to use 64MB of RAM rather than 32?
>
>Would it be sufficient to just reconfigure the SDRAM init register and
>pass exec -c"mem=64M@0x0" to the kernel?
>
>Regards, Dan...
>
>--
>
>Dan Searle
>Adelix Ltd
>dan.searle@adelix.com web: www.adelix.com
>tel: 0845 230 9590 / fax: 0845 230 9591 / support: 0845 230 9592
>snail: The Old Post Office, Bristol Rd, Hambrook, Bristol BS16 1RY. UK.
>
>Any views expressed in this email communication are those
>of the individual sender, except where the sender specifically states
>them to be the views of a member of Adelix Ltd. Adelix Ltd. does not
>represent, warrant or guarantee that the integrity of this
>communication
>has been maintained nor that the communication is free of errors or
>interference.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Porting RedBoot to a 64MB GRG based board
[not found] ` <447674893.20050126160459@adelix.com>
@ 2005-01-26 16:14 ` Mark Salter
0 siblings, 0 replies; 4+ messages in thread
From: Mark Salter @ 2005-01-26 16:14 UTC (permalink / raw)
To: Dan Searle; +Cc: ecos-devel
On Wed, 2005-01-26 at 16:04 +0000, Dan Searle wrote:
> Hi,
>
> [snip]
>
> Wednesday, January 26, 2005, 3:41:35 PM, you wrote:
>
> >>
> >> Would it be sufficient to just reconfigure the SDRAM init register and
> >> pass exec -c"mem=64M@0x0" to the kernel?
>
> > Probably.
>
> I tried this first, as it seemed simpler if it worked, i.e. I don't
> exactly need 64Meg for RedBoot time 32 will do. This is as as long as
> the SDRAM controller is configured correctly and the MMU is setup
> correctly. Shouldn't the Linux kernel override the MMU settings that
> RedBoot sets up?
If you use 'exec' to start the kernel, then the mmu is off before
the kernel/decompressor takes control.
>
> Anyway, it's not working, I've got RedBoot setting the SDRAM
> controller config reg. correctly, and passed mem=64M@0x0 to the
> kernel, but when I try to allocate all the pages I only manage 7000
> odd, or about 30Megs worth.
RedBoot passes an ATAG_MEM option to the kernel and that is based
on CYGMEM_REGION_ram_SIZE which is defined in the grg include/pkgconf
dir. Not sure if the mem= on command line overrides that (I think
it should, though).
--Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Porting RedBoot to a 64MB GRG based board
2005-01-26 15:09 Dan Searle
@ 2005-01-26 15:41 ` Mark Salter
[not found] ` <447674893.20050126160459@adelix.com>
0 siblings, 1 reply; 4+ messages in thread
From: Mark Salter @ 2005-01-26 15:41 UTC (permalink / raw)
To: Dan Searle; +Cc: ecos-devel
On Wed, 2005-01-26 at 15:11 +0000, Dan Searle wrote:
> Hi,
>
> I have a development board based on the GRG (ADI Coyote) reference
> design. The only real difference is that my board has 64MB of SDRAM
> instead of the standard 32 for GRG boards. The RAM is a 2 chip setup
> with 256Mbit chips instead of 128Mbit.
>
> I have managed to recompile the RedBoot 1.94 sources using the
> following sequence of commands...
>
> cd /home/admin/redboot/redboot-intel-xscale-040330
> export TOPDIR=`pwd`
> export ECOS_REPOSITORY=${TOPDIR}/packages
> export VERSION=current
> mkdir ${TOPDIR}/build
> cd ${TOPDIR}/build
> ../packages/ecosadmin.tcl add ../npe-1.4.epk
> cp ../IxNpeMicrocode.c ${ECOS_REPOSITORY}/devs/eth/intel/npe/v1_4/src/npeDl
> ecosconfig new grg redboot
> ecosconfig import ${ECOS_REPOSITORY}/hal/arm/xscale/grg/${VERSION}/misc/redboot_ROM.ecm
> ecosconfig remove i82559_eth_driver
> ecosconfig remove devs_eth_arm_grg_i82559
> ecosconfig add intel_npe
> ecosconfig add grg_npe
> ecosconfig tree
> perl -pi.bak -e 's/xscale-elf-/arm-linux-/g' `find -name makefile`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You really should use an arm-elf or xscale-elf toolchain.
> perl -pi.bak -e 's/CFLAGS :=/CFLAGS := -D__ECOS=1 -U__linux/g' `find -name makefile`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This shouldn't be necessary (probably due to using linux toolchain
> make
>
> I got errors as some #ifdefs are broken, so I had to edit the
> IxOsServices.c file and fix the #ifdefs to make sure it uses the
> __ECOS code fragment for the MutexTryLock function.
Again, this should not be neccessary.
>
> Anyway, it now builds and runs from the Flash chip on my board
> perfectly, except that it only recognises the first 32MB of RAM.
>
> I realised that the SDRAM controller would need configuring
> differently so edited the files:
>
> build/install/include/cyg/hal/grg.h:
> #define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
> SDRAM_CONFIG_2x8Mx16)
> now reads:
> #define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
> SDRAM_CONFIG_2x16Mx16)
>
> I also changed the source file in the packages directory to avoid a
> "ecosconfig tree" from reverting my changes.
>
> I then saw that there were various references to: 0x02000000 through
> the source code realating to RAM size. I have changed all of these
> (not all references to 0x02000000, just the ones to do with RAM size).
>
Did you change the SDRAM_SIZE macro?
And the ram size references in the grg/current/include/pkgconf dir?
> Now when I do a:
>
> make clean
> make
>
> Then re-flash my board using a JTAG and boot RedBoot, it crashes:
>
> +$T0a0f:5001790c;0d:00012b64;#81
>
> Some GDB gibberish which I can't make sence of.
>
> What am I doing wrong? Can anyone point out the proper way to
> re-configure RedBoot to use 64MB of RAM rather than 32?
Probably a pagetable issue. See hal_platform_extras.h
>
> Would it be sufficient to just reconfigure the SDRAM init register and
> pass exec -c"mem=64M@0x0" to the kernel?
Probably.
--Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Porting RedBoot to a 64MB GRG based board
@ 2005-01-26 15:09 Dan Searle
2005-01-26 15:41 ` Mark Salter
0 siblings, 1 reply; 4+ messages in thread
From: Dan Searle @ 2005-01-26 15:09 UTC (permalink / raw)
To: ecos-devel
Hi,
I have a development board based on the GRG (ADI Coyote) reference
design. The only real difference is that my board has 64MB of SDRAM
instead of the standard 32 for GRG boards. The RAM is a 2 chip setup
with 256Mbit chips instead of 128Mbit.
I have managed to recompile the RedBoot 1.94 sources using the
following sequence of commands...
cd /home/admin/redboot/redboot-intel-xscale-040330
export TOPDIR=`pwd`
export ECOS_REPOSITORY=${TOPDIR}/packages
export VERSION=current
mkdir ${TOPDIR}/build
cd ${TOPDIR}/build
../packages/ecosadmin.tcl add ../npe-1.4.epk
cp ../IxNpeMicrocode.c ${ECOS_REPOSITORY}/devs/eth/intel/npe/v1_4/src/npeDl
ecosconfig new grg redboot
ecosconfig import ${ECOS_REPOSITORY}/hal/arm/xscale/grg/${VERSION}/misc/redboot_ROM.ecm
ecosconfig remove i82559_eth_driver
ecosconfig remove devs_eth_arm_grg_i82559
ecosconfig add intel_npe
ecosconfig add grg_npe
ecosconfig tree
perl -pi.bak -e 's/xscale-elf-/arm-linux-/g' `find -name makefile`
perl -pi.bak -e 's/CFLAGS :=/CFLAGS := -D__ECOS=1 -U__linux/g' `find -name makefile`
make
I got errors as some #ifdefs are broken, so I had to edit the
IxOsServices.c file and fix the #ifdefs to make sure it uses the
__ECOS code fragment for the MutexTryLock function.
Anyway, it now builds and runs from the Flash chip on my board
perfectly, except that it only recognises the first 32MB of RAM.
I realised that the SDRAM controller would need configuring
differently so edited the files:
build/install/include/cyg/hal/grg.h:
#define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
SDRAM_CONFIG_2x8Mx16)
now reads:
#define IXP425_SDRAM_CONFIG_INIT (SDRAM_CONFIG_CAS_3 |
SDRAM_CONFIG_2x16Mx16)
I also changed the source file in the packages directory to avoid a
"ecosconfig tree" from reverting my changes.
I then saw that there were various references to: 0x02000000 through
the source code realating to RAM size. I have changed all of these
(not all references to 0x02000000, just the ones to do with RAM size).
Now when I do a:
make clean
make
Then re-flash my board using a JTAG and boot RedBoot, it crashes:
+$T0a0f:5001790c;0d:00012b64;#81
Some GDB gibberish which I can't make sence of.
What am I doing wrong? Can anyone point out the proper way to
re-configure RedBoot to use 64MB of RAM rather than 32?
Would it be sufficient to just reconfigure the SDRAM init register and
pass exec -c"mem=64M@0x0" to the kernel?
Regards, Dan...
--
Dan Searle
Adelix Ltd
dan.searle@adelix.com web: www.adelix.com
tel: 0845 230 9590 / fax: 0845 230 9591 / support: 0845 230 9592
snail: The Old Post Office, Bristol Rd, Hambrook, Bristol BS16 1RY. UK.
Any views expressed in this email communication are those
of the individual sender, except where the sender specifically states
them to be the views of a member of Adelix Ltd. Adelix Ltd. does not
represent, warrant or guarantee that the integrity of this communication
has been maintained nor that the communication is free of errors or
interference.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-26 16:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26 15:12 Porting RedBoot to a 64MB GRG based board Daly, Jeffrey
-- strict thread matches above, loose matches on Subject: below --
2005-01-26 15:09 Dan Searle
2005-01-26 15:41 ` Mark Salter
[not found] ` <447674893.20050126160459@adelix.com>
2005-01-26 16:14 ` Mark Salter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).