summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/loader/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/efi/loader/main.c')
-rw-r--r--sys/boot/efi/loader/main.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sys/boot/efi/loader/main.c b/sys/boot/efi/loader/main.c
index 51ac572..82979e2 100644
--- a/sys/boot/efi/loader/main.c
+++ b/sys/boot/efi/loader/main.c
@@ -72,13 +72,8 @@ find_pal_proc(void)
};
u_int8_t *p;
- for (i = 0; i < ST->NumberOfTableEntries; i++) {
- if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
- &sal, sizeof(EFI_GUID)))
- saltab = ST->ConfigurationTable[i].VendorTable;
- }
-
- if (!saltab) {
+ saltab = efi_get_table(&sal);
+ if (saltab == NULL) {
printf("Can't find SAL System Table\n");
return;
}
@@ -336,13 +331,8 @@ command_sal(int argc, char *argv[])
};
u_int8_t *p;
- for (i = 0; i < ST->NumberOfTableEntries; i++) {
- if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
- &sal, sizeof(EFI_GUID)))
- saltab = ST->ConfigurationTable[i].VendorTable;
- }
-
- if (!saltab) {
+ saltab = efi_get_table(&sal);
+ if (saltab == NULL) {
printf("Can't find SAL System Table\n");
return CMD_ERROR;
}
OpenPOWER on IntegriCloud