Posts

MIPS N32 firefox 3.5 beta4

Image
It is working too. The xulrunner's ebuild is already in loongson overlay . For the mozilla-firefox ebuild, just use the one from mozilla overlay. If you experienced segfault, try to re-emerge sqlite with no optimization. Using the bundled sqlite surely is not an optimal solution, ;) One more thing: Xorg's siliconmotion driver is now working on yeeloong notebook : http://bugs.freedesktop.org/show_bug.cgi?id=21528

MIPS N32 firefox in acid3 test

Image
My quest for MIPS N32 firefox could finally come to an end, since I just got it scores the same as X86 firefox . Remember I said it would encounter bus error on a few websites in my last related post . But I didn't plan to look into this issue before dealing with cache aliasing problem. However, since Rayson Ho helped me to locate the exact cause of this issue, I decided to finish it first. The problem is caused by unaligned access of ldc1/sdc1 instruction. These two instructions' operand must be 8 bytes aligned. But when crashing, the operand is only 4 bytes aligned. After some discussion and experimenting, I found a workaround for sina.com.cn crashing problem. Yeah, a padding pointer sounds scary and fragile, but it did work. Before posting any comment to this, please make sure you have read all the emails in that thread. Then Fai Wong reported to me that it still crash in acid3 test . So I took another look. This time the problem happened in a different location, and it i...

Ftrace is working now on my loongson box

http://www.linux-mips.org/archives/linux-mips/2009-04/msg00112.html So I confirmed that this MIPS ftrace support is really working. Thanks to Wu Zhangjin (吴章金). However, I have no interest in finding out what kind of difference between my loongson2f patch and wu's caused wu's ftrace patch does not work on top of my loongson 2f patch. What I would like to see now is to get loongson2f patch merged into mainline . Plus, I wish I could make loongson linux to be able to use 4k page(Now, loongson could only use 16k page in order to avoid d-cache aliasing). I have already started working on it now. Even if it turns out that I can't, I could tell others what I have done in order to achieve this goal. And by that time, I would've got a much deeper understanding of Linux's memory management subsystem.

Two more kernel patches

This one is MIPS related, already accepted: MIPS: Fix TIF_32BIT undefined problem when seccomp is disabled This one is proc filesystem related: [PATCH] filp->f_pos not correctly updated in proc_task_readdir The later one is also MIPS related actually, in a peculiar way: MIPS N32 does not have getdents64 system call. And because of readdir's implementation in glibc, this bug will be triggered when trying to run pstree or simply 'ls /proc/xxxx/task', where xxxx is the pid of a multithread process.

Firefox for MIPS N32 ABI

Finally, I could announce that it is working (tm). I just submitted the patches (together with O32 ABI patch) to upstream. https://bugzilla.mozilla.org/show_bug.cgi?id=482759 This is a big step forward for MIPS N32 GNU/Linux desktop. One thing to note though: It (the N32 one) would encounter bus error on a few websites, e.g. www.sina.com.cn. I will try to find out why later when I have time. For those who are into long stories, please read on: I finally sorted out the font size problem, independently. It turned out that the problem is caused by strict aliasing issue in NSPR (NetScape Portable Runtime). Specifically, when parsing css file, in order to get the font size, PR_strtod() will be used to convert string to floating point value. But because of the strict aliasing issue, certain code in PR_strtod will be optimized out if -fstrict-aliasing is turned on, which is just the case if -O2 is used. And as a result, the floating point value would be wrong, e.g. "1.5" will be con...

mips64el-unknown-linux-gnu cross toolchain building

NOTE: I just updated the command at the bottom, again. No big change. Now all should be good to go, including building on PS3, which is big endian. Crossdev is a great tool. Thanks to vapier. However, it may not work in all circumstances, although the problems may not lie in crossdev itself. For example, when creating mips64el-unknown-linux-gnu cross toolchain. The problems happen when building glibc headers. Because at that time, we don't have cross gcc yet. So some gcc options only cross gcc supports or some macros only cross gcc defines can't be used. Also happen when building gcc on big endian machines. Because of the erroneous LD_LIBRARY_PATH setting, cc1 generated in stage 1 will try to load libgcc_s.so.1 generated in stage 1, which is little endian. So I made some work-arounds. These are the three patches needed: one patch to src_compile.eblit a second patch to src_install.eblit a third patch to gcc ebuild These are all small changes, but took me a lot of time to investi...

MIPS N32 patch for xulrunner(firefox)

Finally, I have produced some results. I have watched 6 seasons of 24 and 2 seasons of Friends since late last month. So this is delayed. :P The patch is here . I think it still need some tweaks, you can always get the latest patch in my loongson overlay on http://www.gentoo-cn.org/gitweb . The produced xulrunner could run a little example: http://dev.gentoo.org/~r0bertz/xulrunner/myapp.tar.bz2 (untar the tarball, cd myapp && xulrunner-1.9 application.ini) However, I haven't got a fully functioning firefox yet. Some font size is extremely large. And sometimes bus error. I have noticed that I have used -O3 to compile it. I will try -O2/-O1 later and see if it still bus error.