Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/ia64 ia64: Make ct_data void *, not uint64_t, as in...



details:   https://anonhg.NetBSD.org/src/rev/33c7b632c7e6
branches:  trunk
changeset: 369478:33c7b632c7e6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Aug 20 10:54:25 2022 +0000

description:
ia64: Make ct_data void *, not uint64_t, as in spec.

diffstat:

 sys/arch/ia64/ia64/efi.c    |  8 +++++---
 sys/arch/ia64/include/efi.h |  4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 84b607cbc83f -r 33c7b632c7e6 sys/arch/ia64/ia64/efi.c
--- a/sys/arch/ia64/ia64/efi.c  Sat Aug 20 10:35:50 2022 +0000
+++ b/sys/arch/ia64/ia64/efi.c  Sat Aug 20 10:54:25 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi.c,v 1.3 2022/08/20 10:35:50 riastradh Exp $        */
+/*     $NetBSD: efi.c,v 1.4 2022/08/20 10:54:25 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -109,8 +109,10 @@
        count = efi_systbl->st_entries;
        ct = efi_cfgtbl;
        while (count--) {
-               if (!memcmp(&ct->ct_uuid, uuid, sizeof(*uuid)))
-                       return ((void *)IA64_PHYS_TO_RR7(ct->ct_data));
+               if (!memcmp(&ct->ct_uuid, uuid, sizeof(*uuid))) {
+                       uint64_t data_pa = (uint64_t)(uintptr_t)ct->ct_data;
+                       return ((void *)IA64_PHYS_TO_RR7(data_pa));
+               }
                ct++;
        }
        return (NULL);
diff -r 84b607cbc83f -r 33c7b632c7e6 sys/arch/ia64/include/efi.h
--- a/sys/arch/ia64/include/efi.h       Sat Aug 20 10:35:50 2022 +0000
+++ b/sys/arch/ia64/include/efi.h       Sat Aug 20 10:54:25 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi.h,v 1.4 2022/08/20 10:35:50 riastradh Exp $        */
+/*     $NetBSD: efi.h,v 1.5 2022/08/20 10:54:25 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -52,7 +52,7 @@
 
 struct efi_cfgtbl {
        struct uuid     ct_uuid;
-       uint64_t        ct_data;
+       void            *ct_data;
 };
 
 struct efi_md {



Home | Main Index | Thread Index | Old Index