[U-Boot] pci booting 460ex seems to hang at tlb entries

Thanks for any pointers.
So here is my current setup, 2 460ex parts bussed together via the PCI bus. The master boots u-boot via flash, reserves some memory, and boots linux. A user process then maps that memory and loads a "flash image" into it. The PIM and POM registers on the master and slave processor are then configured. The slave is setup to enable bus mastering and then its boot is started. I see all the instructions being fetched across the PCI bus correctly (I've made loops and things to confirm that everything is executed on the slave properly). As I follow the instructions across the PCI bus I see it start at the usual location, then jump to FFFFF000 and start going. It makes it all the way to FFFFF29C and then nothing comes across the PCI bus. When I check the code to see where that is, it is the configuration of the TLB entries in init.S (which is almost exactly the same as the init.S for canyonlands). It seems that I've got something setup wrong and that is inhibiting the CPU from any more fetches on the PCI bus. The only TLB entry that I've changed from the canyonlands is the very first one to the following:
tlbentry(CONFIG_SYS_BOOT_BASE_ADDR, SZ_16M, \ CONFIG_SYS_BOOT_BASE_ADDR, 0xC, AC_R|AC_W|AC_X|SA_G) /* TLB 0 */
CONFIG_SYS_BOOT_BASE_ADDR is 0xFF000000 0xC is the space that according to the datasheet is the location of the PCI space. It is the same address that I am using for the POMs so it at least behaves as expected for the initial part of the boot.
I did not see anything else that I *knew* required modification but I was a little unsure about the PCI space TLB entry. Is there another place in the code I need to be modifying things? This happens early so the choices look to be a limited as to what could be wrong. I've also tried the abatron, but it seems to misbehave when using this boot mode.
Thanks,

Hi,
I'm back haxing at u-boot. Specifically I'm trying to build fw_printenv so that I can use u-boots environment to store my boards MAC address.
I've been able to build a u-boot that runs off of u-boot-1.3.4 for the AT91RM9200DK. However when I try and build the utilities to read and write the env I get the following error below. Any ideas why this is happening?
Matt Tehama Wireless ---
# make env CROSS_COMPILE=armv4l-uclibc- MTD_VERSION=old make -C tools/env all MTD_VERSION=old || exit 1 make[1]: Entering directory `/home/tu/workspaces/uboot/u-boot-1.3.4/tools/env' armv4l-uclibc-gcc -Wall -DUSE_HOSTCC -I/home/tu/workspaces/uboot/u-boot-1.3.4/include -DMTD_OLD crc32.c fw_env.c fw_env_main.c -o fw_printenv In file included from /home/tu/workspaces/uboot/u-boot-1.3.4/include/linux/mtd/mtd.h:12, from fw_env.c:36: /home/tu/workspaces/uboot/u-boot-1.3.4/include/linux/mtd/mtd-abi.h:11: error: expected specifier-qualifier-list before ‘uint32_t’ /home/tu/workspaces/uboot/u-boot-1.3.4/include/linux/mtd/mtd-abi.h:16: error: expected specifier-qualifier-list before ‘uint32_t’ /home/tu/workspaces/uboot/u-boot-1.3.4/include/linux/mtd/mtd-abi.h:61: error: expected specifier-qualifier-list before ‘uint8_t’ /home/tu/workspaces/uboot/u-boot-1.3.4/include/linux/mtd/mtd-abi.h:72: error: expected specifier-qualifier-list before ‘uint32_t’ /home/tu/workspaces/uboot/u-boot-1.3.4/include/linux/mtd/mtd-abi.h:93: error: expected specifier-qualifier-list before ‘uint32_t’ fw_env.c: In function ‘fw_setenv’: fw_env.c:386: error: ‘uint8_t’ undeclared (first use in this function) fw_env.c:386: error: (Each undeclared identifier is reported only once fw_env.c:386: error: for each function it appears in.) fw_env.c:386: error: expected expression before ‘)’ token fw_env.c:386: error: too few arguments to function ‘crc32’ fw_env.c: In function ‘flash_io’: fw_env.c:400: error: ‘erase_info_t’ undeclared (first use in this function) fw_env.c:400: error: expected ‘;’ before ‘erase’ fw_env.c:431: error: ‘erase’ undeclared (first use in this function) fw_env.c: In function ‘env_init’: fw_env.c:621: error: ‘uint8_t’ undeclared (first use in this function) fw_env.c:621: error: expected expression before ‘)’ token fw_env.c:621: error: too few arguments to function ‘crc32’ fw_env.c:645: error: expected expression before ‘)’ token fw_env.c:645: error: too few arguments to function ‘crc32’ make[1]: *** [fw_printenv] Error 1 make[1]: Leaving directory `/home/tu/workspaces/uboot/u-boot-1.3.4/tools/env' make: *** [env] Error 1 #

So still doing some hacking trying to build this and wondering if either u-boot-1.3.4 is busted, or the instructions are wrong.
Poking about it looks like fw_printenv needs some kernel headers in order to build correctly. Specifically I believe it needs include/mtd/mtd-user.h
On my system I was able to build it manually using
armv4l-uclibc-gcc -Wall -DUSE_HOSTCC -I/home/tu/workspaces/AccessPoint/Kernel/include/ -I/home/tu/workspaces/uboot/u-boot-1.3.4/tools crc32.c fw_env.c fw_env_main.c -o fw_printenv
Where /home/tu/workspaces/AccessPoint/Kernel/include/ is the location of my embedded kernels header files.
Note sure it it works or not. When I run it I get the following error.
Cannot parse config file: No such file or directory
Mr Foo

Dear Pink Boy,
In message 565934.6670.qm@web31815.mail.mud.yahoo.com you wrote:
So still doing some hacking trying to build this and wondering if either u-boot-1.3.4 is busted, or the instructions are wrong.
v1.3.4 is old. Why don't you use current code?
Note sure it it works or not. When I run it I get the following error.
Cannot parse config file: No such file or directory
Obviously you have to create a config file in your target file system...
Best regards,
Wolfgang Denk

Dear Wolfgang,
In message pink sez,
So still doing some hacking trying to build this and wondering if either u-boot-1.3.4 is busted, or the instructions are wrong.
v1.3.4 is old. Why don't you use current code?
Far as I can tell v1.3.4 is from Sept this year. Is it older than that?
Note sure it it works or not. When I run it I get the following error.
Cannot parse config file: No such file or directory
Obviously you have to create a config file in your target file system...
I'm sorry I should have done a little more poking about before I posted that. I put fw_env.config in /etc and changed the entry to and at least
/dev/mtd1 0xe000 0x2000 0x2000 #/dev/mtd1 0xe000 0x2000 0x2000
Then created device nodes.
mknod /dev/mtd0 c 90 0 mknod /dev/mtd1 c 90 1
After that fw_printenv works. However fw_setenv returns an error.
# ./fw_setenv beets are_good Can't open /dev/mtd1: Permission denied Error: can't write fw_env to flash
It's probably something stupid on my part. But at least I got this far.
Would using the latest tree be better? It appears at least that make at91rm9200dk_config make env
doesn't work because fw_printenv needs some kernel headers to build correctly.
Mr Foo
participants (3)
-
Ayman M. El-Khashab
-
Pink Boy
-
Wolfgang Denk