mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
ARM64: fix DMAP calculation
Use arithmetic operators instead of logical. This fixes
DMAP ranges calculation for ThunderX Dual Socket.
Obtained from: Semihalf
Sponsored by: Cavium
Reviewed by: zbb
Differential Revision: https://reviews.freebsd.org/D7023
Approved by: re (gjb)
This commit is contained in:
parent
31fe4e62fa
commit
e46f2622b4
1 changed files with 2 additions and 2 deletions
|
|
@ -181,7 +181,7 @@
|
|||
KASSERT(PHYS_IN_DMAP(pa), \
|
||||
("%s: PA out of range, PA: 0x%lx", __func__, \
|
||||
(vm_paddr_t)(pa))); \
|
||||
((pa) - dmap_phys_base) | DMAP_MIN_ADDRESS; \
|
||||
((pa) - dmap_phys_base) + DMAP_MIN_ADDRESS; \
|
||||
})
|
||||
|
||||
#define DMAP_TO_PHYS(va) \
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
KASSERT(VIRT_IN_DMAP(va), \
|
||||
("%s: VA out of range, VA: 0x%lx", __func__, \
|
||||
(vm_offset_t)(va))); \
|
||||
((va) & ~DMAP_MIN_ADDRESS) + dmap_phys_base; \
|
||||
((va) - DMAP_MIN_ADDRESS) + dmap_phys_base; \
|
||||
})
|
||||
|
||||
#define VM_MIN_USER_ADDRESS (0x0000000000000000UL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue