efi: Merge EFI system table revision and vendor checks
[sfrench/cifs-2.6.git] / arch / ia64 / kernel / efi.c
index 312308967a9ded5daf2446a589868f02c910e731..292fe354158d7898a1658403d87008e9072b1e05 100644 (file)
@@ -479,10 +479,8 @@ void __init
 efi_init (void)
 {
        void *efi_map_start, *efi_map_end;
-       efi_char16_t *c16;
        u64 efi_desc_size;
-       char *cp, vendor[100] = "unknown";
-       int i;
+       char *cp;
 
        set_bit(EFI_BOOT, &efi.flags);
        set_bit(EFI_64BIT, &efi.flags);
@@ -519,25 +517,10 @@ efi_init (void)
         */
        if (efi.systab == NULL)
                panic("Whoa! Can't find EFI system table.\n");
-       if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
+       if (efi_systab_check_header(&efi.systab->hdr, 1))
                panic("Whoa! EFI system table signature incorrect\n");
-       if ((efi.systab->hdr.revision >> 16) == 0)
-               printk(KERN_WARNING "Warning: EFI system table version "
-                      "%d.%02d, expected 1.00 or greater\n",
-                      efi.systab->hdr.revision >> 16,
-                      efi.systab->hdr.revision & 0xffff);
-
-       /* Show what we know for posterity */
-       c16 = __va(efi.systab->fw_vendor);
-       if (c16) {
-               for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i)
-                       vendor[i] = *c16++;
-               vendor[i] = '\0';
-       }
 
-       printk(KERN_INFO "EFI v%u.%.02u by %s:",
-              efi.systab->hdr.revision >> 16,
-              efi.systab->hdr.revision & 0xffff, vendor);
+       efi_systab_report_header(&efi.systab->hdr, efi.systab->fw_vendor);
 
        palo_phys      = EFI_INVALID_TABLE_ADDR;