gptmbr: need to set %bx -> bootsec
authorH. Peter Anvin <hpa@zytor.com>
Mon, 25 Feb 2008 22:57:11 +0000 (14:57 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 25 Feb 2008 22:57:11 +0000 (14:57 -0800)
Need to tell read_sector where to load the boot sector (unlike the MBR
code, where we always loaded into 0x7c00, this code uses multiple
buffers.)

mbr/gptmbr.S

index 80b26ed..7b5fb97 100644 (file)
@@ -195,6 +195,7 @@ found_part:
 boot:
        movl    (40+16)(%si),%eax
        movl    (48+16)(%si),%edx
+       movw    $bootsec,%bx
        call    read_sector
        cmpw    $0xaa55, (bootsec+510)
        jne     missing_os      /* Not a valid boot sector */