How to give a user space program direct access to the frame buffer? #1389
-
I can do this:
But is the frame buffer guaranteed to have phys frames all to itself? I am worried about the same phys frames used by the frame buffer also containing other memory that shouldn't be exposed to user space. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I did some research and it looks like the frame buffer could have phys frames all to itself, but is not guaranteed to. I only tested it on qemu (with BIOS and UEFI) and in both the frame buffer was aligned to 4096 bytes and was a multiple of 4096 bytes so the frame buffer can be mapped to user accessible pages to share it with user space. I did not test it on any other computer though (but I will test it on robo360 running coreboot). If the frame buffer is not aligned to 4096 bytes and not a multiple of 4096 bytes, then the only secure way is for the kernel to copy memory from user accessible memory to the frame buffer. Update: I tested it on the Jinlon Chromebook running MrChromebox firmware and it also has a framebuffer which is a multiple of 4096 bytes. |
Beta Was this translation helpful? Give feedback.
I did some research and it looks like the frame buffer could have phys frames all to itself, but is not guaranteed to. I only tested it on qemu (with BIOS and UEFI) and in both the frame buffer was aligned to 4096 bytes and was a multiple of 4096 bytes so the frame buffer can be mapped to user accessible pages to share it with user space. I did not test it on any other computer though (but I will test it on robo360 running coreboot).
If the frame buffer is not aligned to 4096 bytes and not a multiple of 4096 bytes, then the only secure way is for the kernel to copy memory from user accessible memory to the frame buffer.
Update: I tested it on the Jinlon Chromebook running MrChromebox firm…