| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Extensible SAL Interface (ESI) support routines. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 17 | 18 | MODULE_LICENSE("GPL"); |
|---|
| 18 | 19 | |
|---|
| 19 | 20 | #define MODULE_NAME "esi" |
|---|
| 20 | | - |
|---|
| 21 | | -#define ESI_TABLE_GUID \ |
|---|
| 22 | | - EFI_GUID(0x43EA58DC, 0xCF28, 0x4b06, 0xB3, \ |
|---|
| 23 | | - 0x91, 0xB7, 0x50, 0x59, 0x34, 0x2B, 0xD4) |
|---|
| 24 | 21 | |
|---|
| 25 | 22 | enum esi_systab_entry_type { |
|---|
| 26 | 23 | ESI_DESC_ENTRY_POINT = 0 |
|---|
| .. | .. |
|---|
| 47 | 44 | |
|---|
| 48 | 45 | static struct ia64_sal_systab *esi_systab; |
|---|
| 49 | 46 | |
|---|
| 47 | +extern unsigned long esi_phys; |
|---|
| 48 | + |
|---|
| 50 | 49 | static int __init esi_init (void) |
|---|
| 51 | 50 | { |
|---|
| 52 | | - efi_config_table_t *config_tables; |
|---|
| 53 | 51 | struct ia64_sal_systab *systab; |
|---|
| 54 | | - unsigned long esi = 0; |
|---|
| 55 | 52 | char *p; |
|---|
| 56 | 53 | int i; |
|---|
| 57 | 54 | |
|---|
| 58 | | - config_tables = __va(efi.systab->tables); |
|---|
| 59 | | - |
|---|
| 60 | | - for (i = 0; i < (int) efi.systab->nr_tables; ++i) { |
|---|
| 61 | | - if (efi_guidcmp(config_tables[i].guid, ESI_TABLE_GUID) == 0) { |
|---|
| 62 | | - esi = config_tables[i].table; |
|---|
| 63 | | - break; |
|---|
| 64 | | - } |
|---|
| 65 | | - } |
|---|
| 66 | | - |
|---|
| 67 | | - if (!esi) |
|---|
| 55 | + if (esi_phys == EFI_INVALID_TABLE_ADDR) |
|---|
| 68 | 56 | return -ENODEV; |
|---|
| 69 | 57 | |
|---|
| 70 | | - systab = __va(esi); |
|---|
| 58 | + systab = __va(esi_phys); |
|---|
| 71 | 59 | |
|---|
| 72 | 60 | if (strncmp(systab->signature, "ESIT", 4) != 0) { |
|---|
| 73 | 61 | printk(KERN_ERR "bad signature in ESI system table!"); |
|---|