diff options
author | Ed Maste <emaste@FreeBSD.org> | 2014-11-11 14:59:46 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2014-11-11 14:59:46 +0000 |
commit | 96699e86a37f459f2ebb0992769220895c0872be (patch) | |
tree | 8943b3eaa41178fbbb3fc3cba4846aac9c56e321 /sys/amd64/include/vmparam.h | |
parent | 843c718fa7be4c86f09ccb85724c70fb926191a2 (diff) | |
download | src-96699e86a37f459f2ebb0992769220895c0872be.tar.gz src-96699e86a37f459f2ebb0992769220895c0872be.zip |
Add workaround for vt efifb's early use of PHYS_TO_DMAP
In vt_efifb_init the framebuffer's physaddr is passed to PHYS_TO_DMAP
before the DMAP is setup. The result is not actually accessed until
after the mapping is setup, though. Loosen the assertion in PHYS_TO_DMAP
for now, to allow use when dmaplimit == 0.
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1142
Notes
Notes:
svn path=/head/; revision=274382
Diffstat (limited to 'sys/amd64/include/vmparam.h')
-rw-r--r-- | sys/amd64/include/vmparam.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index b1b89b98d8f4..58cd694d6fdf 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -175,8 +175,14 @@ #define VM_MAX_ADDRESS UPT_MAX_ADDRESS #define VM_MIN_ADDRESS (0) +/* + * XXX Allowing dmaplimit == 0 is a temporary workaround for vt(4) efifb's + * early use of PHYS_TO_DMAP before the mapping is actually setup. This works + * because the result is not actually accessed until later, but the early + * vt fb startup needs to be reworked. + */ #define PHYS_TO_DMAP(x) ({ \ - KASSERT((x) < dmaplimit, \ + KASSERT(dmaplimit == 0 || (x) < dmaplimit, \ ("physical address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ (x) | DMAP_MIN_ADDRESS; }) |