
Hi,
I decided to post my questions on this list even though they also concern the X-Loader. However, since the X-Loader is derived from U-Boot, I thought they are placed well here.
I'm a bit confused about the clock rate which is set for the ARMv7 processor of the BeagleBoard-xM (Rev C; DM3730) by U-Boot and X-Loader. As far as I understand it, the clock rate is only set to a "safe" initial low value and not to the highest possible value the CPU is actually able to run at.
According to the TI TRM [1] (p. 349), the ARM_CLK can be calculated as follows: I) MPU_CLK = SYS_CLK * M / ([N+1] * M2) II) ARM_CLK = MPU_CLK If I am correct, SYS_CLK equals to the oscillator frequency (26 MHz) divided by 2, so SYS_CLK = 13 MHz. Therefore, ARM_CLK should be 600 MHz, because M = 600, N = 12, and M2 = 1. (I got these values from the table in <U-Boot-root>/arch/arm/cpu/armv7/omap3/lowlevel_init.S, but I also verified them by some printfs after prcm_init().)
Now, what confuses me: When I set exactly the same values for M, N, and M2 (SYS_CLK is also 13 MHz) in X-Loader (I used this version: [2]), then the CPU seems to perform significantly slower than in U-Boot. To see the difference I ran a simple standalone application with a constant number of instructions in both X-Loader and U-Boot. The CR (Control Register [3]) was set to the same value (0xC5087A -> instruction and data caches disabled).
I measured the execution time for both cases and got these values:
U-Boot: 35066 ms X-Loader: 23389 ms
1) Is there anything initialized/activated in U-Boot -- but not in X-Loader -- which could affect the performance in such a way? 2) Am I correct that the CPU is clocked at 600 MHz at all (at least in U-Boot)?
Thank you.
Best regards, Chris
[1] AM/DM37x Multimedia Device Silicon -- Technical Reference Manual http://focus.ti.com/lit/ug/sprugn4l/sprugn4l.pdf [2] x-loader - Gitorius http://gitorious.org/x-loader [3] Cortex-A8 Technical Reference Manual -- Control Register
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344k/Bgbffjh...