git: 4c63cc766f30 - stable/12 - kern: efirt: correct configuration table entry size

Kyle Evans kevans at FreeBSD.org
Sun Jan 10 05:59:02 UTC 2021


The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=4c63cc766f30781dadf1e164e7137de95108ff25

commit 4c63cc766f30781dadf1e164e7137de95108ff25
Author:     Kyle Evans <kevans at FreeBSD.org>
AuthorDate: 2020-12-27 17:26:45 +0000
Commit:     Kyle Evans <kevans at FreeBSD.org>
CommitDate: 2021-01-10 05:58:55 +0000

    kern: efirt: correct configuration table entry size
    
    Each entry actually stores a native pointer, not a uint64_t quantity. While
    we're here, go ahead and export the pointer as-is rather than converting it
    to KVA. This may be more useful as consumers can map /dev/mem and observe
    the entry.
    
    For reference, see: sys/contrib/edk2/Include/Uefi/UefiSpec.h
    
    (cherry picked from commit ee938b20335d26ca652deac4a1a063e90cafa303)
---
 sys/dev/efidev/efirt.c | 2 +-
 sys/sys/efi.h          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c
index 9eaaba9801fd..f9c01242d1a0 100644
--- a/sys/dev/efidev/efirt.c
+++ b/sys/dev/efidev/efirt.c
@@ -296,7 +296,7 @@ efi_get_table(struct uuid *uuid, void **ptr)
 	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);
 		}
diff --git a/sys/sys/efi.h b/sys/sys/efi.h
index 622df48e7f32..9460030bb5c2 100644
--- a/sys/sys/efi.h
+++ b/sys/sys/efi.h
@@ -51,7 +51,7 @@ typedef unsigned long efi_status;
 
 struct efi_cfgtbl {
 	struct uuid	ct_uuid;
-	uint64_t	ct_data;
+	void		*ct_data;
 };
 
 struct efi_md {


More information about the dev-commits-src-branches mailing list