aboutsummaryrefslogtreecommitdiff
path: root/util/x86emu/yabel/vbe.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-03-05 18:27:19 +0000
committerMyles Watson <mylesgw@gmail.com>2010-03-05 18:27:19 +0000
commitb0259117f214a80d1ca945bd1fe05b6b3d9858a9 (patch)
tree50f607aa8d8ac00d7b10fe970cea756d7e2470c3 /util/x86emu/yabel/vbe.c
parentf98ad3ace0852159c6e716a5563a9c3df8cf76f3 (diff)
1. Move run_bios prototype to device.h
2. Use time.h for get_time() and move tb_freq into functions.c 3. Move read_io and write_io to io.c and make them static 4. Make a couple of functions static in interrupt.c 5. Refactor a cast from char[] to u64 to get rid of potential alignment problems and a warning Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5191 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/yabel/vbe.c')
-rw-r--r--util/x86emu/yabel/vbe.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/util/x86emu/yabel/vbe.c b/util/x86emu/yabel/vbe.c
index 11a1ece73d..6326a9c214 100644
--- a/util/x86emu/yabel/vbe.c
+++ b/util/x86emu/yabel/vbe.c
@@ -570,8 +570,17 @@ vbe_get_info(void)
sizeof(ddc_info.edid_block_zero));
}
#endif
- if (*((u64 *) ddc_info.edid_block_zero) !=
- (u64) 0x00FFFFFFFFFFFF00ULL) {
+/* This could fail because of alignment issues, so use a longer form.
+ *((u64 *) ddc_info.edid_block_zero) != (u64) 0x00FFFFFFFFFFFF00ULL
+*/
+ if (ddc_info.edid_block_zero[0] != 0x00 ||
+ ddc_info.edid_block_zero[1] != 0xFF ||
+ ddc_info.edid_block_zero[2] != 0xFF ||
+ ddc_info.edid_block_zero[3] != 0xFF ||
+ ddc_info.edid_block_zero[4] != 0xFF ||
+ ddc_info.edid_block_zero[5] != 0xFF ||
+ ddc_info.edid_block_zero[6] != 0xFF ||
+ ddc_info.edid_block_zero[7] != 0x00 ) {
// invalid EDID signature... probably no monitor
output->display_type = 0x0;