[Bug 288236] x11/nvidia-driver: nvidia_subr.c:1456:15: error: use of undeclared identifier 'DMAP_MIN_ADDRESS'

[email protected]
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288236

--- Comment #2 from Tomoaki AOKI <[email protected]> ---
(In reply to Konstantin Belousov from comment #1)
I prefer using KV4ADDR(DMPML4I, 0, 0, 0) and KV4ADDR(DMPML4I + NDMPML4E, 0, 0,
0), as
  *kva_layout.dmap_low and kva_layout.dmap_high are version dependent,
  *DMAP_MIN_ADDRESS is #define'ed with KV4ADDR(DMPML4I, 0, 0, 0) and
   DMAP_MAX_ADDRESS is #define'ed with KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0)
   on all supported versions of base.

And more, kva_layout.dmap_low and kva_layout.dmap_high are initialized with
KV4ADDR(DMPML4I, 0, 0, 0) and KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0)
respectively.
So, this way, I'll need to add REINPLACE_CMD without conditionals.

Anyway, I'm currently on full poudriere rebuilds caused by bump on stable/14,
so I need to wait at least nvidia-related ports finishes to be rebuilt.
(I'm sharing ports tree between bare-metal and poudriere.)


But considering possibility that other kmod ports are using DMAP_MIN_ADDRESS
and DMAP_MAX_ADDRESS, something like below would be considerable, too.

How do you think?


--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -184,6 +184,9 @@
 #define        VM_MIN_KERNEL_ADDRESS_LA48      KV4ADDR(KPML4BASE, 0, 0, 0)
 #define        VM_MIN_KERNEL_ADDRESS           kva_layout.km_low
 #define        VM_MAX_KERNEL_ADDRESS           kva_layout.km_high
+
+#define        DMAP_MIN_ADDRESS        kva_layout.dmap_low
+#define        DMAP_MAX_ADDRESS        kva_layout.dmap_high

 #define        KASAN_MIN_ADDRESS       KV4ADDR(KASANPML4I, 0, 0, 0)
 #define        KASAN_MAX_ADDRESS       KV4ADDR(KASANPML4I + NKASANPML4E, 0, 0,
0)

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.