Changeset 130


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

Added a function to calculate pointer to DISKINFO entry [v1.1.1-testing]

The DISKINFO structure will replace all the loose disk related variables
like BIOS_*, LVM_*, LOG_* etc. This function returns a pointer into
the DISKINFO array using the BIOS disk number as the index.

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

    r126 r130  
    17941794DriveIO_GatherDiskInfo  EndP
    17951795
     1796;------------------------------------------------------------------------------
     1797; Calculate pointer to entry in DISKINFO structure
     1798;------------------------------------------------------------------------------
     1799; IN    : DL BIOS disk number (80h etc)
     1800; OUT   : BX Pointer to entry
     1801; NOTE  : BIOS disk number must be valid
     1802;------------------------------------------------------------------------------
     1803DriveIO_CalcDiskInfoPointer Proc    Near
     1804        xchg    bx, ax                          ; AX is used for calculation
     1805        mov     al, DISKINFO_Size               ; Size of DISKINFO structure
     1806        mov     ah, dl                          ; BIOS disk number
     1807        sub     ah, 80h                         ; Now 0-based index
     1808        mul     ah                              ; Now offset into DISKINFO array
     1809        add     ax, offset [DiskInformation]    ; Base of DISKINFO array
     1810        xchg    bx, ax                          ; BX now points to entry for disk
     1811        ret
     1812DriveIO_CalcDiskInfoPointer EndP
    17961813
    17971814;------------------------------------------------------------------------------
  • trunk/include/version.h

    r129 r130  
    3131// Build date
    3232#define     BLDLVL_YEAR             "2017"
    33 #define     BLDLVL_MONTH            "03"
    34 #define     BLDLVL_DAY              "31"
     33#define     BLDLVL_MONTH            "04"
     34#define     BLDLVL_DAY              "04"
    3535// Build time
    3636//~ #define     BLDLVL_HOURS            "01"
  • trunk/include/version.inc

    r129 r130  
    6969; The Year, Month and Day in BCD so we can easily extract nibbles.
    7070AB_YEAR             EQU     2017h
    71 AB_MONTH            EQU     03h
    72 AB_DAY              EQU     31h
     71AB_MONTH            EQU     04h
     72AB_DAY              EQU     04h
    7373
    7474; The Hours, Minutes and Seconds, again in BCD for easy manipulation.
Note: See TracChangeset for help on using the changeset viewer.