vc/eltan/security/verified_boot/vboot_check.c: Add check PROG_POSTCAR

On Coffee Lake systems prog_locate_hook() is called with PROG_POSTCAR.
For this reason the early check is not executed.

Add check for prog->type == PROG_POSTCAR, but execute
verified_boot_early_check() once.

BUG  = N/A
TEST = Build and boot on Facebook FBG1701 and Intel CoffeeLake system

Change-Id: Ia3bd36064bcc8176302834c1e46a225937d61c20
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48852
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/vendorcode/eltan/security/verified_boot/vboot_check.c b/src/vendorcode/eltan/security/verified_boot/vboot_check.c
index 824570e..0de2f0a 100644
--- a/src/vendorcode/eltan/security/verified_boot/vboot_check.c
+++ b/src/vendorcode/eltan/security/verified_boot/vboot_check.c
@@ -345,12 +345,17 @@
 
 int prog_locate_hook(struct prog *prog)
 {
+	static int initialized;
+
 	if (ENV_BOOTBLOCK)
 		verified_boot_bootblock_check();
 
 	if (ENV_ROMSTAGE) {
-		if (prog->type == PROG_REFCODE)
+		if (!initialized && ((prog->type == PROG_REFCODE) ||
+		    (prog->type == PROG_POSTCAR))) {
 			verified_boot_early_check();
+			initialized = 1;
+		}
 
 		if (CONFIG(POSTCAR_STAGE) && prog->type == PROG_POSTCAR)
 			process_verify_list(postcar_verify_list);