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: Use uint64_t, not void *, for EFI virtua...



details:   https://anonhg.NetBSD.org/src/rev/84b607cbc83f
branches:  trunk
changeset: 369477:84b607cbc83f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Aug 20 10:35:50 2022 +0000

description:
ia64: Use uint64_t, not void *, for EFI virtual addresses, as in spec.

diffstat:

 sys/arch/ia64/ia64/efi.c                |   6 +++---
 sys/arch/ia64/include/efi.h             |   4 ++--
 sys/arch/ia64/stand/ia64/ski/efi_stub.c |  12 ++++++------
 3 files changed, 11 insertions(+), 11 deletions(-)

diffs (88 lines):

diff -r 3c0d4cf1a0df -r 84b607cbc83f sys/arch/ia64/ia64/efi.c
--- a/sys/arch/ia64/ia64/efi.c  Sat Aug 20 09:43:27 2022 +0000
+++ b/sys/arch/ia64/ia64/efi.c  Sat Aug 20 10:35:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi.c,v 1.2 2006/08/30 11:12:04 cherry Exp $   */
+/*     $NetBSD: efi.c,v 1.3 2022/08/20 10:35:50 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -85,10 +85,10 @@
                if (md->md_attr & EFI_MD_ATTR_RT) {
                        if (md->md_attr & EFI_MD_ATTR_WB)
                                md->md_virt =
-                                   (void *)IA64_PHYS_TO_RR7(md->md_phys);
+                                   (uint64_t)IA64_PHYS_TO_RR7(md->md_phys);
                        else if (md->md_attr & EFI_MD_ATTR_UC)
                                md->md_virt =
-                                   (void *)IA64_PHYS_TO_RR6(md->md_phys);
+                                   (uint64_t)IA64_PHYS_TO_RR6(md->md_phys);
                }
                md = efi_md_next(md);
        }
diff -r 3c0d4cf1a0df -r 84b607cbc83f sys/arch/ia64/include/efi.h
--- a/sys/arch/ia64/include/efi.h       Sat Aug 20 09:43:27 2022 +0000
+++ b/sys/arch/ia64/include/efi.h       Sat Aug 20 10:35:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi.h,v 1.3 2022/08/20 09:40:22 riastradh Exp $        */
+/*     $NetBSD: efi.h,v 1.4 2022/08/20 10:35:50 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -73,7 +73,7 @@
 #define        EFI_MD_TYPE_PALCODE     13      /* PAL */
        uint32_t        __pad;
        uint64_t        md_phys;
-       void            *md_virt;
+       uint64_t        md_virt;
        uint64_t        md_pages;
        uint64_t        md_attr;
 #define        EFI_MD_ATTR_UC          0x0000000000000001UL
diff -r 3c0d4cf1a0df -r 84b607cbc83f sys/arch/ia64/stand/ia64/ski/efi_stub.c
--- a/sys/arch/ia64/stand/ia64/ski/efi_stub.c   Sat Aug 20 09:43:27 2022 +0000
+++ b/sys/arch/ia64/stand/ia64/ski/efi_stub.c   Sat Aug 20 10:35:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efi_stub.c,v 1.4 2012/12/27 20:21:51 martin Exp $      */
+/*     $NetBSD: efi_stub.c,v 1.5 2022/08/20 10:35:50 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2003,2004 Marcel Moolenaar
@@ -183,7 +183,7 @@
 {
        uint64_t delta;
 
-       delta = (uintptr_t)memmap->md_virt - memmap->md_phys;
+       delta = memmap->md_virt - memmap->md_phys;
        Reloc(&efi_rttab.rt_gettime, delta);
        Reloc(&efi_rttab.rt_settime, delta);
        return (0);             /* Hah... */
@@ -246,25 +246,25 @@
 
        memp[0].md_type = EFI_MD_TYPE_PALCODE;
        memp[0].md_phys = 0x100000;
-       memp[0].md_virt = NULL;
+       memp[0].md_virt = 0;
        memp[0].md_pages = (4L*1024*1024)>>12;
        memp[0].md_attr = EFI_MD_ATTR_WB | EFI_MD_ATTR_RT;
 
        memp[1].md_type = EFI_MD_TYPE_FREE;
        memp[1].md_phys = 5L*1024*1024;
-       memp[1].md_virt = NULL;
+       memp[1].md_virt = 0;
        memp[1].md_pages = (128L*1024*1024)>>12;
        memp[1].md_attr = EFI_MD_ATTR_WB;
 
        memp[2].md_type = EFI_MD_TYPE_FREE;
        memp[2].md_phys = 4L*1024*1024*1024;
-       memp[2].md_virt = NULL;
+       memp[2].md_virt = 0;
        memp[2].md_pages = (64L*1024*1024)>>12;
        memp[2].md_attr = EFI_MD_ATTR_WB;
 
        memp[3].md_type = EFI_MD_TYPE_IOPORT;
        memp[3].md_phys = 0xffffc000000;
-       memp[3].md_virt = NULL;
+       memp[3].md_virt = 0;
        memp[3].md_pages = (64L*1024*1024)>>12;
        memp[3].md_attr = EFI_MD_ATTR_UC;
 



Home | Main Index | Thread Index | Old Index