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

More hard-coded '80h' corrections [v1.1.1-testing]

Code in 'partmain.asm' around line 1350 needs some more attention.
Possibly the whole 'boot-flag' stuff is not needed with modern BIOSses.
Updating them is disabled for now, which should only affect very old
BIOSses that don't leave this checking to the MBR code.

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

    r67 r78  
    3939        mov     es, ax
    4040        mov     bx, offset Configuration
    41         mov     dx, 0080h                     ; First harddrive, Sector 55...
    42         mov     cx, 0037h
     41        xor     dh, dh
     42        mov     dl, [BIOS_BootDisk]           ; Disk we booted from
     43        mov     cx, 0037h                     ; Sector 55 (CHS)
    4344        mov     ax, 0201h                     ; Function 02, read 1 sector...
    4445        int     13h
     
    8687        ; ES == CS
    8788        mov     bx, offset Configuration
    88         mov     dx, 0080h                     ; First harddrive, Sector 55...
    89         mov     cx, 0037h
     89        xor     dh, dh
     90        mov     dl, [BIOS_BootDisk]           ; Disk we booted from
     91        mov     cx, 0037h                     ; Sector 55 (CHS)
    9092
    9193        ; Changed from 5 to calculated value
     
    173175        mov     di, offset LBASwitchTable
    174176        mov     dh, [TotalHarddiscs]
    175         mov     dl, 80h
     177        mov     dl, 80h        ; First disk to process
    176178    DIOILUT_DriveLoop:
    177179        push    dx
     
    197199        mov     bptr ds:[di], ah  ; Save that value
    198200        inc     di                ; Go to next BYTE
    199         inc     dl
    200         dec     dh
    201         jnz     DIOILUT_DriveLoop
     201        inc     dl                ; Next disk
     202        dec     dh                ; Decrease disks to process
     203        jnz     DIOILUT_DriveLoop ; Next disk if DH != 0
    202204        ret
    203205DriveIO_InitLBASwitchTable  EndP
     
    800802        ; checking the AiR-BOOT MBR.
    801803        ;
    802         cmp     dl,80h
    803         ja      DriveIO_ProtectMBR_is_not_bootdisk
     804        cmp     dl, [BIOS_BootDisk]
     805        jne     DriveIO_ProtectMBR_is_not_bootdisk
    804806
    805807        ;
Note: See TracChangeset for help on using the changeset viewer.