Changeset 50 for trunk/BOOTCODE/REGULAR


Ignore:
Timestamp:
Apr 13, 2014, 1:31:04 PM (12 years ago)
Author:
Ben Rietbroek
Message:

Removed 'Force BIOS-LBA Usage' entry from AiR-BOOT SETUP [2012-05-15]

This commit eliminates the severe bug that previous commits warned
about in their commit-message. The cause of the bug is not handling
CHS values when modifying LVM-information. Thus, when LBA-access was
disabled, the CHS-access method was used with improper values. This
resulted in a CHS address of (0,0,1), which is the MBR, and then
erroneously writing the modified LVM-record to it.

While a freshly installed AiR-BOOT of v1.07 or higher defaults to having
LBA enabled, this is not the case for v1.06. Since AiR-BOOT merges the
previous configuration, any upgrade from v1.06 with LBA set to disabled
would propagate the setting to the new version. Modifying
LVM-information from the AiR-BOOT SETUP, like changing the label or
fiddling with drive-letter assignments, would then trigger the bug and
write the LVM-record to the MBR. Users fiddling with the SETUP could
also disable LBA-access and trigger the bug.

This commit removes the 'Force BIOS-LBA Usage' option from the
AiR-BOOT SETUP, preventing users to disable LBA. Also, when AiR-BOOT
starts, it now always enables LBA-addressing, so CHS-addressing is not
used anymore. Furthermore, the Installer is modified to always enable
LBA-addressing in the AiR-BOOT configuration it writes to disk.
This ensures that older versions, which do not implicitly enable LBA on
starting, will find LBA as enabled.

On today's systems there is no need to use CHS-addressing anymore.
In fact, it does more harm than good because the CHS values do not
represent true physical geometry anymore. Instead, the drive and
the BIOS do translations that can cause unpredictable results when
moving the drive between systems. This is particularly true for USB
mass storage devices.

Therefore, CHS-addressing will be removed from AiR-BOOT.
This will free-up badly needed code space and create some room in the
internal partition tables that can be put to other use.

Info

o Bug Description

Trashing the Master Boot Record.

o Cause

Not handling CHS values while modifying LVM-information.

o Effect

Writing the modified LVM-record to the MBR when modifying LVM
information from the AiR-BOOT SETUP.
(like the partition-label or drive-letter assignments)

o Measures

  • Remove 'Force BIOS-LBA Usage' from AiR-BOOT SETUP
  • Always enable LBA when AiR-BOOT starts
  • Always set LBA enabled when writing on-disk AiR-BOOT configuration

o Affected AiR-BOOT versions

*All* v1.0.8 pre-releases up and including commit [2012-05-13].

Location:
trunk/BOOTCODE/REGULAR
Files:
6 edited

Legend:

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

    r49 r50  
    235235DEBUG_DumpPartitionXref     EndP
    236236
     237
     238
     239DEBUG_DumpDriveLetters      Proc
     240        pushf
     241        pusha
     242
     243        call    AuxIO_TeletypeNL
     244
     245        mov     si,offset [DriveLetters]
     246        mov     cx,2
     247
     248    DEBUG_DumpDriveLetters_next:
     249        call    AuxIO_DumpParagraph
     250        add     si,16
     251        call    AuxIO_TeletypeNL
     252        loop    DEBUG_DumpDriveLetters_next
     253
     254        popa
     255        popf
     256        ret
     257DEBUG_DumpDriveLetters      EndP
     258
     259
     260DEBUG_DumpRegisters     Proc
     261        pushf
     262        pusha
     263
     264        call    AuxIO_TeletypeHexWord
     265        call    AuxIO_TeletypeNL
     266
     267        mov     ax,bx
     268        call    AuxIO_TeletypeHexWord
     269        call    AuxIO_TeletypeNL
     270
     271        mov     ax,cx
     272        call    AuxIO_TeletypeHexWord
     273        call    AuxIO_TeletypeNL
     274
     275        mov     ax,dx
     276        call    AuxIO_TeletypeHexWord
     277        call    AuxIO_TeletypeNL
     278
     279        mov     ax,si
     280        call    AuxIO_TeletypeHexWord
     281        call    AuxIO_TeletypeNL
     282
     283        mov     ax,di
     284        call    AuxIO_TeletypeHexWord
     285        call    AuxIO_TeletypeNL
     286
     287        mov     ax,ds
     288        call    AuxIO_TeletypeHexWord
     289        call    AuxIO_TeletypeNL
     290
     291        mov     ax,es
     292        call    AuxIO_TeletypeHexWord
     293        call    AuxIO_TeletypeNL
     294
     295        call    AuxIO_TeletypeNL
     296
     297        popa
     298        popf
     299        ret
     300DEBUG_DumpRegisters     EndP
     301
    237302;
    238303; Dump information before the menu is displayed.
  • trunk/BOOTCODE/REGULAR/DRIVEIO.ASM

    r49 r50  
    607607        call    LVM_CheckSectorSignature
    608608        jnc     DIOSLVMS_SevereError                  ; LVM Signature must be there
     609
     610IFDEF   AUX_DEBUG
     611        ;~ call    DEBUG_DumpRegisters
     612ENDIF
     613
    609614        call    DriveIO_LVMAdjustToInfoSector
     615
     616IFDEF   AUX_DEBUG
     617        ;~ call    DEBUG_DumpRegisters
     618ENDIF
     619
    610620        mov     si, offset LVMSector
    611621        call    DriveIO_SaveSector
     
    788798; #########################################################################
    789799DriveIO_SaveSector              Proc Near  Uses ax bx cx ds si es di
     800
     801IFDEF   AUX_DEBUG
     802        call    DEBUG_DumpRegisters
     803        call    AuxIO_DumpSector
     804        call    AuxIO_TeletypeNL
     805ENDIF
     806
    790807        test    byte ptr cs:[CurIO_UseExtension], 1
    791808        jz      DIOSS_UseNormal
    792809        ; Are we forced do use LBA via Setting?
    793         test    byte ptr cs:[CFG_ForceLBAUsage], 1
    794         jnz     DIOSS_UseExtension
     810        ; Always use INT13X on v1.0.8.
     811        ;~ test    byte ptr cs:[CFG_ForceLBAUsage], 1
     812        ;~ jnz     DIOSS_UseExtension
     813        jmp     DIOSS_UseExtension
    795814        ; Is the drive not a harddrive?
    796815        cmp     dl, 80h
     
    932951
    933952IFDEF AUX_DEBUG
    934       ; Dump the value
    935       ;call     AuxIO_TeletypeHexByte
    936       ;call     AuxIO_TeletypeNL
     953        ; Dump the value
     954        ;~ call     AuxIO_TeletypeHexByte
     955        ;~ call     AuxIO_TeletypeNL
    937956ENDIF
    938957
  • trunk/BOOTCODE/REGULAR/OTHER.ASM

    r46 r50  
    133133        call    MBR_TeletypeNL
    134134
     135
     136        ; This sets [CurIO_UseExtension] flag
     137        call    PRECRAP_CheckFor13extensions
     138        mov     al,[CurIO_UseExtension]
     139        test    al,al
     140        jnz     INT13X_Present
     141
     142;
     143; Change this to a popup.
     144;
     145INT13X_Missing db '!! NO INT13X !!',0
     146        mov     si, offset INT13X_Missing
     147        call    MBR_Teletype
     148        jmp     MBR_HaltSystem
     149
     150INT13X_Present:
    135151        xor     cx,cx
    136152    PRECRAP_Main_next_disk:
     
    290306
    291307
    292         ; This sets [CurIO_UseExtension] flag.
    293         call    PRECRAP_CheckFor13extensions
    294308
    295309    IFNDEF ReleaseCode
  • trunk/BOOTCODE/REGULAR/PARTMAIN.ASM

    r49 r50  
    10241024
    10251025   test    byte ptr [CFG_ForceLBAUsage], 1
    1026    jnz     PSP_ForceI13X
     1026    ;~ jnz     PSP_ForceI13X
     1027    jmp     PSP_ForceI13X
     1028
    10271029   ; LBA-boundary at 16450560 (FB0400h) (16320x16x63)
    10281030   cmp     bx, 00FBh
     
    17601762   call     DEBUG_Dump2
    17611763   ;~ call     DEBUG_DumpBSSSectors
     1764   ;~ call     DEBUG_DumpDriveLetters
    17621765ENDIF
    17631766
  • trunk/BOOTCODE/REGULAR/PARTSCAN.ASM

    r49 r50  
    4949
    5050IFDEF   AUX_DEBUG
    51         pusha
    52         call    DEBUG_DumpHidePartTables
    53         popa
     51        ;~ pusha
     52        ;~ call    DEBUG_DumpHidePartTables
     53        ;~ popa
    5454ENDIF
    5555        ; Use X-Reference to sync NewPartitionTable with Hide-Config
     
    5757
    5858IFDEF   AUX_DEBUG
    59         pusha
    60         call    DEBUG_DumpHidePartTables
    61         popa
     59        ;~ pusha
     60        ;~ call    DEBUG_DumpHidePartTables
     61        ;~ popa
    6262ENDIF
    6363
  • trunk/BOOTCODE/REGULAR/STD_TEXT.ASM

    r49 r50  
    5555             db BLDLVL_MINOR_VERSION,' - (c) '
    5656             db BLDLVL_YEAR
    57              db ' M. Kiewitz  <<Internal Release 3b>> (bld: '
     57             db ' M. Kiewitz  <<Internal Release 3e>> (bld: '
    5858             ;~ db ' M. Kiewitz  <<Release Candidate 2>> (bld: '
    5959             db BLDLVL_YEAR
Note: See TracChangeset for help on using the changeset viewer.