Changeset 119


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

Now locating Master LVM-sectors when scanning disks [v1.1.1-testing]

Note that if LVM is set to be ignored in the SETUP, checking for a
signature will not be done and thus no Master LVM sectors will be found.

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/bootcode
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/airboot.asm

    r117 r119  
    23832383LVM_Bytes                   dw      MaxDisks  dup(?)
    23842384LVM_TotalSecs               dq      MaxDisks  dup(?)
     2385LVM_MasterSecs              dd      MaxDisks  dup(?)
    23852386                            ALIGN   16
    23862387
  • trunk/bootcode/regular/driveio.asm

    r118 r119  
    10001000            call    AuxIO_Print
    10011001            pop     si
    1002             ;~ call    DEBUG_DumpRegisters
     1002            call    DEBUG_DumpRegisters
    10031003            ;~ call    AuxIO_DumpSector
    10041004            ;~ call    AuxIO_DumpParagraph
     
    10161016        pop     es
    10171017
     1018        ; Because JCXZ is used, LBA sector 0 is never loaded and checked.
     1019        ; This is of course no problem since it is the MBR.
    10181020    DriveIO_LocateMasterLVMSector_next:
    10191021        clc                             ; Indicate Master LVM sector not found
  • trunk/bootcode/regular/other.asm

    r117 r119  
    416416
    417417
    418 IFDEF   AUX_DEBUG
    419         IF 1
    420         mov     dl, [BIOS_BootDisk]
    421         ;~ mov     dl, 81h
    422         call    DriveIO_LocateMasterLVMSector
    423         call    DEBUG_DumpRegisters
    424         mov     si, offset [TmpSector]
    425         call    AuxIO_DumpSector
    426         ENDIF
    427 ENDIF
    428 
    429418        ; =======================================
    430419        ; Checks for MBR Virii :) I love that job
  • trunk/bootcode/regular/partscan.asm

    r117 r119  
    6161
    6262        push    dx
     63
     64; ================================================ [ Locate Master LVM Sector ]
     65
     66        ; Locate the Master LVM sector for this disk.
     67        ; If one is found, BX:AX will hold its LBA address, otherwise zero.
     68        ; Note that if LVM is set to be ignored in the SETUP, checking for a
     69        ; signature will not be done and thus no Master LVM sector will be
     70        ; found.
     71        call    DriveIO_LocateMasterLVMSector
     72
     73        ; Put the LBA address in the BSS location for this disk
     74        xor     bh, bh                          ; Zero upper part of index
     75        mov     bl, dl                          ; Get BIOS drive-number
     76        and     bl, 7fh                         ; Strip bit 7
     77        shl     bx, 3                           ; Mult by 4 for DWORD
     78        add     bx, offset [LVM_MasterSecs]     ; Add the base offset
     79        mov     [bx+00h], ax                    ; Store LBA low
     80        xor     ax, ax                          ; LBA high always zero
     81        mov     [bx+02h], ax                    ; Store LBA high
     82
     83;!
     84;! DEBUG_BLOCK
     85;! Check stored Master LVM LBA address.
     86;!
     87IFDEF   AUX_DEBUG
     88        IF 1
     89        pushf
     90        pusha
     91            push    si
     92            mov     si, offset $+5
     93            jmp     @F
     94            db      10,'[Master LVM Sector]',10,0
     95            @@:
     96            call    AuxIO_Print
     97            pop     si
     98            xor     bh, bh
     99            mov     bl, dl
     100            and     bl, 7fh
     101            shl     bx, 3
     102            add     bx, offset [LVM_MasterSecs]
     103            mov     al, [bx]
     104            mov     ah, dl
     105            call    DEBUG_DumpRegisters
     106        popa
     107        popf
     108        ENDIF
     109ENDIF
     110
     111; ========================================================= [ Scan Partitions ]
     112
    63113        call    PARTSCAN_ScanDriveForPartitions
    64114        pop     dx
Note: See TracChangeset for help on using the changeset viewer.