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/partscan.asm

    r76 r78  
    305305        ; Clearing the boot-flags on other disks would prevent booting them
    306306        ; from the BIOS. (TRAC ticket #6)
    307         cmp     dl, 080h                            ; See if this is boot-disk
     307        cmp     dl, [BIOS_BootDisk]                 ; See if this is boot-disk
    308308        jne     PSSP_Skip_Clear_BootFlag            ; Nope, skip clear flag
    309309        and     byte ptr [si+LocBRPT_Flags], 7Fh    ; Reset the Active-Flag
     
    313313        jb      PSSP_ScanLoop
    314314        ; If we are on first HDD and in primary partition table -> mark primary
    315         cmp     bptr [CurPartition_Location+4], 80h ; Drive
     315        mov     al, [BIOS_BootDisk]
     316        cmp     bptr [CurPartition_Location+4], al  ; Drive
    316317        jne     PSSP_NoMarkPrimary
    317318        cmp     wptr [CurPartition_Location+0], 0
    318319        jne     PSSP_NoMarkPrimary
    319         cmp     wptr [CurPartition_Location+2], 0 ; Absolute Location
     320        cmp     wptr [CurPartition_Location+2], 0   ; Absolute Location
    320321        jne     PSSP_NoMarkPrimary
    321322        call    PART_MarkFirstGoodPrimary
Note: See TracChangeset for help on using the changeset viewer.