bootstub: add VLV2 SoC detection

BZ: 96845

Add ValleyView2 SoC (i.e. Baytrail platorm) detection for bootstub.
This is needed for further VLV2 related feature enabling, e.g. BIOS style
e820 read, etc.

Change-Id: Id590de166acb01a81cc11290bf1efdd27ba82a32
Signed-off-by: Bin Gao <bin.gao@intel.com>
Reviewed-on: http://android.intel.com:8080/99215
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Renganathan, Prabu <prabu.renganathan@intel.com>
Reviewed-by: Anagani, Chandra Sekhar <chandra.sekhar.anagani@intel.com>
Reviewed-by: Ernst, Eric <eric.ernst@intel.com>
Reviewed-by: Imberton, Guilhem <guilhem.imberton@intel.com>
Tested-by: Ng, Cheon-woei <cheon-woei.ng@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/bootstub.c b/bootstub.c
index 5e8fc1c..f53409f 100644
--- a/bootstub.c
+++ b/bootstub.c
@@ -159,10 +159,13 @@
 	u32 regs[4];
 
 	cpuid(1, &regs[CR_EAX], &regs[CR_EBX], &regs[CR_ECX], &regs[CR_EDX]);
-	if ((regs[CR_EAX] & PENWELL_FAMILY) == PENWELL_FAMILY)
+
+	if ((regs[CR_EAX] & CPUID_MASK) == PENWELL_FAMILY)
 		return MRST_CPU_CHIP_PENWELL;
-	else if ((regs[CR_EAX] & CLOVERVIEW_FAMILY) == CLOVERVIEW_FAMILY)
+	else if ((regs[CR_EAX] & CPUID_MASK) == CLOVERVIEW_FAMILY)
 		return MRST_CPU_CHIP_CLOVERVIEW;
+	else if ((regs[CR_EAX] & CPUID_MASK) == VALLEYVIEW2_FAMILY)
+		return MRST_CPU_CHIP_VALLEYVIEW2;
 	return MRST_CPU_CHIP_LINCROFT;
 }