Changeset 128


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

New storage method for disk information [v1.1.1-testing]

Having separate areas for BIOS, INT13(X) and LVM information makes
addressing them a bit tedious. Now all disk information is going to be
clustered in one structure with an instance of that structure for each
disk. The disk information will be gathered during the scanning phase
so it can be easily accessed afterwards.

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

    r123 r128  
    158158TextChar_WinRep6            equ     0D8h
    159159
     160
     161; -----------------------------------------------------------------------------
     162;                                                             DISK INFORMATION
     163; -----------------------------------------------------------------------------
     164; Offsets into the DISKINFO structures located in the array [DiskInformation]
     165
     166; BIOS disk number and MBR flags
     167LocDISKINFO_DiskNum         equ     00h     ; BYTE  - BIOS disk number (80h etc)
     168LocDISKINFO_MbrFlags        equ     01h     ; BYTE  - Valid MBR, etc
     169
     170; BIOS INT13 Info
     171LocDISKINFO_I13_Secs        equ     02h     ; WORD  - Max 63
     172LocDISKINFO_I13_Heads       equ     04h     ; WORD  - Max 16 or 255
     173LocDISKINFO_I13_Cyls        equ     06h     ; WORD  - Max 1024
     174
     175; BIOS INT13X Info
     176LocDISKINFO_I13X_Flags      equ     08h     ; WORD  - CHS valid, etc
     177LocDISKINFO_I13X_SecSize    equ     0ah     ; WORD  - Normally 512 bytes
     178LocDISKINFO_I13X_Secs       equ     0ch     ; DWORD - Max 63 ?
     179LocDISKINFO_I13X_Heads      equ     10h     ; DWORD - Max 255 ?
     180LocDISKINFO_I13X_Cyls       equ     14h     ; DWORD - Max 2_32 (4294967296)
     181LocDISKINFO_I13X_SecsLBA    equ     18h     ; QWORD - Max 2^64 (4294967296^2)
     182LocDISKINFO_I13X_HostBus    equ     20h     ; 4 bytes
     183LocDISKINFO_I13X_Interface  equ     24h     ; 8 bytes
     184
     185; OS/2 LVM Info
     186LocDISKINFO_LVM_Flags       equ     2ch     ; WORD  - OS/2 ext geo, etc
     187LocDISKINFO_LVM_MasterLBA   equ     2eh     ; DWORD - Max 254
     188LocDISKINFO_LVM_Secs        equ     32h     ; DWORD - Max 255
     189LocDISKINFO_LVM_Heads       equ     36h     ; DWORD - Max 255
     190LocDISKINFO_LVM_Cyls        equ     3ah     ; DWORD - Max 65536
     191
     192; Custom Info
     193LocDISKINFO_Flags           equ     3eh     ; WORD  - Custom flags, dunno yet
     194
     195; Size of this structure
     196DISKINFO_Size               equ     40h     ; Size to be allocated
    160197
    161198
     
    180217; Signature relative to start of MBR/EBR
    181218LocBR_Magic                 equ     510 ; Offset of 0AA55h signature
     219
    182220
    183221; -----------------------------------------------------------------------------
     
    24052443                            ALIGN   16
    24062444
     2445; Array of DISKINFO structures
     2446DiskInformation             db      MaxDisks  dup(DISKINFO_Size dup(?))
     2447                            ALIGN   16
    24072448
    24082449; -----------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.