sandybridge/gma_lvds: support both Sandy&Ivy on one board

Sandy and Ivy Bridge processors use the same socket, and a mainboard
with the socket can support both types of CPUs. However, they use
different native graphics init code for LVDS and cause a crash if
running the wrong code.

This change detects the CPU type and then selects the right code to
run. It will add some more code in ramstage. It also merges the

Tested on a Lenovo T520 with i7-2630qm and i7-3720qm

Signed-off-by: Iru Cai <>
Change-Id: I4624759f9c92d56d547db1ab4b9a1d611a182a91
Reviewed-by: Vladimir Serbinenko <>
Tested-by: build bot (Jenkins)
13 files changed