Changeset 75


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

Added debug hotkeys '0'-'9' for dumping disk info [v1.1.1-testing]

Key '0' corresponds to BIOS disk 80h, '1' to 81h, etc.
It uses INT13(X) BIOS calls, of which the functionality can depend on
adapter BIOSes, UEFI CSM, BIOS USB MSD implementations and whatnot.

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

    r57 r75  
    6969; Show help on keys.
    7070;
    71 dbh     db  10,'h=HELP, d=DRIVE-LETTERS, g=GEO, i=IPT, r=RESTART, v=VOL-LETTERS, x=XREF',10,10,0
     71dbh     db  10
     72        db  'h=HELP, d=DRIVE-LETTERS, g=GEO, i=IPT, r=RESTART, v=VOL-LETTERS, x=XREF',10
     73        db  '0-9=disk 80h-89h info',10
     74        db  10,0
     75
    7276DEBUG_ShowHelp      Proc
    7377        pushf
     
    118122        cmp     al,'9'
    119123        ja      DEBUG_HandleKeypress_try_alpha
    120         ; It was a digit.
    121         jmp     DEBUG_HandleKeypress_check_it
     124        ; It was a digit, dump disk info ('0' for 80h, '1' for 81h, etc)
     125        call    DEBUG_DumpDiskInfo
     126        ;~ jmp     DEBUG_HandleKeypress_check_it
     127        jmp     DEBUG_HandleKeypress_exit
    122128
    123129        ; Check for alpha.
     
    496502DEBUG_DumpDriveLetters      EndP
    497503
     504;
     505; Dump some disk information.
     506;
     507__DUMP_DI__     EQU
     508DEBUG_DumpDiskInfo          Proc
     509    IFDEF   __DUMP_DI__
     510        pushf
     511        pusha
     512
     513        add     al, 50h                 ; ASCII '0' to BIOS 80h, '1'->81h, etc.
     514
     515        mov     si, offset [ddi]
     516        call    AuxIO_Print
     517
     518        call    AuxIO_TeletypeHexByte
     519        call    AuxIO_TeletypeNL
     520
     521        popa
     522        popf
     523    ENDIF
     524        ret
     525DEBUG_DumpDiskInfo          EndP
    498526
    499527;
     
    888916xrt     db  10,'XrefTable:',10,0
    889917ddl     db  10,'Driveletters:',10,0
     918ddi     db  10,'DumpDiskInfo:',10,0
    890919dvl     db  10,'VolumeLetters:',10,0
    891920dlra    db  10,'LVM_DoLetterReassignment: ',0
Note: See TracChangeset for help on using the changeset viewer.