Re: [PATCH 1/3] MIPS: Loongson: Remove Loongson-2E/2F support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jiaxun,

On Tue, 5 Nov 2019, Jiaxun Yang wrote:

> >BTW, there used to be a patch somewhere to support more than 512MiB of 
> >DRAM with the 2E, but I can't find it -- can you help me tracking it
> 
> Hi Maciej
> 
> It seems like DRAM size issue is a firmware issue rather than kernel 
> issue, some early versions of PMON don't pass highmem size correctly to 
> the Kernel.
> Probably you can manually set it in loongson-2ef/common/mem.c?

 Not really, the size was passed correctly, but something was set wrong in 
the chipset that caused the kernel to crash if access to upper 512MiB was 
allowed with a 1GiB SODIMM.  I had to strap memory regions manually to 
keep the system working, as follows:

      karg = "console=tty root=/dev/hda2 mem=256M@0 mem=256M@512M"

 Yeah, I knew upgrading the firmware was the right way, but I was being a 
coward about flashing, fearing I could brick the machine.

> Currently I can't find any working Fuloong-2E to test but the newest 
> known PMON can be found here[1].
> 
> Thanks
> 
> [1] https://mirrors4.tuna.tsinghua.edu.cn/loongson/pmon/pmon_2e.bin
> https://mirrors4.tuna.tsinghua.edu.cn/loongson/pmon/pmon_2e.bin.md5

 So I went ahead and I have now actually flashed the newer firmware.  My 
cowardice still told me not to take it lightly, so I waited until I 
travelled to my other site where I could power the machine via a UPS.

 Results have been good and the extra RAM let me upgrade the 32-bit Debian 
system installed to Debian 7 "Wheezy" without making the system swap to 
death.  This is actually the final Debian release to support Fuloong-2E, 
as the MIPS port was skipped with Debian 8 "Jessie" and Debian 9 "Stretch" 
requires a MIPS R2 processor to run, and Fuloong-2E only supports the MIPS 
III ISA (plus vendor extensions).  It would have saved me a lot of hassle, 
if it was more clearly stated at: <https://www.debian.org/ports/mips/>.

 A further issue that caused me some pain was with Firefox, which did not 
run and crashed with SIGILL right away.  Eventually I figured out it was 
on a MIPS IV FPU instruction (MOVT IIRC) despite Firefox having been built 
for MIPS II.  After a further research I realised a JIT compiler had been 
added to the browser at one point for JavaScript execution, and it must 
have been incorrectly set to produce code for an ISA beyond one Firefox 
has been built for.

 As I think it's unlikely anyone will backport a fix let alone build a 
MIPS Firefox binary for Debian 7, I went for a workaround instead and 
disabled JIT compilation with a:

user_pref("javascript.options.baselinejit", false);

entry added to `prefs.js'.  That let Firefox run normally.

 I guess these bits of information may still be useful to someone, so I 
decided to post them; after so many years I still find Fuloong-2E a great 
machine and still very usable.  I'll try to find some time to polish this 
a little and include with <https://www.linux-mips.org/wiki/Fuloong_2E>.  
I think it would make sense to have a copy of the firmware image there 
too.

 Thanks for encouraging me to upgrade the firmware and providing a link!

  Maciej


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux