click here to return to home.

Plan 9 from Bell Labs is an open-source distributed system from the creators of Unix. I love the design of this operating system and I am still working with it. You can learn more on it here. I contributed to it at several points, mostly to fix problems I encountered while using it. It is still a very pleasant moment to use it. Here I present some of my works related to Plan9...


June 2010

After a year to heal from a burn-out, I came back to my roots and worked on Plan9. I found and fixed a nasty bug in 9vx, a port of the Plan 9 kernel to the vx32 user-mode virtualization environment. You can learn more on 9vx here.

The problem was related the process scheduler of Plan9, because the authors of 9vx made false assumptions about the thread scheduler of the operating system. It was a very complicated bug to identify and to debug. I give more explanations on the comp.os.plan9 archived mailing list.

/* * sleep if a condition is not true. Another process will * awaken us after it sets the condition. When we awaken * the condition may no longer be true. * * we lock both the process and the rendezvous to keep r->p * and p->r synchronized. */ void sleep(Rendez *r, int (*f)(void*), void *arg) { int s; s = splhi(); lock(r); ...

VIA Gigabit Ethernet Driver


I had a ABit AV8 Motherboard that came with a VIA Gigabit ethernet driver. I could not resist to steal some register defines from FreeBSD, and do my own implementation of the driver.

You can read the source code here:

/* * VIA Velocity gigabit ethernet. * Register info has been stolen from FreeBSD driver. * * Has been tested on: * - VIA8237 (ABIT AV8): 100Mpbs Full duplex only. * It works enough to run replica/pull, vncv, ... * * To do: * - 64/48 bits * - autonegotiation * - thresholds * - dynamic ring sizing ?? * - link status change * - shutdown * - promiscuous * - report error * - Rx/Tx Csum * - Jumbo frames * * Philippe Anel, */ #include "u.h" #include "../port/lib.h" #include "mem.h" ...

ATI/AMD Radeon Driver

June 2003

I still have this great ATI Radeon 4600 video card, and the its DVI ports. You can read more about it here.

You can read the source code here:

/* * ATI Radeon [789]XXX vga driver * see /sys/src/cmd/aux/vga/radeon.c */ #include "u.h" #include "../port/lib.h" #include "mem.h" #include "dat.h" #include "fns.h" #include "io.h" #include "../port/error.h" #define Image IMAGE ...

Matrox G4[50]0 Driver

August 2001

This is my first published code for Plan9. Matrox sent me the documentation of the G400 graphic chipset. It was very interesting to work on this code.

You can read the source code here:

/* * Matrox G200, G400 and G450. * Written by Philippe Anel * * 2006-08-07 : Minor fix to allow the G200 cards to work fine. * YDSTORG is now initialized. * : Also support for 16 and 24 bit modes is added. * : by Leonardo Valencia */ #include "u.h" #include "../port/lib.h" #include "mem.h" #include "dat.h" #include "fns.h" #include "io.h" #include "../port/error.h" #define Image IMAGE ...