Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2020 17:39:02 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ee938b20335d - main - kern: efirt: correct configuration table entry size
Message-ID:  <202012291739.0BTHd2ji001052@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kevans:

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

commit ee938b20335d26ca652deac4a1a063e90cafa303
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2020-12-27 17:26:45 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2020-12-29 17:38:34 +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
    
    Reviewed by:    kib
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D27669
---
 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 269eb67cf01f..fbb8f605c202 100644
--- a/sys/dev/efidev/efirt.c
+++ b/sys/dev/efidev/efirt.c
@@ -325,7 +325,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 b9f31454efff..220509853cb2 100644
--- a/sys/sys/efi.h
+++ b/sys/sys/efi.h
@@ -52,7 +52,7 @@ typedef unsigned long efi_status;
 
 struct efi_cfgtbl {
 	struct uuid	ct_uuid;
-	uint64_t	ct_data;
+	void		*ct_data;
 };
 
 struct efi_md {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012291739.0BTHd2ji001052>