Hi Gordon,
At last, LBA works! I've tested only Linux boot and haven't tested
non-LBA mode (fallback or standard), so it may have another problem.
However, it works at least in my computer. Here is the patch for the
cvs:
Index: grub/shared_src/asm.S
===================================================================
RCS file: /gd/gnu/anoncvsroot/grub/shared_src/asm.S,v
retrieving revision 1.10
diff -c -r1.10 asm.S
*** asm.S 1999/03/09 15:09:29 1.10
--- asm.S 1999/03/10 13:21:21
***************
*** 355,361 ****
/* Check whether we have LBA. */
movb 0x13(%ebp), %al
! shrb $4, %al
jz disk_compute_args /* nope. */
/* set up disk address packet for extended calls (LBA mode) */
--- 355,361 ----
/* Check whether we have LBA. */
movb 0x13(%ebp), %al
! andb $0x10, %al
jz disk_compute_args /* nope. */
/* set up disk address packet for extended calls (LBA mode) */
***************
*** 370,381 ****
/* set up the buffer address */
xorl %eax, %eax
movw 0x1c(%ebp), %ax /* segment */
! shll $4, %eax
movl %eax, dap_buffer
/* compute the address of disk_address_packet */
movl $disk_address_packet, %eax
movw %ax, %si
shrl $4, %eax
movw %ax, %cx /* save the segment to cx */
--- 370,382 ----
/* set up the buffer address */
xorl %eax, %eax
movw 0x1c(%ebp), %ax /* segment */
! shll $16, %eax
movl %eax, dap_buffer
/* compute the address of disk_address_packet */
movl $disk_address_packet, %eax
movw %ax, %si
+ xorw %ax, %ax
shrl $4, %eax
movw %ax, %cx /* save the segment to cx */
***************
*** 623,633 ****
jc 1f /* invalid function */
cmpw $0xaa55, %bx
data32
! jnz 1f /* failed magic */
andb $1, %cx
data32
! jnz 1f /* LBA not supported */
/* Wahoo! Got LBA! */
movb $0x1, %bh
--- 624,634 ----
jc 1f /* invalid function */
cmpw $0xaa55, %bx
data32
! jne 1f /* failed magic */
andb $1, %cx
data32
! jz 1f /* LBA not supported */
/* Wahoo! Got LBA! */
movb $0x1, %bh
***************
*** 657,664 ****
#ifdef AWARD_INT13_EXTENSIONS
movb %dh, %al /* bits 10,11 of cylinder count */
andb $0xc0, %al
- shlw $2, %ax /* << 2 */
#endif
movb %cl, %al /* bits 8,9 of cylinder count */
andb $0xc0, %al
shlw $2, %ax /* << 2 */
--- 658,665 ----
#ifdef AWARD_INT13_EXTENSIONS
movb %dh, %al /* bits 10,11 of cylinder count */
andb $0xc0, %al
#endif
+ shlw $2, %ax /* << 2 */
movb %cl, %al /* bits 8,9 of cylinder count */
andb $0xc0, %al
shlw $2, %ax /* << 2 */
----------------------------------------------------------------------
OKUJI Yoshinori <[EMAIL PROTECTED]> ^o-o^
http://duff.kuicr.kyoto-u.ac.jp/~okuji (in English) m /