diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -314,18 +314,25 @@ { struct efi_cfgtbl *ct; u_long count; + int error; if (efi_cfgtbl == NULL || efi_systbl == NULL) return (ENXIO); + error = efi_enter(); + if (error != 0) + return (error); count = efi_systbl->st_entries; ct = efi_cfgtbl; while (count--) { if (!bcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) { - *ptr = (void *)efi_phys_to_kva(ct->ct_data); + *ptr = ct->ct_data; + efi_leave(); return (0); } ct++; } + + efi_leave(); return (ENOENT); } diff --git a/sys/sys/efi.h b/sys/sys/efi.h --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -52,7 +52,7 @@ struct efi_cfgtbl { struct uuid ct_uuid; - uint64_t ct_data; + void *ct_data; }; struct efi_md {