Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2018-11-12T20:20:36Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
08f1a6d
Parents:
15639ec
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-12 20:09:40)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-12 20:20:36)
Message:

Remove realmode VESA code

This simply enables framebuffer setup via multiboot1
(multiboot2 already did it), and removes the obsolete code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/multiboot/multiboot.c

    r15639ec r8781e9d  
    3535#include <typedefs.h>
    3636#include <genarch/multiboot/multiboot.h>
     37#include <genarch/fb/bfb.h>
    3738#include <config.h>
    3839#include <stddef.h>
     
    168169                multiboot_memmap(info->mmap_length,
    169170                    (multiboot_memmap_t *) MULTIBOOT_PTR(info->mmap_addr));
     171
     172#ifdef CONFIG_FB
     173
     174        /* Initialize framebuffer. */
     175        if ((info->flags & MULTIBOOT_INFO_FLAGS_FB) != 0) {
     176                if (info->framebuffer_type != 1) {
     177                        /* Can't use this framebuffer. */
     178                        // FIXME: framebuffer_type == 2 is EGA mode, we should be able to use that.
     179                        return;
     180                }
     181
     182                bfb_addr = info->framebuffer_addr;
     183                bfb_width = info->framebuffer_width;
     184                bfb_height = info->framebuffer_height;
     185                bfb_bpp = info->framebuffer_bpp;
     186                bfb_scanline = info->framebuffer_pitch;
     187                bfb_red_pos = info->framebuffer_red_field_position;
     188                bfb_red_size = info->framebuffer_red_mask_size;
     189                bfb_green_pos = info->framebuffer_green_field_position;
     190                bfb_green_size = info->framebuffer_green_mask_size;
     191                bfb_blue_pos = info->framebuffer_blue_field_position;
     192                bfb_blue_size = info->framebuffer_blue_mask_size;
     193        }
     194
     195#endif
    170196}
    171197
Note: See TracChangeset for help on using the changeset viewer.