Changeset 125


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

Corrected using BIOS disk number as index [v1.1.1-testing]

Bit 7 of the BIOS disk number is not a flag indicating a harddisk,
but rather 80h is the disk number offset for the first harddisk.

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

    r123 r125  
    6666        xor     bh, bh                          ; Zero upper part of index
    6767        mov     bl, dl                          ; Get BIOS drive-number
    68         and     bl, 7fh                         ; Strip bit 7
     68        sub     bl, 80h                         ; Now 0-based index
    6969        shl     bx, 3                           ; Mult by 4 for DWORD
    7070        add     bx, offset [LVM_MasterSecs]     ; Add the base offset
     
    8383            xor     bh, bh
    8484            mov     bl, dl
    85             and     bl, 7fh
     85            sub     bl, 80h
    8686            shl     bx, 3
    8787            add     bx, offset [LVM_MasterSecs]
Note: See TracChangeset for help on using the changeset viewer.