Handle partition offset
authorhpa <hpa>
Wed, 22 Dec 2004 07:14:15 +0000 (07:14 +0000)
committerhpa <hpa>
Wed, 22 Dec 2004 07:14:15 +0000 (07:14 +0000)
extlinux.asm
ldlinux.asm

index 0fa73f0..0849ebf 100644 (file)
@@ -114,7 +114,7 @@ getcbuf             resb trackbufsize
                ; ends at 5000h
 
 SuperBlock     resb 1024               ; ext2 superblock
-SuperInfo      resd 16                 ; DOS superblock expanded
+SuperInfo      resq 16                 ; DOS superblock expanded
 ClustSize      resd 1                  ; Bytes/cluster ("block")
 SecPerClust    resd 1                  ; Sectors/cluster
 ClustMask      resd 1                  ; Sectors/cluster - 1
@@ -317,7 +317,7 @@ eddcheck:
                ;
                ; We have EDD support...
                ;
-               mov byte [getlinsec+1],getlinsec_ebios-(getlinsec+2)
+               mov byte [getlinsec.jmp+1],getlinsec_ebios-(getlinsec.jmp+2)
 .noedd:
 
 ;
@@ -411,7 +411,8 @@ getonesec:
 ; the order to dst,src to keep things sane.
 ;
 getlinsec:
-               jmp strict short getlinsec_cbios        ; This is patched
+               add eax,[bsHidden]              ; Add partition offset
+.jmp:          jmp strict short getlinsec_cbios        ; This is patched
 
 ;
 ; getlinsec_ebios:
index 1a1020a..15250b3 100644 (file)
@@ -422,6 +422,7 @@ getonesec:
 ; the order to dst,src to keep things sane.
 ;
 getlinsec:
+               add eax,[bsHidden]              ; Add partition offset
                jmp strict short getlinsec_cbios        ; This is patched
 
 ;
@@ -770,7 +771,6 @@ genfatinfo:
 .have_secs:
                mov [TotalSectors],edx
 
-               mov eax,[bsHidden]              ; Hidden sectors aren't included
                add edx,eax
                mov [EndSector],edx