mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
Override memattr for mmap on the Freescale DIU driver
The Display Interface Unit (DIU) uses main memory for the framebuffer, which is already mapped as cache coherent physical memory. Prevent mmap() from using its own attributes which may otherwise conflict.
This commit is contained in:
parent
78baa4d625
commit
89c3a53299
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326453
@ -414,6 +414,8 @@ diu_attach(device_t dev)
|
|||||||
sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size,
|
sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size,
|
||||||
M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0);
|
M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0);
|
||||||
sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase);
|
sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase);
|
||||||
|
sc->sc_info.fb_flags = FB_FLAG_MEMATTR;
|
||||||
|
sc->sc_info.fb_memattr = VM_MEMATTR_DEFAULT;
|
||||||
|
|
||||||
/* Gamma table is 3 consecutive segments of 256 bytes. */
|
/* Gamma table is 3 consecutive segments of 256 bytes. */
|
||||||
sc->sc_gamma = contigmalloc(3 * 256, M_DEVBUF, 0, 0,
|
sc->sc_gamma = contigmalloc(3 * 256, M_DEVBUF, 0, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user