[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Microblaze with MMU, loadable module printk problems
Hi Jeffry,
Thanks for the detailed report - comments inline below
jeffrey.fuller@xxxxxxxxx wrote:
John, thanks for the help. I had erred in saying that the driver would
not do printks correctly on non-MMU Microblaze. The module you sent
prints correctly and so do ones I build (long story short: I fooled
myself into thinking the same problem was on both non-MMU and MMU).
OK, that's a good start.
However, we do still have a problem on Microblaze with MMU, and today we
discovered something interesting by accident. This can be recreated with
the following code and method:
<snip>
1. Build the above module with the mb-linux-gcc compiler (as I
understand it, this is the compiler that should be used for Microblaze
w/ MMU).
2. insmod the resulting module.
3. Expected output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
a b c d e f g h i j k l m n o p q r s t
4. Actual output:
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
5. Now, build the above module with the microblaze-uclinux-gcc (as I
understand it, this is the compiler that should be used for NON-MMU
Microblaze).
6. insmod the resulting module.
7. You get the expected output.
Hmm. I'll try this myself later today.
So, in conclusion, when building a module for Microblaze w/ MMU and
using the mb-linux-gcc compiler, which is the compiler we thought should
be used, we get incorrect results. When using the
microblaze-uclinux-gcc, we get expected results. Again, to reiterate,
this is all on Microblaze w/ MMU. One further note: in our experience,
just about any combination of printks and strings (including, for
example printk("This is a string\n") should have problems when compiled
with mb-linux-gcc, though we have seen a few simple, single strings
print correctly.
Can anyone tell me if we've somehow got our understanding of the
compilers mixed up? Or is there a real bug here? Can anyone try the
above test code and method on a Microbaze MMIU? Any help would be
greatly appreciated.
Your understanding is correct. For building the kernel we don't really
care if the toolchain is or is not MMU aware - the real difference is in
the apps and libs.
That said, building kernels (and modules) with the new toolchain has to
work!
I'll do some tests here and get back to you.
Cheers,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/