have you looked at how this is handled in the sun2 driver?