diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-07-27 00:00:53 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-07-27 00:00:53 -0400 |
commit | 0e27e19e2ff2f61b8374a246398e4cf0ae7fc9bd (patch) | |
tree | d443565da2dd513b3cdd77db34f80ee93b035399 | |
parent | cadaf0e35d4530a0aa3f3100c3c0e5c96d9f0556 (diff) | |
download | seabios-0e27e19e2ff2f61b8374a246398e4cf0ae7fc9bd.tar.gz |
Cleanup bootsplash vesa signature detection.
-rw-r--r-- | src/bootsplash.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/bootsplash.c b/src/bootsplash.c index 9ff81b37..ed104159 100644 --- a/src/bootsplash.c +++ b/src/bootsplash.c @@ -19,7 +19,7 @@ struct vesa_info { - u8 vesa_signature[4]; + u32 vesa_signature; u16 vesa_version; struct segoff_s oem_string_ptr; u8 capabilities[4]; @@ -33,6 +33,9 @@ struct vesa_info u8 oem_data[256]; } PACKED; +#define VESA_SIGNATURE 0x41534556 // VESA +#define VBE2_SIGNATURE 0x32454256 // VBE2 + struct vesa_mode_info { u16 mode_attributes; @@ -132,16 +135,14 @@ void enable_vga_console(void) /* Check whether we have a VESA 2.0 compliant BIOS */ memset(vesa_info, 0, sizeof(struct vesa_info)); - memcpy(vesa_info, "VBE2", 4); - + vesa_info->vesa_signature = VBE2_SIGNATURE; struct bregs br; memset(&br, 0, sizeof(br)); br.ax = 0x4f00; br.di = FLATPTR_TO_OFFSET(vesa_info); br.es = FLATPTR_TO_SEG(vesa_info); call16_int10(&br); - - if (strcmp("VESA", (char *)vesa_info) != 0) { + if (vesa_info->vesa_signature != VESA_SIGNATURE) { dprintf(1,"No VBE2 found.\n"); goto gotext; } |