Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107779494
D32962.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
986 B
Referenced Files
None
Subscribers
None
D32962.diff
View Options
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h
--- a/sys/amd64/include/vmparam.h
+++ b/sys/amd64/include/vmparam.h
@@ -239,16 +239,19 @@
* because the result is not actually accessed until later, but the early
* vt fb startup needs to be reworked.
*/
+#define PHYS_IN_DMAP(pa) (dmaplimit == 0 || (pa) < dmaplimit)
+#define VIRT_IN_DMAP(va) ((va) >= DMAP_MIN_ADDRESS && \
+ (va) < (DMAP_MIN_ADDRESS + dmaplimit))
+
#define PMAP_HAS_DMAP 1
#define PHYS_TO_DMAP(x) ({ \
- KASSERT(dmaplimit == 0 || (x) < dmaplimit, \
+ KASSERT(PHYS_IN_DMAP(x), \
("physical address %#jx not covered by the DMAP", \
(uintmax_t)x)); \
(x) | DMAP_MIN_ADDRESS; })
#define DMAP_TO_PHYS(x) ({ \
- KASSERT((x) < (DMAP_MIN_ADDRESS + dmaplimit) && \
- (x) >= DMAP_MIN_ADDRESS, \
+ KASSERT(VIRT_IN_DMAP(x), \
("virtual address %#jx not covered by the DMAP", \
(uintmax_t)x)); \
(x) & ~DMAP_MIN_ADDRESS; })
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 3:45 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15920400
Default Alt Text
D32962.diff (986 B)
Attached To
Mode
D32962: amd64: provide PHYS_IN_DMAP() and VIRT_IN_DMAP()
Attached
Detach File
Event Timeline
Log In to Comment