|
AquilaOS documentation
How it works, and its code
|
The VESA framebuffer: the linear framebuffer that the boot loader set up, as /dev/fb0. More...
#include <core/system.h>#include <dev/fbdev.h>#include <fs/devfs.h>#include <video/vesa.h>#include <mm/vm.h>Go to the source code of this file.
Functions | |
| static ssize_t | fbdev_vesa_write (struct fbdev *fb, off_t offset, struct iobuf *io) |
| Writes to the framebuffer at offset, as much as fits before its end. | |
| static int | fbdev_vesa_map (struct fbdev *fb, struct vm_space *vm_space, struct vm_entry *vm_entry) |
| Maps the framebuffer, or part of it, into a process's address space. | |
| static int | fbdev_vesa_prope (int i, struct fbdev *fb) |
| Sets up the framebuffer from the mode the boot loader chose: maps it into the kernel's address space, and fills in its screen information for ioctl(). | |
Variables | |
| static char * | vmem = (char *) ARCH_VESA_BASE |
| static struct vm_entry | vesa_vm |
| static size_t | len = 0 |
| static struct fb_fix_screeninfo | vesa_fix_screeninfo |
| static struct fb_var_screeninfo | vesa_var_screeninfo |
| struct fbdev | fbdev_vesa |
The VESA framebuffer: the linear framebuffer that the boot loader set up, as /dev/fb0.
The boot loader chose the video mode and gave its description (a VBE mode info block). This driver maps the framebuffer into the kernel's address space, at ARCH_VESA_BASE, and describes it with Linux's framebuffer structures. The mode can't be changed. A process can write to the framebuffer, or map it into its own address space (a shared mapping only).
Definition in file vesa.c.
|
static |
Maps the framebuffer, or part of it, into a process's address space.
Only a shared mapping is possible (ENOTSUP for a private one), and it must lie within the framebuffer (ENXIO otherwise).
Definition at line 52 of file vesa.c.
References fb, fb_size, fbdev_vesa_map(), vm_entry::flags, vm_entry::off, vm_entry::paddr, PAGE_ROUND, vm_entry::size, vesa_vm, vm_map(), and VM_SHARED.
Referenced by fbdev_vesa_map(), and fbdev_vesa_prope().
|
static |
Sets up the framebuffer from the mode the boot loader chose: maps it into the kernel's address space, and fills in its screen information for ioctl().
Returns 0, or a negative errno if it can't be mapped, and then the framebuffer stays unusable (its writes fail).
Definition at line 73 of file vesa.c.
References mode_info_block::bits_per_pixel, mode_info_block::blue_field_position, mode_info_block::blue_mask_size, fbdev::data, fb, fbdev_vesa_map(), fbdev_vesa_prope(), fbdev_vesa_write(), fbdev::fix_screeninfo, vm_entry::flags, mode_info_block::green_field_position, mode_info_block::green_mask_size, kvm_space, len, mode_info_block::lin_bytes_per_scanline, fbdev::map, fbdev_vesa::mode_info, vm_entry::paddr, mode_info_block::phys_base_ptr, printk(), fbdev::probe, mode_info_block::red_field_position, mode_info_block::red_mask_size, vm_entry::size, fbdev::var_screeninfo, vesa_fix_screeninfo, vesa_var_screeninfo, vesa_vm, VM_KRW, vm_map(), fbdev::write, mode_info_block::x_resolution, and mode_info_block::y_resolution.
Referenced by fbdev_vesa_prope().
Writes to the framebuffer at offset, as much as fits before its end.
Returns how much was written, 0 past the end.
Definition at line 37 of file vesa.c.
References fb, fbdev_vesa_write(), iobuf_in(), len, MIN, and iobuf::resid.
Referenced by fbdev_vesa_prope(), and fbdev_vesa_write().
| struct fbdev fbdev_vesa |
|
static |
Definition at line 27 of file vesa.c.
Referenced by fbdev_vesa_prope(), and fbdev_vesa_write().
|
static |
Definition at line 29 of file vesa.c.
Referenced by fbdev_vesa_prope().
|
static |
Definition at line 33 of file vesa.c.
Referenced by fbdev_vesa_prope().
|
static |
Definition at line 22 of file vesa.c.
Referenced by fbdev_vesa_map(), and fbdev_vesa_prope().
|
static |