Changeset 111


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

Updated debug hooks (debugging) [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

Location:
trunk/bootcode
Files:
6 edited

Legend:

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

    r107 r111  
    108108; Dump the geometry.
    109109;
    110 IF  0
     110IF 0
    111111DEBUG_DumpGeo   Proc
    112112        pushf
     
    168168; Dump the internal partition table.
    169169;
    170 IF  0
     170IF 0
    171171DEBUG_DumpIPT   Proc
    172172        pushf
     
    194194; Dump the new  partitions table.
    195195;
    196 IF  0
     196IF 0
    197197DEBUG_DumpNewPartTable  Proc
    198198        pushf
     
    218218; Dump the partition pointers table.
    219219;
    220 IF  0
     220IF 0
    221221DEBUG_DumpPartitionPointers     Proc
    222222        pushf
     
    249249; Dump the partition x-ref table.
    250250;
    251 IF  0
     251IF 0
    252252xrt     db  10,'XrefTable:',10,0
    253253DEBUG_DumpPartitionXref     Proc
     
    283283; Dump the dl-feature drive-letters.
    284284;
    285 IF  0
     285IF 0
    286286ddl     db  10,'Driveletters:',10,0
    287287DEBUG_DumpDriveLetters      Proc
     
    326326; Dump some disk information.
    327327;
    328 IF  1
     328IF 0
    329329ddi     db  10,'DumpDiskInfo:',10,0
    330330DEBUG_DumpDiskInfo          Proc
     
    375375; Dump the lvm volume drive-letters.
    376376;
    377 IF  0
     377IF 0
    378378dvl     db  10,'VolumeLetters:',10,0
    379379DEBUG_DumpVolumeLetters     Proc
     
    408408; Dump the registers and flags.
    409409;
    410 IF  1
     410IF 1
    411411regAX   db  'AX:',0
    412412regBX   db  ' BX:',0
     
    562562; Dump CHS values.
    563563;
    564 IF  0
     564IF 0
    565565DEBUG_DumpCHS   Proc    Near
    566566        pushf
     
    607607; Dump BSS.
    608608;
    609 IF  0
     609IF 0
    610610DEBUG_DumpBSSSectors    Proc    Near
    611611        pushf
     
    648648; Dump 6-bit packed hide partition table.
    649649;
    650 IF  0
     650IF 0
    651651DEBUG_DumpHidePartTables    Proc    Near
    652652        pushf
     
    697697; if its 'IF' directive is 0.
    698698;
    699 IF  1
     699IF 1
    700700DEBUG_Test  Proc
    701701    pushf
     
    764764; Test the simple 32-bit math functions.
    765765;
    766 IF  0
     766IF 0
    767767db_testmul32   db "## TEST MUL32 ##",10,0
    768768DEBUG_Test_MATH_Mul32   Proc    Near
     
    852852; Test the bitfield routines.
    853853;
    854 IF  0
     854IF 0
    855855DEBUG_TestBitFieldFunctions Proc
    856856        pushf
     
    947947; Dump information before the partition is booted.
    948948;
    949 IF  0
     949IF 0
    950950DEBUG_Dump2     Proc  Near
    951951        pushf
     
    10421042dbp     db  '>---------->> DebugProbe: ',0
    10431043DEBUG_Probe     Proc
    1044 IF  0
     1044IF 0
    10451045        push    bp
    10461046        mov     bp,sp
     
    10711071; Toggle display of debug video page.
    10721072;
    1073 IF  0
     1073IF 0
    10741074DEBUG_DebugScreenToggle Proc
    10751075        pushf
     
    12191219; is enabled.
    12201220;
    1221 dlra    db  10,'LVM_DoLetterReassignment: ',0
     1221;~ dlra    db  10,'LVM_DoLetterReassignment: ',0
    12221222ptetb   db  10,'Partition Table Entry to boot',10,0
    12231223bios_reg    db  10,'Registers passed by BIOS:',10,0
    12241224;~ diopmbr db  10,'DriveIO_ProtectMBR',10,0
    1225 dioss   db  10,'DriveIO_SaveSector',10,0
    12261225
    12271226
  • trunk/bootcode/regular/driveio.asm

    r110 r111  
    5858;  Those are originally loaded on startup and will NOT get reloaded.
    5959DriveIO_LoadConfiguration   Proc Near   Uses ax bx cx dx es
     60
     61IFDEF   AUX_DEBUG
     62        IF 0
     63        pushf
     64        pusha
     65            push    si
     66            mov     si, offset $+5
     67            jmp     @F
     68            db      10,'DriveIO_LoadConfiguration:',10,0
     69            @@:
     70            call    AuxIO_Print
     71            pop     si
     72            ;~ call    DEBUG_DumpRegisters
     73            ;~ call    AuxIO_DumpParagraph
     74            ;~ call    AuxIO_TeletypeNL
     75        popa
     76        popf
     77        ENDIF
     78ENDIF
     79
    6080        mov     ax, cs
    6181        mov     es, ax
     
    7393
    7494DriveIO_SaveConfiguration   Proc Near   Uses ax bx cx dx ds es si
     95
     96IFDEF   AUX_DEBUG
     97        IF 0
     98        pushf
     99        pusha
     100            push    si
     101            mov     si, offset $+5
     102            jmp     @F
     103            db      10,'DriveIO_SaveConfiguration:',10,0
     104            @@:
     105            call    AuxIO_Print
     106            pop     si
     107            ;~ call    DEBUG_DumpRegisters
     108            ;~ call    AuxIO_DumpParagraph
     109            ;~ call    AuxIO_TeletypeNL
     110        popa
     111        popf
     112        ENDIF
     113ENDIF
     114
    75115        mov     ax, cs
    76116        mov     ds, ax
     
    238278;           Ugly, need to cleanup.
    239279DriveIO_LVMAdjustToInfoSector   Proc Near
     280
     281IFDEF   AUX_DEBUG
     282        IF 0
     283        pusha
     284            push    si
     285            mov     si, offset $+5
     286            jmp     @F
     287            db      10,'DriveIO_LVMAdjustToInfoSector:',10,0
     288            @@:
     289            call    AuxIO_Print
     290            pop     si
     291            call    DEBUG_DumpRegisters
     292            ;~ call    AuxIO_DumpParagraph
     293            ;~ call    AuxIO_TeletypeNL
     294        popa
     295        ENDIF
     296ENDIF
     297
    240298        push    cx                      ; Save Cyl/Sec part
    241299        xor     ch,ch                   ; Clear low Cyl part
     
    258316        or      cl,63                   ; Adjust CHS part   !FIX ME for > 63!   !! FIX HUGE DRIVE !!
    259317
     318IFDEF   AUX_DEBUG
     319        IF 0
     320        pusha
     321            push    si
     322            mov     si, offset $+5
     323            jmp     @F
     324            db      10,'adjusted',10,0
     325            @@:
     326            call    AuxIO_Print
     327            pop     si
     328            call    DEBUG_DumpRegisters
     329            ;~ call    AuxIO_DumpParagraph
     330            ;~ call    AuxIO_TeletypeNL
     331        popa
     332        ENDIF
     333ENDIF
    260334
    261335        ret
     
    326400; #########################################################################
    327401DriveIO_SavePartition   Proc Near  Uses ax bx cx dx si
     402
     403IFDEF   AUX_DEBUG
     404        IF 0
     405        pushf
     406        pusha
     407            push    si
     408            mov     si, offset $+5
     409            jmp     @F
     410            db      10,'DriveIO_SavePartition:',10,0
     411            @@:
     412            call    AuxIO_Print
     413            pop     si
     414            ;~ call    DEBUG_DumpRegisters
     415            ;~ call    AuxIO_DumpParagraph
     416            ;~ call    AuxIO_TeletypeNL
     417        popa
     418        popf
     419        ENDIF
     420ENDIF
     421
    328422        mov     ax, wptr cs:[CurPartition_Location+0]
    329423        mov     bx, wptr cs:[CurPartition_Location+2]
     
    356450; Keeps DS:SI for caller, sets carry if valid LVM sector encountered
    357451DriveIO_LoadLVMSector   Proc Near  Uses ax bx cx dx
     452
     453IFDEF   AUX_DEBUG
     454        IF 0
     455        pushf
     456        pusha
     457            push    si
     458            mov     si, offset $+5
     459            jmp     @F
     460            db      10,'DriveIO_LoadLVMSector:',10,0
     461            @@:
     462            call    AuxIO_Print
     463            pop     si
     464            ;~ call    DEBUG_DumpRegisters
     465            ;~ call    AuxIO_DumpParagraph
     466            ;~ call    AuxIO_TeletypeNL
     467        popa
     468        popf
     469        ENDIF
     470ENDIF
     471
    358472        test    byte ptr [CFG_IgnoreLVM], 1            ; We are supposed to ignore LVM, so
    359473        jnz     DIOLLVMS_NoLVMSector          ;  don't load but declare as bad!
     
    402516; Keeps DS:SI for caller, saves at anytime w/o checks (!)
    403517DriveIO_SaveLVMSector   Proc Near  Uses ax bx cx dx
     518
     519IFDEF   AUX_DEBUG
     520        IF 0
     521        pushf
     522        pusha
     523            push    si
     524            mov     si, offset $+5
     525            jmp     @F
     526            db      10,'DriveIO_SaveLVMSector:',10,0
     527            @@:
     528            call    AuxIO_Print
     529            pop     si
     530            ;~ call    DEBUG_DumpRegisters
     531            ;~ call    AuxIO_DumpParagraph
     532            ;~ call    AuxIO_TeletypeNL
     533        popa
     534        popf
     535        ENDIF
     536ENDIF
     537
    404538        test    byte ptr [CFG_IgnoreLVM], 1            ; We are supposed to ignore LVM, so
    405539        jnz     DIOSLVMS_SevereError          ;  don't save at anytime (security!)
     
    476610DriveIO_LoadSector      Proc Near  Uses ax bx cx dx ds si es di
    477611
     612IFDEF   AUX_DEBUG
     613        IF 0
     614        pushf
     615        pusha
     616            push    si
     617            mov     si, offset $+5
     618            jmp     @F
     619            db      10,'DriveIO_LoadSector:',10,0
     620            @@:
     621            call    AuxIO_Print
     622            pop     si
     623            ;~ call    DEBUG_DumpRegisters
     624            ;~ call    AuxIO_DumpParagraph
     625            ;~ call    AuxIO_TeletypeNL
     626        popa
     627        popf
     628        ENDIF
     629ENDIF
     630
    478631        ; Is the drive not a harddrive?
    479632        cmp     dl, 80h
     
    494647        cmp     bptr cs:[LBASwitchTable+di], bl
    495648        jbe     DIOLS_UseExtension
     649
    496650    DIOLS_UseNormal:
    497         mov     di, 3
     651
     652IFDEF   AUX_DEBUG
     653        IF 0
     654        pusha
     655            push    si
     656            mov     si, offset $+5
     657            jmp     @F
     658            db      10,'DriveIO_ReadSectorCHS:',10,0
     659            @@:
     660            call    AuxIO_Print
     661            pop     si
     662            call    DEBUG_DumpRegisters
     663            call    AuxIO_DumpParagraph
     664            call    AuxIO_TeletypeNL
     665        popa
     666        ENDIF
     667ENDIF
     668
     669        mov     di, 3                      ; retry count
    498670    DIOLS_ErrorLoop:
    499671        push    ds
     
    503675        int     13h
    504676        jnc     DIOLS_Success
    505         dec     di
     677        dec     di                         ; decrement retry count
    506678        jnz     DIOLS_ErrorLoop
    507679
     
    552724DriveIO_ReadSectorLBA       Proc Near  Uses bx cx dx si di ds es
    553725
     726IFDEF   AUX_DEBUG
     727        IF 0
     728        pushf
     729        pusha
     730            push    si
     731            mov     si, offset $+5
     732            jmp     @F
     733            db      10,'DriveIO_ReadSectorLBA:',10,0
     734            @@:
     735            call    AuxIO_Print
     736            pop     si
     737            call    DEBUG_DumpRegisters
     738            call    AuxIO_DumpParagraph
     739            call    AuxIO_TeletypeNL
     740        popa
     741        popf
     742        ENDIF
     743ENDIF
     744
    554745        ; One sector to read
    555746        mov     cs:[INT13X_DAP_NumBlocks], 1
     
    602793;##############################################################################
    603794DriveIO_WriteSectorLBA      Proc Near  Uses bx cx dx si di ds es
     795
     796IFDEF   AUX_DEBUG
     797        IF 0
     798        pusha
     799            push    si
     800            mov     si, offset $+5
     801            jmp     @F
     802            db      10,'DriveIO_WriteSectorLBA:',10,0
     803            @@:
     804            call    AuxIO_Print
     805            pop     si
     806            call    DEBUG_DumpRegisters
     807            call    AuxIO_DumpParagraph
     808            call    AuxIO_TeletypeNL
     809        popa
     810        ENDIF
     811ENDIF
    604812
    605813        ; Mask reserved bits for wrte flags -- should check version here
     
    7941002DriveIO_SaveSector              Proc Near  Uses ax bx cx dx ds si es di
    7951003
     1004IFDEF   AUX_DEBUG
     1005        IF 0
     1006        pushf
     1007        pusha
     1008            push    si
     1009            mov     si, offset $+5
     1010            jmp     @F
     1011            db      10,'DriveIO_SaveSector:',10,0
     1012            @@:
     1013            call    AuxIO_Print
     1014            pop     si
     1015            ;~ call    DEBUG_DumpRegisters
     1016            ;~ call    AuxIO_DumpParagraph
     1017            ;~ call    AuxIO_TeletypeNL
     1018        popa
     1019        popf
     1020        ENDIF
     1021ENDIF
    7961022
    7971023    ;!
     
    8081034        inc cx
    8091035        xor dh,dh
    810         ENDIF
    811     ENDIF
    812 
    813 
    814     ;!
    815     ;! DEBUG_BLOCK
    816     ;! Check what is being written to disk.
    817     ;! Uncomment below to activate.
    818     ;!
    819     __DIO_SS_DMP__  EQU
    820     IFDEF   AUX_DEBUG
    821         IFDEF   __DIO_SS_DMP__
    822         pusha
    823         push    si
    824         mov     si,offset [dioss]
    825         call    AuxIO_Print
    826         pop     si
    827         call    DEBUG_DumpRegisters
    828         call    AuxIO_DumpSector
    829         call    AuxIO_TeletypeNL
    830         popa
    8311036        ENDIF
    8321037    ENDIF
     
    9041109
    9051110    DIOSS_UseNormal:
    906         mov     di, 3
     1111
     1112IFDEF   AUX_DEBUG
     1113        IF 0
     1114        pusha
     1115            push    si
     1116            mov     si, offset $+5
     1117            jmp     @F
     1118            db      10,'DriveIO_WriteSectorCHS:',10,0
     1119            @@:
     1120            call    AuxIO_Print
     1121            pop     si
     1122            call    DEBUG_DumpRegisters
     1123            call    AuxIO_DumpParagraph
     1124            call    AuxIO_TeletypeNL
     1125        popa
     1126        ENDIF
     1127ENDIF
     1128
     1129        mov     di, 3                      ; retry count
    9071130    DIOSS_ErrorLoop:
    9081131        push    ds
     
    9121135        int     13h
    9131136        jnc     DIOSS_Success
    914         dec     di
     1137        dec     di                         ; decrement retry count
    9151138        jnz     DIOSS_ErrorLoop
    9161139        call    MBR_SaveError
     
    9671190; Loads sector at [LVMSector] !
    9681191DriveIO_LoadMasterLVMSector     Proc  Near
    969         pusha
    970 
    971         ;~ mov      si,offset db_lmlvm
    972         ;~ call     AuxIO_Print
    973 
    974         ;~ ; Physical disk
    975         ;~ mov     al,'<'
    976         ;~ call    VideoIO_PrintSingleChar
    977         ;~ mov     al,dl
    978         ;~ call    VideoIO_PrintHexByte
    979         ;~ mov     al,'>'
    980         ;~ call    VideoIO_PrintSingleChar
    981 ;~
    982         ;~ call    AuxIO_TeletypeHexByte
    983         ;~ call    AuxIO_TeletypeNL
    984 
     1192
     1193IFDEF   AUX_DEBUG
     1194        IF 0
     1195        pushf
     1196        pusha
     1197            push    si
     1198            mov     si, offset $+5
     1199            jmp     @F
     1200            db      10,'DriveIO_LoadMasterLVMSector:',10,0
     1201            @@:
     1202            call    AuxIO_Print
     1203            pop     si
     1204            ;~ call    DEBUG_DumpRegisters
     1205            ;~ call    AuxIO_DumpParagraph
     1206            ;~ call    AuxIO_TeletypeNL
     1207        popa
     1208        popf
     1209        ENDIF
     1210ENDIF
     1211
     1212        pusha
    9851213
    9861214        ; Loop over the sector-translation table,
     
    10001228        ; Get the sector-number of the next possible LVM sector (255,127,63)
    10011229        ; using the translation table and the counter as the index
    1002         mov     bx,offset secs_per_track_table
    1003         mov     ax,cx
    1004         dec     ax
    1005         xlatb
    1006         dec     al
     1230        mov     bx,offset [secs_per_track_table]
     1231        mov     ax,cx   ; 1-based index to sec_per_track_table
     1232        dec     ax      ; Adjust to 0-based
     1233        xlatb           ; Get the (well known) SPT
     1234        dec     al      ; Minus 1 for LVM-record
    10071235
    10081236        ;
     
    10121240        ;
    10131241
    1014         ;~ push    ax
    1015         ;~ push    ax
    1016         ;~ mov     al,'$'
    1017         ;~ call    VideoIO_PrintSingleChar
    1018         ;~ pop     ax
    1019         ;~ call    VideoIO_PrintHexByte
    1020         ;~ mov     al,'$'
    1021         ;~ call    VideoIO_PrintSingleChar
    1022         ;~ pop     ax
    1023 
    1024     IFDEF   AUX_DEBUG
    1025         ; Dump the value
    1026         ;~ call     AuxIO_TeletypeHexByte
    1027         ;~ call     AuxIO_TeletypeNL
    1028     ENDIF
     1242
     1243IFDEF   AUX_DEBUG
     1244        IF 0
     1245        pushf
     1246        pusha
     1247            push    si
     1248            mov     si, offset $+5
     1249            jmp     @F
     1250            db      10,'geo',10,0
     1251            @@:
     1252            call    AuxIO_Print
     1253            pop     si
     1254            call    DEBUG_DumpRegisters
     1255            call    AuxIO_DumpParagraph
     1256            call    AuxIO_TeletypeNL
     1257        popa
     1258        popf
     1259        ENDIF
     1260ENDIF
     1261
    10291262
    10301263        ; Setup the requested LBA sector number
     
    10361269
    10371270IFDEF   AUX_DEBUG
    1038                 pushf
    1039                 pusha
    1040                 pushf
    1041                 xor     ax, ax
    1042                 mov     al, dl
    1043                 call    AuxIO_TeletypeHexWord
    1044                 mov     al, '#'
    1045                 call    AuxIO_Teletype
    1046                 popf
    1047                 mov     ax,0000h
    1048                 rcl     al, 1
    1049                 call    AuxIO_TeletypeHexWord
    1050                 mov     al, '#'
    1051                 call    AuxIO_Teletype
    1052                 mov     ax,word ptr [INT13X_DAP_Absolute+0]
    1053                 call    AuxIO_TeletypeHexWord
    1054                 mov     al, '#'
    1055                 call    AuxIO_Teletype
    1056                 popa
    1057                 popf
     1271        IF 0
     1272        pushf
     1273        pusha
     1274            pushf
     1275            xor     ax, ax
     1276            mov     al, dl
     1277            call    AuxIO_TeletypeHexWord
     1278            mov     al, '#'
     1279            call    AuxIO_Teletype
     1280            popf
     1281            mov     ax,0000h
     1282            rcl     al, 1
     1283            call    AuxIO_TeletypeHexWord
     1284            mov     al, '#'
     1285            call    AuxIO_Teletype
     1286            mov     ax,word ptr [INT13X_DAP_Absolute+0]
     1287            call    AuxIO_TeletypeHexWord
     1288            mov     al, '#'
     1289            call    AuxIO_Teletype
     1290        popa
     1291        popf
     1292        ENDIF
    10581293ENDIF
    10591294
     
    10681303        call    LVM_ValidateSector
    10691304
    1070 ;        pushf
    1071 ;        mov     ah,0
    1072 ;        rcl     ah,1
    1073 ;        mov     al,'|'
    1074 ;        call    VideoIO_PrintSingleChar
    1075 ;        mov     al,ah
    1076 ;        call    VideoIO_PrintHexByte
    1077 ;        mov     al,'|'
    1078 ;        call    VideoIO_PrintSingleChar
    1079 ;        popf
     1305IFDEF   AUX_DEBUG
     1306        IF 0
     1307        pushf
     1308        pusha
     1309            push    si
     1310            mov     si, offset $+5
     1311            jmp     @F
     1312            db      10,'lvm record',10,0
     1313            @@:
     1314            call    AuxIO_Print
     1315            pop     si
     1316            call    DEBUG_DumpRegisters
     1317            call    AuxIO_DumpParagraph
     1318            call    AuxIO_TeletypeNL
     1319        popa
     1320        popf
     1321        ENDIF
     1322ENDIF
    10801323
    10811324
     
    11951438; DL contains BIOS disk-number; 80h for first, 81h for second, etc.
    11961439DriveIO_GatherDiskInfo  Proc Near
     1440
     1441IFDEF   AUX_DEBUG
     1442        IF 0
     1443        pushf
     1444        pusha
     1445            push    si
     1446            mov     si, offset $+5
     1447            jmp     @F
     1448            db      10,'DriveIO_GatherDiskInfo:',10,0
     1449            @@:
     1450            call    AuxIO_Print
     1451            pop     si
     1452            ;~ call    DEBUG_DumpRegisters
     1453            ;~ call    AuxIO_DumpParagraph
     1454            ;~ call    AuxIO_TeletypeNL
     1455        popa
     1456        popf
     1457        ENDIF
     1458ENDIF
     1459
    11971460        pushf
    11981461        push    bx
     
    13601623secs_per_track_table    db    63,127,255,255,255,255
    13611624
    1362 ;db_lmlvm:   db 'Load Master LVM -- disk: ',0
     1625db_lmlvm    db 'Load Master LVM -- disk: ',0
  • trunk/bootcode/regular/other.asm

    r105 r111  
    8989;
    9090PRECRAP_Main    Proc Near
     91
     92IFDEF   AUX_DEBUG
     93        IF 0
     94        pushf
     95        pusha
     96            push    si
     97            mov     si, offset $+5
     98            jmp     @F
     99            db      10,'PRECRAP_Main:',10,0
     100            @@:
     101            call    AuxIO_Print
     102            pop     si
     103            ;~ call    DEBUG_DumpRegisters
     104            ;~ call    AuxIO_DumpParagraph
     105            ;~ call    AuxIO_TeletypeNL
     106        popa
     107        popf
     108        ENDIF
     109ENDIF
    91110
    92111        ; First initialize Variable-Area (everything with NUL)
     
    180199        int     13h
    181200
     201; =============================================================================
    182202
    183203        ; Start with disk at index 0
     
    206226
    207227        pushf
    208 
    209         ;~ mov     al,'#'
    210         ;~ pushf
    211         ;~ call    VideoIO_PrintSingleChar
    212         ;~ popf
    213         ;~ mov     al,0
    214         ;~ rcl     al,1
    215         ;~ call    VideoIO_PrintHexByte
    216         ;~ mov     al,'#'
    217         ;~ call    VideoIO_PrintSingleChar
    218228
    219229        mov      bx, offset [TrueSecs]
     
    264274        jb      PRECRAP_Main_next_disk
    265275
    266 
     276; =============================================================================
    267277
    268278    IFDEF   AUX_DEBUG
     
    292302
    293303        ; Huge Disk indicator
    294         mov     si, offset [HugeBootDisk]
    295         call    MBR_Teletype
    296         mov     al,[HugeDisk]
    297         mov     si, offset [No]
    298         test    al,al
    299         jz      MBR_HugeDriveIndicator
    300         mov     si, offset [Yes]
     304        ;~ mov     si, offset [HugeBootDisk]
     305        ;~ call    MBR_Teletype
     306        ;~ mov     al,[HugeDisk]
     307        ;~ mov     si, offset [No]
     308        ;~ test    al,al
     309        ;~ jz      MBR_HugeDriveIndicator
     310        ;~ mov     si, offset [Yes]
    301311
    302312    MBR_HugeDriveIndicator:
    303         call    MBR_Teletype
    304         xor     si,si
    305         call    MBR_TeletypeNL
     313        ;~ call    MBR_Teletype
     314        ;~ xor     si,si
     315        ;~ call    MBR_TeletypeNL
    306316
    307317
     
    323333        call    MBR_TeletypeNL
    324334
     335; =============================================================================
    325336
    326337        ; Calculate Cooper-Bar Tables
     
    438449
    439450AFTERCRAP_Main  Proc Near
     451
     452IFDEF   AUX_DEBUG
     453        IF 0
     454        pushf
     455        pusha
     456            push    si
     457            mov     si, offset $+5
     458            jmp     @F
     459            db      10,'AFTERCRAP_Main:',10,0
     460            @@:
     461            call    AuxIO_Print
     462            pop     si
     463            ;~ call    DEBUG_DumpRegisters
     464            ;~ call    AuxIO_DumpParagraph
     465            ;~ call    AuxIO_TeletypeNL
     466        popa
     467        popf
     468        ENDIF
     469ENDIF
     470
    440471        ; ===================================================
    441472        ;  Now get volume label of FloppyDrive, if wanted...
     
    455486; Checks Configuration CheckSum...Displays message, if failed.
    456487PRECRAP_CheckConfiguration      Proc Near  Uses ds si es di
     488
     489IFDEF   AUX_DEBUG
     490        IF 0
     491        pushf
     492        pusha
     493            push    si
     494            mov     si, offset $+5
     495            jmp     @F
     496            db      10,'PRECRAP_CheckConfiguration:',10,0
     497            @@:
     498            call    AuxIO_Print
     499            pop     si
     500            ;~ call    DEBUG_DumpRegisters
     501            ;~ call    AuxIO_DumpParagraph
     502            ;~ call    AuxIO_TeletypeNL
     503        popa
     504        popf
     505        ENDIF
     506ENDIF
     507
    457508        mov     si, offset Configuration
    458509        xor     bx, bx
  • trunk/bootcode/regular/partmain.asm

    r102 r111  
    514514; Destroyed: None
    515515PART_HidePartition              Proc Near   Uses ax bx cx dx si di
     516
     517IFDEF   AUX_DEBUG
     518        IF 0
     519        pushf
     520        pusha
     521            push    si
     522            mov     si, offset $+5
     523            jmp     @F
     524            db      10,'PART_HidePartition:',10,0
     525            @@:
     526            call    AuxIO_Print
     527            pop     si
     528            ;~ call    DEBUG_DumpRegisters
     529            ;~ call    AuxIO_DumpParagraph
     530            ;~ call    AuxIO_TeletypeNL
     531        popa
     532        popf
     533        ENDIF
     534ENDIF
     535
    516536        call    PART_GetPartitionPointer      ; Pointer to partition (DL) -> SI
    517537
     
    565585;  do anything else.
    566586PART_MarkFirstGoodPrimary       Proc Near   Uses ax si di
     587
     588IFDEF   AUX_DEBUG
     589        IF 0
     590        pushf
     591        pusha
     592            push    si
     593            mov     si, offset $+5
     594            jmp     @F
     595            db      10,'PART_MarkFirstGoodPrimary:',10,0
     596            @@:
     597            call    AuxIO_Print
     598            pop     si
     599            ;~ call    DEBUG_DumpRegisters
     600            ;~ call    AuxIO_DumpParagraph
     601            ;~ call    AuxIO_TeletypeNL
     602        popa
     603        popf
     604        ENDIF
     605ENDIF
     606
    567607    mov     di, offset PartitionSector+446 ; DS:SI - 1st partitionentry
    568608    ; First action to do: Remove the active flag from every partition
     
    944984;               run boot sector...
    945985PART_StartPartition             Proc Near   Uses ax dx es di
     986
     987IFDEF   AUX_DEBUG
     988        IF 0
     989        pushf
     990        pusha
     991            push    si
     992            mov     si, offset $+5
     993            jmp     @F
     994            db      10,'PART_StartPartition:',10,0
     995            @@:
     996            call    AuxIO_Print
     997            pop     si
     998            ;~ call    DEBUG_DumpRegisters
     999            ;~ call    AuxIO_DumpParagraph
     1000            ;~ call    AuxIO_TeletypeNL
     1001        popa
     1002        popf
     1003        ENDIF
     1004ENDIF
     1005
    9461006    ;
    9471007    ; Local Storage for this much too large function.
     
    21652225;
    21662226PART_IsPrimaryPartition Proc Near  Uses bx cx dx si di ds es
     2227
     2228IFDEF   AUX_DEBUG
     2229        IF 0
     2230        pushf
     2231        pusha
     2232            push    si
     2233            mov     si, offset $+5
     2234            jmp     @F
     2235            db      10,'PART_IsPrimaryPartition:',10,0
     2236            @@:
     2237            call    AuxIO_Print
     2238            pop     si
     2239            ;~ call    DEBUG_DumpRegisters
     2240            ;~ call    AuxIO_DumpParagraph
     2241            ;~ call    AuxIO_TeletypeNL
     2242        popa
     2243        popf
     2244        ENDIF
     2245ENDIF
     2246
    21672247        ; Push LBA address of partition
    21682248        push     bx
  • trunk/bootcode/regular/partscan.asm

    r96 r111  
    2929
    3030PARTSCAN_ScanForPartitions      Proc Near
     31
     32IFDEF   AUX_DEBUG
     33        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
     43            ;~ call    DEBUG_DumpRegisters
     44            ;~ call    AuxIO_DumpParagraph
     45            ;~ call    AuxIO_TeletypeNL
     46        popa
     47        popf
     48        ENDIF
     49ENDIF
     50
    3151        ; Reset X-Reference
    3252        call    PARTSCAN_ResetXref
     
    119139;
    120140PARTSCAN_UpdateDriveLetters     Proc
     141
     142IFDEF   AUX_DEBUG
     143        IF 0
     144        pushf
     145        pusha
     146            push    si
     147            mov     si, offset $+5
     148            jmp     @F
     149            db      10,'PARTSCAN_UpdateDriveLetters:',10,0
     150            @@:
     151            call    AuxIO_Print
     152            pop     si
     153            ;~ call    DEBUG_DumpRegisters
     154            ;~ call    AuxIO_DumpParagraph
     155            ;~ call    AuxIO_TeletypeNL
     156        popa
     157        popf
     158        ENDIF
     159ENDIF
     160
    121161        pusha
    122162        xor     bx,bx           ; index-pointer
     
    188228; falls eine Extended Partition (DOS) gefunden wird, wird erneut gescannt.
    189229PARTSCAN_ScanDriveForPartitions Proc Near
     230
     231IFDEF   AUX_DEBUG
     232        IF 0
     233        pushf
     234        pusha
     235            push    si
     236            mov     si, offset $+5
     237            jmp     @F
     238            db      10,'PARTSCAN_ScanDriveForPartitions:',10,0
     239            @@:
     240            call    AuxIO_Print
     241            pop     si
     242            ;~ call    DEBUG_DumpRegisters
     243            ;~ call    AuxIO_DumpParagraph
     244            ;~ call    AuxIO_TeletypeNL
     245        popa
     246        popf
     247        ENDIF
     248ENDIF
     249
    190250        xor     ax, ax
    191251        xor     bx, bx     ; Location Absoluter Sektor 0
     
    218278; be set to this location and Carry will be set
    219279PARTSCAN_ScanPartitionForExtended Proc Near  Uses si
     280
     281IFDEF   AUX_DEBUG
     282        IF 0
     283        pushf
     284        pusha
     285            push    si
     286            mov     si, offset $+5
     287            jmp     @F
     288            db      10,'PARTSCAN_ScanPartitionForExtended:',10,0
     289            @@:
     290            call    AuxIO_Print
     291            pop     si
     292            ;~ call    DEBUG_DumpRegisters
     293            ;~ call    AuxIO_DumpParagraph
     294            ;~ call    AuxIO_TeletypeNL
     295        popa
     296        popf
     297        ENDIF
     298ENDIF
     299
    220300        mov     si, offset PartitionSector+446 ; DS:SI - 1st partition entry
    221301        xor     ax, ax
     
    254334; The following routines have NOT *DS* set to CS, so we must address via ES
    255335PARTSCAN_ScanPartition          Proc Near  Uses ax si
     336
     337IFDEF   AUX_DEBUG
     338        IF 0
     339        pushf
     340        pusha
     341            push    si
     342            mov     si, offset $+5
     343            jmp     @F
     344            db      10,'PARTSCAN_ScanPartition:',10,0
     345            @@:
     346            call    AuxIO_Print
     347            pop     si
     348            ;~ call    DEBUG_DumpRegisters
     349            ;~ call    AuxIO_DumpParagraph
     350            ;~ call    AuxIO_TeletypeNL
     351        popa
     352        popf
     353        ENDIF
     354ENDIF
     355
     356
    256357        mov     si, offset PartitionSector+446 ; DS:SI - 1st Partition-Entry
    257358    PSSP_ScanLoop:
     
    316417;        In: SI - Points to Partition-Entry (16-Bytes)
    317418PARTSCAN_CheckThisPartition     Proc Near  Uses di si
     419
     420IFDEF   AUX_DEBUG
     421        IF 0
     422        pushf
     423        pusha
     424            push    si
     425            mov     si, offset $+5
     426            jmp     @F
     427            db      10,'PARTSCAN_CheckThisPartition:',10,0
     428            @@:
     429            call    AuxIO_Print
     430            pop     si
     431            ;~ call    DEBUG_DumpRegisters
     432            ;~ call    AuxIO_DumpParagraph
     433            ;~ call    AuxIO_TeletypeNL
     434        popa
     435        popf
     436        ENDIF
     437ENDIF
     438
    318439        local   PartSystemID:byte, PartTypeFlags:byte
    319440        local   PartCRC:word, PartPtr:word
  • trunk/bootcode/special/lvm.asm

    r102 r111  
    5656; Destroyed: None
    5757LVM_GetSectorCRC                Proc Near   Uses bx cx
     58
     59IFDEF   AUX_DEBUG
     60        IF 0
     61        pushf
     62        pusha
     63            push    si
     64            mov     si, offset $+5
     65            jmp     @F
     66            db      10,'LVM_GetSectorCRC:',10,0
     67            @@:
     68            call    AuxIO_Print
     69            pop     si
     70            ;~ call    DEBUG_DumpRegisters
     71            ;~ call    AuxIO_DumpParagraph
     72            ;~ call    AuxIO_TeletypeNL
     73        popa
     74        popf
     75        ENDIF
     76ENDIF
     77
    5878        push    word ptr [si+LocLVM_CRC+00]
    5979        push    word ptr [si+LocLVM_CRC+02]
     
    165185;            DS:SI - points to LVM information entry
    166186; Destroyed: None
     187
     188; INVALID LVM RECORD WHEN STICK INSERTED !
     189
    167190LVM_SearchForPartition          Proc Near   Uses cx
     191
     192IFDEF   AUX_DEBUG
     193        IF 0
     194        pushf
     195        pusha
     196            push    si
     197            mov     si, offset $+5
     198            jmp     @F
     199            db      10,'LVM_SearchForPartition:',10,0
     200            @@:
     201            call    AuxIO_Print
     202            pop     si
     203            ;~ call    DEBUG_DumpRegisters
     204            ;~ call    AuxIO_DumpParagraph
     205            ;~ call    AuxIO_TeletypeNL
     206        popa
     207        popf
     208        ENDIF
     209ENDIF
     210
    168211        cmp     byte ptr [si+LocLVM_SignatureStart], LocLVM_SignatureByte0
    169212        jne     LVMSFP_NotFound               ; Quick Check, if LVM sector there
     
    195238;            assigned or no LVM-info.
    196239LVM_GetDriveLetter      Proc Near   Uses bx cx dx si di ds es
     240
     241IFDEF   AUX_DEBUG
     242        IF 0
     243        pushf
     244        pusha
     245            push    si
     246            mov     si, offset $+5
     247            jmp     @F
     248            db      10,'LVM_GetDriveLetter:',10,0
     249            @@:
     250            call    AuxIO_Print
     251            pop     si
     252            ;~ call    DEBUG_DumpRegisters
     253            ;~ call    AuxIO_DumpParagraph
     254            ;~ call    AuxIO_TeletypeNL
     255        popa
     256        popf
     257        ENDIF
     258ENDIF
     259
     260
     261
    197262        ; For primary partitions this information is stored in the last
    198263        ; sector of track0; for all four partition entries in case they
     
    216281        ; will be set to 0ffh indicating an invalid index.
    217282        call    PART_IsPrimaryPartition
     283IF 0
     284                pushf
     285                pusha
     286                call    VideoIO_PrintHexWord
     287                popa
     288                popf
     289ENDIF
    218290        mov     al,0
    219291        rcl     al,1        ; CY if primary
     
    262334        ; This locator takes care of extended OS/2 geometry should that be used
    263335        ;
     336IF 0
     337                ; DH=0 or 1, DL=disk (8?h)
     338                pushf
     339                pusha
     340                mov     ax, dx
     341                call    VideoIO_PrintHexWord
     342                mov     al,'-'
     343                call    VideoIO_PrintSingleChar
     344                popa
     345                popf
     346ENDIF
     347        ; THIS ONE FAULTERS WHEN DISKS > 1
    264348        call    DriveIO_LoadMasterLVMSector
     349
     350IF 0
     351                ; INVALID LVM SECTOR !!
     352                pushf
     353                pusha
     354                mov     ax,0000h
     355                rcl     al,1
     356                call    VideoIO_PrintHexWord        ; LVMSector
     357                mov     al,'-'
     358                call    VideoIO_PrintSingleChar
     359                mov     si, offset [LVMSector]
     360                mov     ax, si
     361                call    VideoIO_PrintHexWord        ; LVMSector
     362                lodsw
     363                call    VideoIO_PrintHexWord        ; sig
     364                lodsw
     365                call    VideoIO_PrintHexWord        ; sig
     366                mov     al,'-'
     367                call    VideoIO_PrintSingleChar
     368                popa
     369                popf
     370ENDIF
    265371
    266372    LVM_GetDriveLetter_is_not_pri:
     
    279385        push    si
    280386        mov     ax,cx
    281         mov     dx,bx
     387        mov     dx,bx                   ; DL DESTROYED
    282388        mov     si,offset [LVMSector]
    283389        call    LVM_SearchForPartition
     390
     391IF 0
     392                pushf
     393                pusha
     394                mov     ax, 0000h
     395                rcl     al, 1
     396                call    VideoIO_PrintHexWord
     397                mov     ax, si
     398                call    VideoIO_PrintHexWord
     399                popa
     400                popf
     401ENDIF
     402
     403IFDEF   AUX_DEBUG
     404        IF 0
     405        pusha
     406            push    si
     407            mov     si, offset $+5
     408            jmp     @F
     409            db      10,'LVM_GetDriveLetter:',10,0
     410            @@:
     411            call    AuxIO_Print
     412            pop     si
     413            call    DEBUG_DumpRegisters
     414            call    AuxIO_DumpParagraph
     415            call    AuxIO_TeletypeNL
     416        popa
     417        ENDIF
     418ENDIF
     419
    284420        mov     bx,si   ; BX now points to LVM entry
    285421        mov     dx,0
     
    316452;       Out: CY=1 if LVM-info found, 0 if no LVM-info.
    317453LVM_SetDriveLetter      Proc Near   Uses bx cx dx si di ds es
     454
    318455        local   disk:byte
    319456        local   drive_letter:byte
     
    335472        ; correct drive-letter.
    336473        ;
     474
     475IFDEF   AUX_DEBUG
     476        IF 0
     477        pushf
     478        pusha
     479            push    si
     480            mov     si, offset $+5
     481            jmp     @F
     482            db      10,'LVM_SetDriveLetter:',10,0
     483            @@:
     484            call    AuxIO_Print
     485            pop     si
     486            ;~ call    DEBUG_DumpRegisters
     487            ;~ call    AuxIO_DumpParagraph
     488            ;~ call    AuxIO_TeletypeNL
     489        popa
     490        popf
     491        ENDIF
     492ENDIF
    337493
    338494        mov     [disk], dl
     
    457613; Destroyed: None
    458614LVM_RemoveVolLetterFromSector   Proc Near   Uses cx
     615
     616IFDEF   AUX_DEBUG
     617        IF 0
     618        pushf
     619        pusha
     620            push    si
     621            mov     si, offset $+5
     622            jmp     @F
     623            db      10,'LVM_RemoveVolLetterFromSector:',10,0
     624            @@:
     625            call    AuxIO_Print
     626            pop     si
     627            ;~ call    DEBUG_DumpRegisters
     628            ;~ call    AuxIO_DumpParagraph
     629            ;~ call    AuxIO_TeletypeNL
     630        popa
     631        popf
     632        ENDIF
     633ENDIF
     634
    459635        cmp     bptr [si+LocLVM_SignatureStart], LocLVM_SignatureByte0
    460636        jne     LVMRVLFS_Done                 ; Quick Check, if LVM sector there
     
    487663LVM_DoLetterReassignment        Proc Near   Uses bx cx dx si di
    488664
    489     IFDEF   AUX_DEBUG
     665IFDEF   AUX_DEBUG
     666        IF 0
     667        pushf
    490668        pusha
    491         mov     si, offset [dlra]
    492         call    AuxIO_Print
    493         call    AuxIO_Teletype
    494         call    AuxIO_TeletypeNL
     669            push    si
     670            mov     si, offset $+5
     671            jmp     @F
     672            db      10,'LVM_DoLetterReassignment:',10,0
     673            @@:
     674            call    AuxIO_Print
     675            pop     si
     676            ;~ call    DEBUG_DumpRegisters
     677            ;~ call    AuxIO_DumpParagraph
     678            ;~ call    AuxIO_TeletypeNL
    495679        popa
    496     ENDIF
     680        popf
     681        ENDIF
     682ENDIF
    497683
    498684        mov     di, si              ; Save SI in DI (Partition-pointer)
Note: See TracChangeset for help on using the changeset viewer.