From: Gordon Matzigkeit <[EMAIL PROTECTED]>
Subject: Re: the size restrictions for FAT and ext2fs stage1.5
Date: 08 Mar 1999 23:54:46 -0600
> I don't know it well, either. I have some preliminary code in
> shared_src/asm.S, but it doesn't seem to detect LBA correctly (even
> though I do things according to Ralf Brown's interrupt list). It
> probably won't ever work until somebody with thorough knowledge in
> this area can look at it, or else I get access to a machine where I
> can test things.
I looked at your code a bit, and I found part of the code would
never work. The following patch is not probably enough yet, so I'll
investigate it more carefully. I must recall x86 assembly...
--- grub/shared_src/asm.S Tue Mar 9 23:18:33 1999
+++ grub.new/shared_src/asm.S Tue Mar 9 23:18:08 1999
@@ -367,7 +367,12 @@
movw 0x1c(%ebp), %ax /* segment */
shll $4, %eax
movl %eax, dap_buffer
- movl $disk_address_packet, %esi
+
+ /* 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 */
xorb %bl, %bl
movb 0x8(%ebp), %bh /* read=0, write=1 */
@@ -378,6 +383,7 @@
call EXT_C(prot_to_real) /* enter real mode */
.code16
+ movw %cx, %ds
movw %bx, %ax
int $0x13 /* do the operation */
@@ -432,9 +438,9 @@
movl $BIOSDISK_ERROR_GEOMETRY, %eax
jmp disk_exit_32
-disk_address_packet:
.align 4
- .byte 0x20 /* length of packet */
+disk_address_packet:
+ .byte 0x10 /* length of packet */
.byte 0 /* reserved */
dap_blocks:
.word 0 /* number of blocks */
----------------------------------------------------------------------
OKUJI Yoshinori <[EMAIL PROTECTED]> ^o-o^
http://duff.kuicr.kyoto-u.ac.jp/~okuji (in English) m /