Index: sys/boot/i386/pmbr/pmbr.s =================================================================== --- sys/boot/i386/pmbr/pmbr.s (revision 224700) +++ sys/boot/i386/pmbr/pmbr.s (working copy) @@ -36,6 +36,7 @@ .set LOAD,0x7c00 # Load address .set EXEC,0x600 # Execution address + .set ARG,0x900 # Arguments .set MAGIC,0xaa55 # Magic: bootable .set SECSIZE,0x200 # Size of a single disk sector .set DISKSIG,440 # Disk signature offset @@ -93,7 +94,8 @@ main.1: movb $0x80,%dl # Assume drive 0x80 # # Load the primary GPT header from LBA 1 and verify signature. # -main.2: movw $GPT_ADDR,%bx +main.2: mov %dx,ARG # Save drive number + movw $GPT_ADDR,%bx movw $lba,%si call read cmpl $GPT_SIG_0,GPT_ADDR+GPT_SIG