Code: Select all
lba_mode:
/* save the total number of sectors */
movl 0x10(%si), %ecx
/* set %si to the disk address packet */
movw $ABS(disk_address_packet), %si
/* set the mode to non-zero */
movb $1, -1(%si)
movl ABS(stage2_sector), %ebx
/* the size and the reserved byte */
movw $0x0010, (%si)
/* the blocks */
movw $1, 2(%si)
/* the absolute address (low 32 bits) */
movl %ebx, 8(%si)
/* the segment of buffer address */
movw $STAGE1_BUFFERSEG, 6(%si)
xorl %eax, %eax
movw %ax, 4(%si)
movl %eax, 12(%si)