Ignore:
Timestamp:
Apr 8, 2017, 12:27:54 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Removed obsolete LVM adjustment function [v1.1.1-testing]

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/regular/driveio.asm

    r150 r151  
    271271        ret
    272272DriveIO_InitLBASwitchTable  EndP
    273 
    274 
    275 
    276 
    277 ;FIXME: Only LBA gets updated, need to update CHS too !!!!!!!
    278 
    279 ; Adjusts BX:AX / CX:DX to meet LVM sector location
    280 ; BX:AX / CX:DX point to MBR or EBR !
    281 ;  Destroys SI
    282 ; Rousseau: Enhanced to handle sector-numbers 127 and 255 besides 63 for LVM-info sectors.
    283 ;           Ugly, need to cleanup.
    284 DriveIO_LVMAdjustToInfoSector   Proc Near
    285 
    286 IFDEF   AUX_DEBUG
    287         IF 0
    288         DBG_TEXT_OUT_AUX    'DriveIO_LVMAdjustToInfoSector:'
    289         PUSHRF
    290             call    DEBUG_DumpRegisters
    291             ;~ call    AuxIO_DumpParagraph
    292             ;~ call    AuxIO_TeletypeNL
    293         POPRF
    294         ENDIF
    295 ENDIF
    296 
    297         push    cx                      ; Save Cyl/Sec part
    298         xor     ch,ch                   ; Clear low Cyl part
    299         and     cl,63                   ; Clear high Cyl part
    300         push    bx                      ; We need BX...
    301         push    dx                      ; and DX temoraily
    302         mov     bx,offset [TrueSecs]    ; Offset of sector table
    303         xor     dh,dh                   ; Clear DH because we use DL as index
    304         and     dl,01111111b            ; Remove high bit of BIOS disk-nr
    305         shl     dx,2                    ; Index to DWORD table
    306         add     bx,dx                   ; Point to TrueSecs for this disk
    307         mov     si,[bx]                 ; Get SPT for this disk
    308         pop     dx                      ; Restore DX...
    309         pop     bx                      ; and BX
    310         ;~ sub     si,cx                   ; Adjust offset                      !! INCORRECT FOR LBA (TP CX != 0 !!)
    311         dec     si
    312         pop     cx                      ; Restore Cyl/Sec part
    313         add     ax,si                   ; Add offset to low part...
    314         adc     bx,0                    ; and high part of LBA address
    315         or      cl,63                   ; Adjust CHS part   !FIX ME for > 63!   !! FIX HUGE DRIVE !!
    316 
    317 IFDEF   AUX_DEBUG
    318         IF 0
    319         DBG_TEXT_OUT_AUX    'adjusted'
    320         PUSHRF
    321             call    DEBUG_DumpRegisters
    322             ;~ call    AuxIO_DumpParagraph
    323             ;~ call    AuxIO_TeletypeNL
    324         POPRF
    325         ENDIF
    326 ENDIF
    327 
    328         ret
    329 
    330 DriveIO_LVMAdjustToInfoSector   EndP
    331 
    332 
    333 
    334 
    335 
    336273
    337274; #########################################################################
Note: See TracChangeset for help on using the changeset viewer.