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

Updated all debug hooks to use the new macros [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

File:
1 edited

Legend:

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

    r119 r123  
    3232IFDEF   AUX_DEBUG
    3333        IF 0
    34         pushf
    35         pusha
    36             push    si
    37             mov     si, offset $+5
    38             jmp     @F
    39             db      10,'PARTSCAN_ScanForPartitions:',10,0
    40             @@:
    41             call    AuxIO_Print
    42             pop     si
     34        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanForPartitions:'
     35        PUSHRF
    4336            ;~ call    DEBUG_DumpRegisters
    4437            ;~ call    AuxIO_DumpParagraph
    4538            ;~ call    AuxIO_TeletypeNL
    46         popa
    47         popf
     39        POPRF
    4840        ENDIF
    4941ENDIF
     
    5244        call    PARTSCAN_ResetXref
    5345
    54         mov     dh, TotalHarddiscs
     46        mov     dh, [TotalHarddiscs]
    5547        xor     al, al
    56         mov     NewPartitions, al
     48        mov     [NewPartitions], al
    5749
    5850        mov     byte ptr [CurIO_Scanning], 1             ; Set flag due scanning partitions
     
    8678;!
    8779IFDEF   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
     80        IF 0
     81        DBG_TEXT_OUT_AUX    '[Master LVM Sector]'
     82        PUSHRF
    9883            xor     bh, bh
    9984            mov     bl, dl
     
    10489            mov     ah, dl
    10590            call    DEBUG_DumpRegisters
    106         popa
    107         popf
     91        POPRF
    10892        ENDIF
    10993ENDIF
     
    201185IFDEF   AUX_DEBUG
    202186        IF 0
    203         pushf
    204         pusha
    205             push    si
    206             mov     si, offset $+5
    207             jmp     @F
    208             db      10,'PARTSCAN_UpdateDriveLetters:',10,0
    209             @@:
    210             call    AuxIO_Print
    211             pop     si
     187        DBG_TEXT_OUT_AUX    'PARTSCAN_UpdateDriveLetters:'
     188        PUSHRF
    212189            ;~ call    DEBUG_DumpRegisters
    213190            ;~ call    AuxIO_DumpParagraph
    214191            ;~ call    AuxIO_TeletypeNL
    215         popa
    216         popf
     192        POPRF
    217193        ENDIF
    218194ENDIF
     
    290266IFDEF   AUX_DEBUG
    291267        IF 0
    292         pushf
    293         pusha
    294             push    si
    295             mov     si, offset $+5
    296             jmp     @F
    297             db      10,'PARTSCAN_ScanDriveForPartitions:',10,0
    298             @@:
    299             call    AuxIO_Print
    300             pop     si
     268        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanDriveForPartitions:'
     269        PUSHRF
    301270            ;~ call    DEBUG_DumpRegisters
    302271            ;~ call    AuxIO_DumpParagraph
    303272            ;~ call    AuxIO_TeletypeNL
    304         popa
    305         popf
     273        POPRF
    306274        ENDIF
    307275ENDIF
     
    340308IFDEF   AUX_DEBUG
    341309        IF 0
    342         pushf
    343         pusha
    344             push    si
    345             mov     si, offset $+5
    346             jmp     @F
    347             db      10,'PARTSCAN_ScanPartitionForExtended:',10,0
    348             @@:
    349             call    AuxIO_Print
    350             pop     si
     310        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanPartitionForExtended:'
     311        PUSHRF
    351312            ;~ call    DEBUG_DumpRegisters
    352313            ;~ call    AuxIO_DumpParagraph
    353314            ;~ call    AuxIO_TeletypeNL
    354         popa
    355         popf
     315        POPRF
    356316        ENDIF
    357317ENDIF
     
    396356IFDEF   AUX_DEBUG
    397357        IF 0
    398         pushf
    399         pusha
    400             push    si
    401             mov     si, offset $+5
    402             jmp     @F
    403             db      10,'PARTSCAN_ScanPartition:',10,0
    404             @@:
    405             call    AuxIO_Print
    406             pop     si
     358        DBG_TEXT_OUT_AUX    'PARTSCAN_ScanPartition:'
     359        PUSHRF
    407360            ;~ call    DEBUG_DumpRegisters
    408361            ;~ call    AuxIO_DumpParagraph
    409362            ;~ call    AuxIO_TeletypeNL
    410         popa
    411         popf
    412         ENDIF
    413 ENDIF
    414 
    415 
    416         mov     si, offset PartitionSector+446 ; DS:SI - 1st Partition-Entry
     363        POPRF
     364        ENDIF
     365ENDIF
     366
     367
     368        mov     si, offset [PartitionSector+446] ; DS:SI - 1st Partition-Entry
    417369    PSSP_ScanLoop:
    418370        mov     al, bptr [si+LocBRPT_SystemID]
     
    481433
    482434IFDEF   AUX_DEBUG
    483         IF 0
    484         pushf
    485         pusha
    486             push    si
    487             mov     si, offset $+5
    488             jmp     @F
    489             db      10,'PARTSCAN_CheckThisPartition:',10,0
    490             @@:
    491             call    AuxIO_Print
    492             pop     si
    493             ;~ call    DEBUG_DumpRegisters
     435        IF 1
     436        DBG_TEXT_OUT_AUX    'PARTSCAN_CheckThisPartition:'
     437        PUSHRF
     438            call    DEBUG_DumpRegisters
    494439            ;~ call    AuxIO_DumpParagraph
    495440            ;~ call    AuxIO_TeletypeNL
    496         popa
    497         popf
     441        POPRF
    498442        ENDIF
    499443ENDIF
     
    510454        mov     ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector
    511455        mov     bx, wptr [si+LocBRPT_RelativeBegin+2]
     456
     457
     458
     459
    512460        add     ax, wptr [CurPartition_Location+0] ; +Partition-Absolute
    513461        adc     bx, wptr [CurPartition_Location+2] ;  sectors
    514 
    515462
    516463
     
    575522        mov     si, offset [LVMSector]
    576523
     524IFDEF   AUX_DEBUG
     525        IF 0
     526        DBG_TEXT_OUT_AUX    'LVMSector'
     527        PUSHRF
     528            call    DEBUG_DumpRegisters
     529            call    AuxIO_DumpSector
     530            ;~ call    AuxIO_DumpParagraph
     531            ;~ call    AuxIO_TeletypeNL
     532        POPRF
     533        ENDIF
     534ENDIF
     535
    577536        call    LVM_SearchForPartition     ; Search for DX:AX partition
    578537
     
    605564        movsb                               ;  (11 bytes in total)
    606565        pop   di
     566
     567
     568
     569IFDEF   AUX_DEBUG
     570        IF 0
     571        DBG_TEXT_OUT_AUX    'LVMSector-2'
     572        PUSHRF
     573            mov     si, di
     574            call    AuxIO_Print
     575            ;~ call    DEBUG_DumpRegisters
     576            ;~ call    AuxIO_DumpSector
     577            ;~ call    AuxIO_DumpParagraph
     578            ;~ call    AuxIO_TeletypeNL
     579        POPRF
     580        ENDIF
     581ENDIF
    607582
    608583
Note: See TracChangeset for help on using the changeset viewer.