Ignore:
Timestamp:
Jan 13, 2013, 8:15:35 AM (13 years ago)
Author:
Ben Rietbroek
Message:

Bumped code-version to v1.0.8 [2011-11-11]

Fixes

o Fixed the drive-letter feature that was broken in v1.07
o Corrected release date in signature which was not updated with v1.07

Changes

o Bumped code-version in signature to v1.0.8

The extra dot is cosmetic only, the version in the signature
is BCD-coded and did not change format.

o Reworked MBR code to contain two I13X signatures

These signatures are actually MOV EAX,'X31I' in the original eCS
LVM MBR-code. However, they are at different offsets in the v1.x
and v2.x versions of the LVM MBR-code. (v1.x->0d5h -- v2.x->0d0h)
Other code might depend on their existence so we put both in
the AiR-BOOT MBR. (See eCS bugtracker issue #3002)

Note

This commit and all following commits upto and including the RC3
commit [2012-09-09] are delayed commits from a local repository.
Also, the RC (Release Candidate) naming of the corresponding commits
is a bit misleading. One would label a revision with RC when near to
a final release. Since many things have changed between RC1,RC2 & RC3,
these RC's should be interpreted as mile-stones.

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can destroy the MBR on all attached disks!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE ABOVE COMMITS!!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/REGULAR/DRIVEIO.ASM

    r30 r31  
    6161   mov     si, offset Configuration      ; Calculate new checksum
    6262   xor     bx, bx
    63    mov     cx, 5                         ; Total of 5 Config-Sectors
     63
     64   ; Changed from 5 to calculated
     65   ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter"
     66   mov     cx, (MBR_BackUpMBR - Configuration) / 2   ; Size of the ab-configuration
     67   ; TASM does not evaluate expression above corrrectly.
     68   ; Listing shows correct opcode but generated opcode has imm. word byteswapped.
     69   ; Casting to byte also does not work (overflow).
     70   ; So we swap back here -- must be removed in JWasm version !!
     71      xchg  ch,cl
     72
    6473   mov     dx, [CFG_CheckConfig]
    6574   mov     [CFG_CheckConfig], bx
     
    7382   mov     dx, 0080h                     ; First harddrive, Sector 55...
    7483   mov     cx, 0037h
    75    mov     ax, 0305h                     ; Function 03, 5 sectors to write
     84
     85   ; Changed from 5 to calculated
     86   ; Fixes issue: #2987 -- "air-boot doesn't remember drive letter"
     87   mov     ax, (MBR_BackUpMBR - Configuration) / 2  ; sizeof(ab-configuration) to write
     88   ; TASM does not evaluate expression above corrrectly.
     89   ; Listing shows correct opcode but generated opcode has imm. word byteswapped.
     90   ; Casting to byte also does not work (overflow).
     91   ; So we swap back here -- must be removed in JWasm version !!
     92      xchg  ah,al
     93   mov     ah,03h
     94
    7695   int     13h
    7796   jnc     DIOSC_NoError
     
    147166;  This is calculated by Sector*Heads. Comparing will get done with Bit 25-10
    148167;  on LBA sectors, so we actually divide sector number by 1024.
    149 DriveIO_InitLBASwitchTable      Proc Near   Uses es di                           ; Rousseau: LBA !
     168DriveIO_InitLBASwitchTable      Proc Near   Uses es di
    150169   mov     di, offset LBASwitchTable
    151170   mov     dh, TotalHarddiscs
     
    166185         mov   ah,0
    167186
    168          mov     bl, dh         ; DH -> head count                               ; Rousseau: nope, it's max head number !
     187         mov     bl, dh         ; DH -> max head number
    169188         mul     bl             ; AX = Sectors*Heads
    170189         shl     ah, 1
     
    188207; Rousseau: Enhanced to handle sector-numbers 127 and 255 besides 63 for LVM-info sectors.
    189208;           Ugly, need to cleanup.
    190 DriveIO_LVMAdjustToInfoSector   Proc Near   Uses                                 ; Rousseau: LVM stuff !
     209DriveIO_LVMAdjustToInfoSector   Proc Near   Uses
    191210
    192211
     
    555574   mov     cx, wptr cs:[CurPartition_Location+6] ; Gets cur. partition location
    556575
    557    call    DriveIO_LVMAdjustToInfoSector                                         ; Rousseau: LVM stuff !
     576   call    DriveIO_LVMAdjustToInfoSector
    558577
    559578   mov     si, offset LVMSector
     
    593612   ;popf
    594613
    595    call    LVM_CheckSectorSignature                                              ; Rousseau: LVM stuff !
     614   call    LVM_CheckSectorSignature
    596615   jnc     DIOLLVMS_NoLVMSector
    597    call    LVM_CheckSectorCRC                                                    ; Rousseau: LVM stuff !
     616   call    LVM_CheckSectorCRC
    598617   jnc     DIOLLVMS_NoLVMSector
    599618   ret
     
    662681; Preserve: all registers
    663682; #########################################################################
    664 DriveIO_LoadSector              Proc Near  Uses ax bx ds si es di                ; Rousseau: Disk IO
     683DriveIO_LoadSector              Proc Near  Uses ax bx ds si es di
    665684   test     cs:[CurIO_UseExtension], 1
    666685   jz       DIOLS_UseNormal
    667    ; Are we forced do use LBA via Setting?
    668    test     cs:[CFG_ForceLBAUsage], 1                                            ; Rousseau: LBA
     686   ; Are we forced do use LBA via Setting? ; Rousseau: LBA
    669687   jnz      DIOLS_UseExtension
    670688   ; Is the drive not a harddrive?
     
    685703         pop      es
    686704         mov      bx, si                     ; ES:BX - Destination
    687          mov      ax, 0201h                  ; Function 2 - Load Sector          ; Rousseau: Disk IO -- legacy BIOS call
     705         mov      ax, 0201h                  ; Function 2 - Load Sector
    688706         int      13h
    689707         jnc      DIOLS_Success
     
    704722      pop     ds
    705723      mov     si, offset DriveIO_DAP
    706       mov     ah, 42h                        ; Extended Read                     ; Rousseau: Disk IO -- extended BIOS call
     724      mov     ah, 42h                        ; Extended Read
    707725      int     13h
    708726   pop     cx
     
    728746   jz       DIOSS_UseNormal
    729747   ; Are we forced do use LBA via Setting?
    730    test     cs:[CFG_ForceLBAUsage], 1                                            ; Rousseau: LBA
     748   test     cs:[CFG_ForceLBAUsage], 1
    731749   jnz      DIOSS_UseExtension
    732750   ; Is the drive not a harddrive?
Note: See TracChangeset for help on using the changeset viewer.