ported patch 3 from http://patchwork.coreboot.org/user/bundle/37/