summaryrefslogtreecommitdiff
path: root/util/x86emu/yabel/vbe.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2010-03-05 10:03:50 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-05 10:03:50 +0000
commit01ce601bdb4e664b502e8816a3e13e7b1d275e50 (patch)
treea79fb9dd4ab50ce103fb6d20177460c96445bdc9 /util/x86emu/yabel/vbe.c
parent5fa76e2864fada5a87d210a0b994a55f8a235024 (diff)
downloadcoreboot-01ce601bdb4e664b502e8816a3e13e7b1d275e50.tar.xz
This patch is from 2009-10-20
Convert all DEBUG_SMBUS, DEBUG_SMI, and DEBUG_RAM_SETUP custom and local #defines into globally configurable kconfig options (and Options.lb options for as long as newconfig still exists) which can be enabled by the user in the "Debugging" menu. The respective menu items only appear if a board is selected where the chipset code actually provides such additional DEBUG output. All three variables default to 0 / off for now. Also, drop a small chunk of dead/useless code in the src/northbridge/via/cn700/raminit.c file, which would otherwise break compilation. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Reworked to still apply to trunk, added X86EMU_DEBUG (and make the x86emu/yabel code only work printf instead of a redefined version of printk and Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5185 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/yabel/vbe.c')
-rw-r--r--util/x86emu/yabel/vbe.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/util/x86emu/yabel/vbe.c b/util/x86emu/yabel/vbe.c
index 6814b1964f..11a1ece73d 100644
--- a/util/x86emu/yabel/vbe.c
+++ b/util/x86emu/yabel/vbe.c
@@ -154,7 +154,7 @@ vbe_prepare(void)
}
// VBE Function 00h
-u8
+static u8
vbe_info(vbe_info_t * info)
{
vbe_prepare();
@@ -223,7 +223,7 @@ vbe_info(vbe_info_t * info)
}
// VBE Function 01h
-u8
+static u8
vbe_get_mode_info(vbe_mode_info_t * mode_info)
{
vbe_prepare();
@@ -264,7 +264,7 @@ vbe_get_mode_info(vbe_mode_info_t * mode_info)
}
// VBE Function 02h
-u8
+static u8
vbe_set_mode(vbe_mode_info_t * mode_info)
{
vbe_prepare();
@@ -301,7 +301,7 @@ vbe_set_mode(vbe_mode_info_t * mode_info)
}
//VBE Function 08h
-u8
+static u8
vbe_set_palette_format(u8 format)
{
vbe_prepare();
@@ -337,7 +337,7 @@ vbe_set_palette_format(u8 format)
}
// VBE Function 09h
-u8
+static u8
vbe_set_color(u16 color_number, u32 color_value)
{
vbe_prepare();
@@ -379,7 +379,7 @@ vbe_set_color(u16 color_number, u32 color_value)
return 0;
}
-u8
+static u8
vbe_get_color(u16 color_number, u32 * color_value)
{
vbe_prepare();
@@ -422,7 +422,7 @@ vbe_get_color(u16 color_number, u32 * color_value)
}
// VBE Function 15h
-u8
+static u8
vbe_get_ddc_info(vbe_ddc_info_t * ddc_info)
{
vbe_prepare();
@@ -496,7 +496,7 @@ vbe_get_ddc_info(vbe_ddc_info_t * ddc_info)
return 0;
}
-u32
+static u32
vbe_get_info(void)
{
u8 rval;
@@ -571,7 +571,7 @@ vbe_get_info(void)
}
#endif
if (*((u64 *) ddc_info.edid_block_zero) !=
- (u64) 0x00FFFFFFFFFFFF00) {
+ (u64) 0x00FFFFFFFFFFFF00ULL) {
// invalid EDID signature... probably no monitor
output->display_type = 0x0;
@@ -599,36 +599,36 @@ vbe_get_info(void)
DEBUG_PRINTF_VBE("Video Mode 0x%04x available, %s\n",
mode_info.video_mode,
- (mode_info.attributes & 0x1) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x1) ==
0 ? "not supported" : "supported");
DEBUG_PRINTF_VBE("\tTTY: %s\n",
- (mode_info.attributes & 0x4) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x4) ==
0 ? "no" : "yes");
DEBUG_PRINTF_VBE("\tMode: %s %s\n",
- (mode_info.attributes & 0x8) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x8) ==
0 ? "monochrome" : "color",
- (mode_info.attributes & 0x10) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x10) ==
0 ? "text" : "graphics");
DEBUG_PRINTF_VBE("\tVGA: %s\n",
- (mode_info.attributes & 0x20) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x20) ==
0 ? "compatible" : "not compatible");
DEBUG_PRINTF_VBE("\tWindowed Mode: %s\n",
- (mode_info.attributes & 0x40) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x40) ==
0 ? "yes" : "no");
DEBUG_PRINTF_VBE("\tFramebuffer: %s\n",
- (mode_info.attributes & 0x80) ==
+ (le16_to_cpu(mode_info.vesa.mode_attributes) & 0x80) ==
0 ? "no" : "yes");
DEBUG_PRINTF_VBE("\tResolution: %dx%d\n",
- mode_info.x_resolution,
- mode_info.y_resolution);
+ le16_to_cpu(mode_info.vesa.x_resolution),
+ le16_to_cpu(mode_info.vesa.y_resolution));
DEBUG_PRINTF_VBE("\tChar Size: %dx%d\n",
- mode_info.x_charsize, mode_info.y_charsize);
+ mode_info.vesa.x_charsize, mode_info.vesa.y_charsize);
DEBUG_PRINTF_VBE("\tColor Depth: %dbpp\n",
- mode_info.bits_per_pixel);
+ mode_info.vesa.bits_per_pixel);
DEBUG_PRINTF_VBE("\tMemory Model: 0x%x\n",
- mode_info.memory_model);
+ mode_info.vesa.memory_model);
DEBUG_PRINTF_VBE("\tFramebuffer Offset: %08x\n",
- mode_info.framebuffer_address);
+ le32_to_cpu(mode_info.vesa.phys_base_ptr));
if ((mode_info.vesa.bits_per_pixel == input.color_depth)
&& (le16_to_cpu(mode_info.vesa.x_resolution) <= input.max_screen_width)
@@ -647,10 +647,10 @@ vbe_get_info(void)
DEBUG_PRINTF_VBE
("Best Video Mode found: 0x%x, %dx%d, %dbpp, framebuffer_address: 0x%x\n",
best_mode_info.video_mode,
- best_mode_info.x_resolution,
- best_mode_info.y_resolution,
- best_mode_info.bits_per_pixel,
- best_mode_info.framebuffer_address);
+ best_mode_info.vesa.x_resolution,
+ best_mode_info.vesa.y_resolution,
+ best_mode_info.vesa.bits_per_pixel,
+ le32_to_cpu(best_mode_info.vesa.phys_base_ptr));
//printf("Mode Info Dump:");
//dump(best_mode_info.mode_info_block, 64);