Changeset 120


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

Added function to validate BIOS disk number [v1.1.1-testing]

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

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/regular/driveio.asm

    r119 r120  
    18701870
    18711871
     1872;------------------------------------------------------------------------------
     1873; Check if the BIOS disk number in DL is a harddisk and in range
     1874;------------------------------------------------------------------------------
     1875; IN    : DL BIOS disk number (80h etc)
     1876; OUT   : CF=1 if invalid disk number or out of range
     1877; NOTE  : Only modifies flags
     1878;------------------------------------------------------------------------------
     1879DriveIO_IsValidHarddisk     Proc    Near    Uses dx
     1880        cmp     dl, 80h                 ; BIOS disk number must be at least 80h
     1881        jb      @F                      ; Not a harddisk, exit with CY
     1882        mov     dh, dl                  ; Save to do compare
     1883        sub     dh, 80h                 ; Now 0 based disk number
     1884        inc     dh                      ; Now 1 based disk number
     1885        cmp     [TotalHarddiscs], dh    ; Out of range, exit with CY
     1886    @@: ret
     1887DriveIO_IsValidHarddisk     EndP
     1888
    18721889
    18731890; Values for sectors per track table corresponding to DriveIO_IsHugeDrive return value.
  • trunk/include/version.h

    r118 r120  
    3232#define     BLDLVL_YEAR             "2017"
    3333#define     BLDLVL_MONTH            "03"
    34 #define     BLDLVL_DAY              "25"
     34#define     BLDLVL_DAY              "26"
    3535// Build time
    3636//~ #define     BLDLVL_HOURS            "01"
  • trunk/include/version.inc

    r118 r120  
    7070AB_YEAR             EQU     2017h
    7171AB_MONTH            EQU     03h
    72 AB_DAY              EQU     25h
     72AB_DAY              EQU     26h
    7373
    7474; The Hours, Minutes and Seconds, again in BCD for easy manipulation.
Note: See TracChangeset for help on using the changeset viewer.