[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-4.1-testing] x86/EDD: check MBR for BIOS magic before considering signature valid
# HG changeset patch # User Jan Beulich <JBeulich@xxxxxxxx> # Date 1346762742 -7200 # Node ID 3fe75068fa354d347029d20210d49c765babedac # Parent 060fbf05ce532d86314bd9db96fe9510495abed3 x86/EDD: check MBR for BIOS magic before considering signature valid Signed-off-by: Jan Beulich <JBeulich@xxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> xen-unstable changeset: 25431:cdced279e792 xen-unstable date: Thu May 31 08:18:13 UTC 2012 --- diff -r 060fbf05ce53 -r 3fe75068fa35 xen/arch/x86/boot/edd.S --- a/xen/arch/x86/boot/edd.S Tue Sep 04 14:44:37 2012 +0200 +++ b/xen/arch/x86/boot/edd.S Tue Sep 04 14:45:42 2012 +0200 @@ -61,12 +61,16 @@ edd_mbr_sig_read: jc edd_mbr_sig_done # on failure, we're done. cmpb $0, %ah # some BIOSes do not set CF jne edd_mbr_sig_done # on failure, we're done. + cmpw $0xaa55, bootsym(boot_edd_info)+0x1fe + jne .Ledd_mbr_sig_next movl bootsym(boot_edd_info)+EDD_MBR_SIG_OFFSET,%eax movb %dl, (%bx) # store BIOS drive number movl %eax, 4(%bx) # store signature from MBR incb bootsym(boot_mbr_signature_nr) # note that we stored something + addw $8, %bx # increment sig buffer ptr +.Ledd_mbr_sig_next: incb %dl # increment to next device - addw $8, %bx # increment sig buffer ptr + jz edd_mbr_sig_done cmpb $EDD_MBR_SIG_MAX,bootsym(boot_mbr_signature_nr) jb edd_mbr_sig_read edd_mbr_sig_done: _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |