log at access to framebuffer
John F Carr
jfc at mit.edu
Mon Mar 16 02:22:11 UTC 2020
Setting D_MEM hides the message but does not fix the underlying problem. Each page has a byte of metadata saying how cacheable it is. The cacheability reported by the device driver is inconsistent with the cacheability in the page tables.
creator.c is not used on ARM. It is for Sun "Creator" graphics on machines that are no longer supported after FreeBSD 12.
> On Mar 15, 2020, at 21:28 , Mori Hiroki <yamori813 at yahoo.co.jp> wrote:
>
> Hi
>
> I write data to framebuffer then I get this log on console.
>
> WARNING: Device driver fb has set "memattr" inconsistently (drv 0 pmap 3).
>
>
> I want delete this log. I make patch to fb. Is this correct ?
>
> diff --git a/sys/dev/fb/creator.c b/sys/dev/fb/creator.c
> index 2fd0bd10597..0f8d997a887 100644
> --- a/sys/dev/fb/creator.c
> +++ b/sys/dev/fb/creator.c
> @@ -184,7 +184,7 @@static d_mmap_t creator_fb_mmap;
>
> static struct cdevsw creator_fb_devsw = {
> .d_version = D_VERSION,
> - .d_flags = D_NEEDGIANT,
> + .d_flags = D_MEM | D_NEEDGIANT,
> .d_open = creator_fb_open,
> .d_close = creator_fb_close,
> .d_ioctl = creator_fb_ioctl,
> diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
> index 2f821c8b65f..98bf7a4e58e 100644
> --- a/sys/dev/fb/fb.c
> +++ b/sys/dev/fb/fb.c
> @@ -365,7 +365,7 @@static d_mmap_t fbmmap;
>
> static struct cdevsw fb_cdevsw = {
> .d_version = D_VERSION,
> - .d_flags = D_NEEDGIANT,
> + .d_flags = D_MEM | D_NEEDGIANT,
> .d_open = fbopen,
> .d_close = fbclose,
> .d_read = fbread,
> diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c
> index 02b8eb3ada4..8298d95def3 100644
> --- a/sys/dev/fb/fbd.c
> +++ b/sys/dev/fb/fbd.c
> @@ -84,7 +84,7 @@static d_mmap_t fb_mmap;
>
> static struct cdevsw fb_cdevsw = {
> .d_version = D_VERSION,
> - .d_flags = D_NEEDGIANT,
> + .d_flags = D_MEM | D_NEEDGIANT,
> .d_open = fb_open,
> .d_close = fb_close,
>
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
More information about the freebsd-arm
mailing list