Changeset 115


Ignore:
Timestamp:
Mar 26, 2010, 12:59:14 PM (4 years ago)
Author:
stepan
Message:

linux loader support for fb only mode
(not fully functional, but does not break anything either)
Signed-off-by: Stefan Reinauer <stepan@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/filo/i386/linux_load.c

    r108 r115  
    2828#include <libpayload.h> 
    2929#include <libpayload-config.h> 
     30#include <coreboot_tables.h> 
    3031#include <config.h> 
    3132#include <fs.h> 
     
    298299} 
    299300 
     301/* Video mode */ 
     302static void 
     303set_video_mode(struct linux_params *params) 
     304{ 
     305#if CONFIG_COREBOOT_VIDEO_CONSOLE 
     306        /* Are we running on a framebuffer console? */ 
     307        if (!lib_sysinfo.framebuffer) 
     308                return; 
     309 
     310        params->lfb_width = lib_sysinfo.framebuffer->x_resolution; 
     311        params->lfb_height = lib_sysinfo.framebuffer->y_resolution; 
     312        params->lfb_depth = lib_sysinfo.framebuffer->bits_per_pixel; 
     313        params->lfb_linelength = lib_sysinfo.framebuffer->bytes_per_line; 
     314        params->lfb_base = lib_sysinfo.framebuffer->physical_address; 
     315        // prolly not enough for the boot splash?! 
     316        params->lfb_size = (params->lfb_linelength * params->lfb_height + 65535 ) >> 16; 
     317        params->red_size = lib_sysinfo.framebuffer->red_mask_size; 
     318        params->red_pos = lib_sysinfo.framebuffer->red_mask_pos; 
     319        params->green_size = lib_sysinfo.framebuffer->green_mask_size; 
     320        params->green_pos = lib_sysinfo.framebuffer->green_mask_pos; 
     321        params->blue_size = lib_sysinfo.framebuffer->blue_mask_size; 
     322        params->blue_pos = lib_sysinfo.framebuffer->blue_mask_pos; 
     323        params->rsvd_size = lib_sysinfo.framebuffer->reserved_mask_size; 
     324        params->rsvd_pos = lib_sysinfo.framebuffer->reserved_mask_pos; 
     325#endif 
     326} 
     327 
    300328/* 
    301329 * Parse command line 
     
    668696    init_linux_params(params, &hdr); 
    669697    set_memory_size(params); 
     698    set_video_mode(params); 
    670699    initrd_file = parse_command_line(cmdline, phys_to_virt(COMMAND_LINE_LOC)); 
    671700    set_command_line_loc(params, &hdr); 
Note: See TracChangeset for help on using the changeset viewer.