[coreboot] Geode LX VGA BIOS Patch
Chris Kindt
chriskindt at umbc.edu
Sun Sep 13 21:48:58 CEST 2009
Kevin O'Connor wrote:
> As before, the main seabios patch looks good to me. The "modehack"
> patch, of course, needs to be cleaned up before committing. Are you
> still working on this?
>
> -Kevin
>
Yes, it is on my todo list. I was thinking about using a device
operations structure or macros to replace the "if(hw_type)"
statements. This might be overkill at the moment, however it would
be helpful for any future hardware specific expansion. I am lacking
insight on what such a struct should be. The following example is
crafted mostly to fix the current problems I am having.
struct videoDevice {
int (*present) (void); /* check for existence */
void (*enable) (int); /* enable device/mode */
void (*pre_init) (void);
void (*post_init) (void);
void (*set_mode) (u8 mode);
struct VideoParam_s *vga_param_table[];
struct vgamode_s *vga_mode_table[];
void *hw_tables;
};
struct videoDevice geodelx = {
.present = legacyio_check,
.pre_init = geodelx_init,
.post_init = geodelx_demo,
.vga_param_table = lx_param_table,
.vga_mode_table = lx_mode_table,
};
struct videoDevice cirrus = {
.pre_init = cirrus_init,
.set_mode = cirrus_set_video_mode,
.hw_tables = cirrus_modes,
};
struct videoDevice vbe = {
.present = vbe_has_vbe_display,
.enable = dispi_set_enable,
.pre_init = vbe_init,
.hw_tables = vbe_modes,
};
Let me know what you think and I can work on a patch,
Chris Kindt
More information about the coreboot
mailing list