02 August 2011 - New multilib N32 Gentoo MIPS Stages

Gentoo/MIPS has been in, well, not great shape for quite some time. When I was going through Gentoo recruitment, there were no stages (used for installing Gentoo) newer than 2008, so this was one of the main things I wanted to improve, specifically by creating new N32 ABI stages. Even though the N32 (meaning New 32-bit) ABI was introduced in IRIX in 1996 to replace SGI's o32 (Old 32-bit) ABI, Linux support for N32 has lagged behind until the last few years. Now, I'm pleased to unofficially announce new multilib N32 stages and that we'll be supporting as the preferred ABI.

MIPS has three main ABIs: o32 (32-bit integer and pointer), N32 (64-bit integer, 32-bit pointer), N64 (64-bit integer and pointer). Compared with N32 and N64, o32 is very restrictive. Very few function arguments are passed in registers; only half the number of floating point registers are usable; no native 64-bit integer datatype; no long double type. (see SGI's MIPSpro N32 ABI Handbook for details). Offering N32 as the default ABI means better performance, sometimes 30% more, just by removing the unnecessary restrictions a 32-bit ABI imposes on 64-bit CPUs. Providing multilib stages (ie, stages with glibc and gcc built for all three ABIs) gives the user flexibility to switch to another ABI relatively easily if desired, while also allowing him to reduce build times by switching to an N32-only profile.

The process of creating N32 (and especially multilib) stages wasn't straight forward. Our profiles were long unmaintained and in many cases totally broken. There were lots of keywording bugs open for mips, many where the MIPS was the last team to complete the request by years. There were actually some real bugs discovered too, like 354877 and 358149, usually caused by the incorrect assumption that the lib directory is always a symlink to lib32. All in all, I've reduced the number of open bugs for MIPS down to ~20.

Work needed to be done to catalyst, Gentoo's release building tool. Since the end of June, I've made 15 commits cleaning, fixing, and adding to the mips support code in catalyst. Other developers like Sebastian Pipping have also resumed work on a project that had otherwise been minimally maintained since the beginning of the year.

The last major component in reviving Gentoo's MIPS support is to create installation media, preferably in an automated manner. I've acquired two Broadcom BCM91250A MIPS development boards (and should be receiving a third soon), but they need disks, controllers, RAM, and cases. For that, I wrote a funding Proposal to build three MIPS development computers (pdf) and had it approved by the Gentoo Foundation. Things seem to be going well in acquisitions (track progress) so I hope to have the project completed in the next few months with the systems automatically building stages for a wide variety of MIPS systems.

Initially, I used a big-endian 2006.1 N32 stage and had to bootstrap my system with a series of at least 20 hacks (not a fun experience) until it was usable enough that I was able to build a clean N32 stage. From there, using crossdev I built a multilib toolchain, and with a few more hacks I was able to build a multilib stage.

With that in the past, I've been building stages that can be used to seed the automated stage creation system to come. At this point, my TODO list looks like this:

The final touches will be to create bootable media like CD, USB, and netboot images.

All stages are available in the experimental/mips/stages/ directory (as soon as the files propagate) of a Gentoo Mirror.

Hopefully by the time I'm able to convince Lemote (or, who?) to send me a Loongson 3A laptop, installing and using Gentoo/MIPS will be a fun and pleasant experience.

Tags: gentoo linux mips

12 November 2010 - The Loongson 3A (Godson 3A) looks nice!

The Loongson 3A (or Godson 3A) is the successor to the Loongson 2F used in systems like the Lemote Yeelong and Gdium Liberty 1000. According to the Chinese review site EXPreview, the first production of Godson 3A CPUs has completed. (Specs and motherboard pictures below.)

The Loongson 3A/Godson 3A is a quad-core processor built on a 65 nm process. Running at 1 GHz, it has a power consumption of only 15 Watts. Each has 64kB of L1 instruction cache, 64kB of L1 data cache, and a 4MB shared L2 cache. The Godson 3A implements the MIPS64 architecture, which is a nice improvement over the previous Loongson 2F which only implemented MIPS III with extensions. Also, it has 200 new instructions for speeding up x86 binary execution.

Loongson 3A Two-way Server Motherboard

The server motherboard appears to be a two-way (so, 8 total cores!) board with 8 DIMMs (update: DDR2), 2 PCI, and 3 PCI-Express x4 (correction: two x8, one x4), 6 Serial ATA II, along with what looks to be standard PS/2, Parallel, VGA, USB, and Ethernet ports on the back.

Loongson 3A Desktop Motherboard

The desktop motherboard has 4 DIMMs (update: DDR3) to go with the Godson 3A's two memory controllers, 2 PCI, 2 PCI-Express x1, 1 PCI-Express x16, 6 Serial ATA II, and on the back: sound, USB, Ethernet, VGA and DVI, and PS/2.

Both motherboards have an AMD 780E chipset and a SB710 southbridge. With an RS780E chipset, the integrated graphics would be a RadeonHD 3200, though I have read elsewhere that the Loongson 3A will be using the AMD 690E chipset and a Radeon X1250. The RadeonHD 3200 has an RV610 core running at 500 MHz with 40 unified shaders. The Radeon X1250 has an older and less impressive RS690 (a mobile R400-series) core at 400 MHz with 2 vertex shaders and 4 pixel shaders. Using AMD's John Bridgman's conversion of 4 unified shaders per vertex shader and 5 unified shaders per pixel shader, the X1250 has the equivalent of 28 unified shaders.

In comparison with current Lemote and Gdium offerings, these boards look fantastic. No more ancient Silicon Motion SM502/SM712 graphics is especially nice.

The EXPreview article continues by mentioning that a Godson 2G (or Dragon Heart 2G) processor is also in successful production. The 2G is a Godson 3A but with a reduced number of cores meant for laptops.

Tags: hardware mips

27 October 2010 - How to enable SSL-IRC-access to Freenode and OFTC with XChat

The two main IRC networks I use are Freenode and OFTC. I've always liked the idea (though I don't currently make use of it) of things like HTTPS Everywhere, and I remember being disappointed the last time I checked if major IRC networks supported SSL. For some reason, I checked tonight and found out they do! Here's how to set it up with XChat on Linux.

When you reconnect to the network, you'll see something like this in your connection log. Enjoy!

* Looking up irc.freenode.net
* Connecting to chat.freenode.net (128.237.157.136) port 7000...
* * Certification info:
*   Subject:
*     OU=Domain Control Validated
*     OU=Gandi Standard Wildcard SSL
*     CN=*.freenode.net
*   Issuer:
*     C=FR
*     O=GANDI SAS
*     CN=Gandi Standard SSL CA
*   Public key algorithm: rsaEncryption (2048 bits)
*   Sign algorithm sha1WithRSAEncryption
*   Valid since Jan 13 00:00:00 2010 GMT to Jan 13 23:59:59 2011 GMT
* * Cipher info:
*   Version: TLSv1/SSLv3, cipher DHE-RSA-AES256-SHA (256 bits)
* Connected. Now logging in...
* *** Looking up your hostname...
* *** Checking Ident
* *** No Ident response
* *** Found your hostname
* Welcome to the freenode Internet Relay Chat Network mattst88

Tags: irc howto

26 October 2010 - Fix for Creative ZEN V Plus won't connect: Code-10

I just spent the better part of my afternoon figuring out what the hell was wrong with my girlfriend's Creative ZEN V Plus MP3 player. It froze yesterday and hasn't been able to connect to our computers since. Everytime she turned it on, it said Rebuilding Library, but it normally only does that during the boot immediately after it froze and has to be manually reset. It wouldn't connect in Linux, and in Windows the obnoxious balloon tips would report "MTP device found" again and again. In the Device Manager, it reported "Code 10: Device cannot start." Well, we finally found a fix.

Searching for zen v plus code 10 turns up 287,000 results including countless forum threads with no helpful replies. The most common suggestion is to uninstall the device in Device Manager, but trying this numerous times did nothing to help.

Many threads from Microsoft's social.answers.microsoft.com show the exact same problem reported over and over again, but no helpful responses.

After wasting hours searching the internet, we discovered the ZEN's Recovery Mode. You enter it by turning on the ZEN while holding down the Play button.

Creative ZEN V Plus in Recovery Mode

Selecting "Clean up" performs some magic which I cannot explain. Then select Reboot. When your ZEN comes back to life, it'll happily connect to your computer.

What an obnoxious problem. You'd think Creative would have written this article a few years ago, but they'd probably rather you junk your ZEN V Plus and hand over another hundred dollars for whatever their newest model is.

Tags: hardware howto

11 April 2010 - My Google Summer of Code proposal

I've been involved with X.Org for a few months now. I want to increase my involvement, and at the same time learn the ropes. I also need something to do this summer–and that's why I've applied to the Google Summer of Code.

Also available at the SoC website.

KMS for Permedia3/4 as a method for Documenting the KMS driver writing process

Abstract

The current trend in X11 graphics is to move mode-setting code into the kernel, allowing for faster and more graphical boots with fewer flickers. Only the big three drivers, Radeon, Intel, and Nouveau, support KMS, but there are many more X11 drivers that could benefit as well. Unfortunately, the big three drivers are large (smallest is 26,000 lines, largest is 65,000 lines) and complex, and is there no official documentation for writing KMS drivers. This project aims to provide the community with both documentation for writing KMS drivers and a basic, unaccelerated, reference KMS driver for Permedia3-series hardware.

Benefits to the Community

With a small reference KMS implementation and clear and detailed documentation, written from the perspective of a student not fluent in the world and process of writing graphics drivers, others should be able to write KMS drivers for other hardware much more easily and therefore improve the experience of users with such hardware.

Project Tasks

  1. Implement a shell driver that claims the hardware. Get my hands dirty with kernel code. Once this is completed,
  2. Implement basic mode-setting for the Permedia3. Although the Permedia4 (and Permedia2) are very similar, the mode-setting code on each chip could have its own bugs and headaches, so I am limiting the scope to only Permedia3.
  3. Implement basic memory management using TTM. Study the TTM API, documenting relevant parts. Once the memory manager is completed, polish the code into something others can read and follow. This stage will be complete when X11 can run on the KMS driver using fbdev.
  4. Write Documentation and Programming Guides for KMS, TTM, and other DRM interfaces.

Optional Tasks

  1. Implement some form of Command Submission.
    • Implement system for submitting commands to the kernel
    • Implement system for knowing when the commands have been completed
    • Improve the memory manager to handle command buffers
  2. Using command submission, accelerate some tasks of the KMS driver such as copy area and rectangle fills.
  3. Make the existing xf86-video-glint DDX capable of operating with the KMS driver.
  4. Make the existing xf86-video-glint DDX capable of making use of the memory manager.

Deliverables

  1. Shell driver that claims the hardware (1 week)
  2. Implement basic mode-setting (3 weeks)
  3. Implement basic memory management using TTM (3 weeks)
  4. Bug Fixes and polish - basic, unaccelerated KMS driver capable of providing fbdev with linear VRAM access. (2 weeks)
  5. Document the process, finish Documentation and Guides for writing KMS drivers (2~3 weeks)

Optional Tasks

  1. Command Submission (3 weeks, if time allows)
  2. Accelerated KMS driver (1 week, if time allows)

Eventual Tasks, outside the scope of GSoC

Related Work

Jesse Barnes proposed a work-in-progress patch to includes documentation that "provid[es] basic information about DRM interfaces, including TTM, GEM, KMS and vblank infrastructure."

http://sourceforge.net/mailarchive/forum.php?thread_name=20091026130631.02a8d6ef%40jbarnes-g45&forum_name=dri-devel

Existing Permedia2/3 framebuffer drivers exist in the Linux Kernel, drivers/video/pm{2,3}fb.c.

Biographical Information

I am a senior at Lenoir-Rhyne University, with a major in Physics and minors in Mathematics and Computer Science. I work for the school's marketing department doing PHP/Drupal web development.

I'm a contributor to X.Org, the Linux Kernel, and Alpha/Linux (where I'm the de facto glibc maintainer).

For this summer, I plan to have a part-time internship, mostly unrelated to programming.

Skills and Qualifications

I'm experienced programming in C and x86/Alpha assembly. I'm also quite persistent and do not give up easily.

I've made close to 30 commits to the X server, for changes to between 1500 and 2000 lines of code. I've also made minor changes to the xf86-video-ati and xf86-video-intel drivers.

On the Kernel side, I run the alpha-2.6 git tree for collecting and funneling DEC Alpha patches that I and others write to Linus. I've made minor commits to the DRM kernel code.

I also maintain the AlphaLinux.Org Wiki, a community site documenting Alpha hardware, software, and the latest developments in open source affecting Alpha/Linux users.

Tags: glint gsoc kms linux xorg

Previous 1 2 3 4 5 Next