edid: steal serial handling code from g-s-d