Changeset 111
- Timestamp:
- Apr 8, 2017, 12:27:09 AM (8 years ago)
- Location:
- trunk/bootcode
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/debug.asm
r107 r111 108 108 ; Dump the geometry. 109 109 ; 110 IF 110 IF 0 111 111 DEBUG_DumpGeo Proc 112 112 pushf … … 168 168 ; Dump the internal partition table. 169 169 ; 170 IF 170 IF 0 171 171 DEBUG_DumpIPT Proc 172 172 pushf … … 194 194 ; Dump the new partitions table. 195 195 ; 196 IF 196 IF 0 197 197 DEBUG_DumpNewPartTable Proc 198 198 pushf … … 218 218 ; Dump the partition pointers table. 219 219 ; 220 IF 220 IF 0 221 221 DEBUG_DumpPartitionPointers Proc 222 222 pushf … … 249 249 ; Dump the partition x-ref table. 250 250 ; 251 IF 251 IF 0 252 252 xrt db 10,'XrefTable:',10,0 253 253 DEBUG_DumpPartitionXref Proc … … 283 283 ; Dump the dl-feature drive-letters. 284 284 ; 285 IF 285 IF 0 286 286 ddl db 10,'Driveletters:',10,0 287 287 DEBUG_DumpDriveLetters Proc … … 326 326 ; Dump some disk information. 327 327 ; 328 IF 1328 IF 0 329 329 ddi db 10,'DumpDiskInfo:',10,0 330 330 DEBUG_DumpDiskInfo Proc … … 375 375 ; Dump the lvm volume drive-letters. 376 376 ; 377 IF 377 IF 0 378 378 dvl db 10,'VolumeLetters:',10,0 379 379 DEBUG_DumpVolumeLetters Proc … … 408 408 ; Dump the registers and flags. 409 409 ; 410 IF 410 IF 1 411 411 regAX db 'AX:',0 412 412 regBX db ' BX:',0 … … 562 562 ; Dump CHS values. 563 563 ; 564 IF 564 IF 0 565 565 DEBUG_DumpCHS Proc Near 566 566 pushf … … 607 607 ; Dump BSS. 608 608 ; 609 IF 609 IF 0 610 610 DEBUG_DumpBSSSectors Proc Near 611 611 pushf … … 648 648 ; Dump 6-bit packed hide partition table. 649 649 ; 650 IF 650 IF 0 651 651 DEBUG_DumpHidePartTables Proc Near 652 652 pushf … … 697 697 ; if its 'IF' directive is 0. 698 698 ; 699 IF 699 IF 1 700 700 DEBUG_Test Proc 701 701 pushf … … 764 764 ; Test the simple 32-bit math functions. 765 765 ; 766 IF 766 IF 0 767 767 db_testmul32 db "## TEST MUL32 ##",10,0 768 768 DEBUG_Test_MATH_Mul32 Proc Near … … 852 852 ; Test the bitfield routines. 853 853 ; 854 IF 854 IF 0 855 855 DEBUG_TestBitFieldFunctions Proc 856 856 pushf … … 947 947 ; Dump information before the partition is booted. 948 948 ; 949 IF 949 IF 0 950 950 DEBUG_Dump2 Proc Near 951 951 pushf … … 1042 1042 dbp db '>---------->> DebugProbe: ',0 1043 1043 DEBUG_Probe Proc 1044 IF 1044 IF 0 1045 1045 push bp 1046 1046 mov bp,sp … … 1071 1071 ; Toggle display of debug video page. 1072 1072 ; 1073 IF 1073 IF 0 1074 1074 DEBUG_DebugScreenToggle Proc 1075 1075 pushf … … 1219 1219 ; is enabled. 1220 1220 ; 1221 dlra db 10,'LVM_DoLetterReassignment: ',01221 ;~ dlra db 10,'LVM_DoLetterReassignment: ',0 1222 1222 ptetb db 10,'Partition Table Entry to boot',10,0 1223 1223 bios_reg db 10,'Registers passed by BIOS:',10,0 1224 1224 ;~ diopmbr db 10,'DriveIO_ProtectMBR',10,0 1225 dioss db 10,'DriveIO_SaveSector',10,01226 1225 1227 1226 -
trunk/bootcode/regular/driveio.asm
r110 r111 58 58 ; Those are originally loaded on startup and will NOT get reloaded. 59 59 DriveIO_LoadConfiguration Proc Near Uses ax bx cx dx es 60 61 IFDEF 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 78 ENDIF 79 60 80 mov ax, cs 61 81 mov es, ax … … 73 93 74 94 DriveIO_SaveConfiguration Proc Near Uses ax bx cx dx ds es si 95 96 IFDEF 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 113 ENDIF 114 75 115 mov ax, cs 76 116 mov ds, ax … … 238 278 ; Ugly, need to cleanup. 239 279 DriveIO_LVMAdjustToInfoSector Proc Near 280 281 IFDEF 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 296 ENDIF 297 240 298 push cx ; Save Cyl/Sec part 241 299 xor ch,ch ; Clear low Cyl part … … 258 316 or cl,63 ; Adjust CHS part !FIX ME for > 63! !! FIX HUGE DRIVE !! 259 317 318 IFDEF 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 333 ENDIF 260 334 261 335 ret … … 326 400 ; ######################################################################### 327 401 DriveIO_SavePartition Proc Near Uses ax bx cx dx si 402 403 IFDEF 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 420 ENDIF 421 328 422 mov ax, wptr cs:[CurPartition_Location+0] 329 423 mov bx, wptr cs:[CurPartition_Location+2] … … 356 450 ; Keeps DS:SI for caller, sets carry if valid LVM sector encountered 357 451 DriveIO_LoadLVMSector Proc Near Uses ax bx cx dx 452 453 IFDEF 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 470 ENDIF 471 358 472 test byte ptr [CFG_IgnoreLVM], 1 ; We are supposed to ignore LVM, so 359 473 jnz DIOLLVMS_NoLVMSector ; don't load but declare as bad! … … 402 516 ; Keeps DS:SI for caller, saves at anytime w/o checks (!) 403 517 DriveIO_SaveLVMSector Proc Near Uses ax bx cx dx 518 519 IFDEF 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 536 ENDIF 537 404 538 test byte ptr [CFG_IgnoreLVM], 1 ; We are supposed to ignore LVM, so 405 539 jnz DIOSLVMS_SevereError ; don't save at anytime (security!) … … 476 610 DriveIO_LoadSector Proc Near Uses ax bx cx dx ds si es di 477 611 612 IFDEF 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 629 ENDIF 630 478 631 ; Is the drive not a harddrive? 479 632 cmp dl, 80h … … 494 647 cmp bptr cs:[LBASwitchTable+di], bl 495 648 jbe DIOLS_UseExtension 649 496 650 DIOLS_UseNormal: 497 mov di, 3 651 652 IFDEF 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 667 ENDIF 668 669 mov di, 3 ; retry count 498 670 DIOLS_ErrorLoop: 499 671 push ds … … 503 675 int 13h 504 676 jnc DIOLS_Success 505 dec di 677 dec di ; decrement retry count 506 678 jnz DIOLS_ErrorLoop 507 679 … … 552 724 DriveIO_ReadSectorLBA Proc Near Uses bx cx dx si di ds es 553 725 726 IFDEF 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 743 ENDIF 744 554 745 ; One sector to read 555 746 mov cs:[INT13X_DAP_NumBlocks], 1 … … 602 793 ;############################################################################## 603 794 DriveIO_WriteSectorLBA Proc Near Uses bx cx dx si di ds es 795 796 IFDEF 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 811 ENDIF 604 812 605 813 ; Mask reserved bits for wrte flags -- should check version here … … 794 1002 DriveIO_SaveSector Proc Near Uses ax bx cx dx ds si es di 795 1003 1004 IFDEF 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 1021 ENDIF 796 1022 797 1023 ;! … … 808 1034 inc cx 809 1035 xor dh,dh 810 ENDIF811 ENDIF812 813 814 ;!815 ;! DEBUG_BLOCK816 ;! Check what is being written to disk.817 ;! Uncomment below to activate.818 ;!819 __DIO_SS_DMP__ EQU820 IFDEF AUX_DEBUG821 IFDEF __DIO_SS_DMP__822 pusha823 push si824 mov si,offset [dioss]825 call AuxIO_Print826 pop si827 call DEBUG_DumpRegisters828 call AuxIO_DumpSector829 call AuxIO_TeletypeNL830 popa831 1036 ENDIF 832 1037 ENDIF … … 904 1109 905 1110 DIOSS_UseNormal: 906 mov di, 3 1111 1112 IFDEF 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 1127 ENDIF 1128 1129 mov di, 3 ; retry count 907 1130 DIOSS_ErrorLoop: 908 1131 push ds … … 912 1135 int 13h 913 1136 jnc DIOSS_Success 914 dec di 1137 dec di ; decrement retry count 915 1138 jnz DIOSS_ErrorLoop 916 1139 call MBR_SaveError … … 967 1190 ; Loads sector at [LVMSector] ! 968 1191 DriveIO_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 1193 IFDEF 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 1210 ENDIF 1211 1212 pusha 985 1213 986 1214 ; Loop over the sector-translation table, … … 1000 1228 ; Get the sector-number of the next possible LVM sector (255,127,63) 1001 1229 ; using the translation table and the counter as the index 1002 mov bx,offset secs_per_track_table1003 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 1007 1235 1008 1236 ; … … 1012 1240 ; 1013 1241 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 1243 IFDEF 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 1260 ENDIF 1261 1029 1262 1030 1263 ; Setup the requested LBA sector number … … 1036 1269 1037 1270 IFDEF 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 1058 1293 ENDIF 1059 1294 … … 1068 1303 call LVM_ValidateSector 1069 1304 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 1305 IFDEF 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 1322 ENDIF 1080 1323 1081 1324 … … 1195 1438 ; DL contains BIOS disk-number; 80h for first, 81h for second, etc. 1196 1439 DriveIO_GatherDiskInfo Proc Near 1440 1441 IFDEF 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 1458 ENDIF 1459 1197 1460 pushf 1198 1461 push bx … … 1360 1623 secs_per_track_table db 63,127,255,255,255,255 1361 1624 1362 ;db_lmlvm:db 'Load Master LVM -- disk: ',01625 db_lmlvm db 'Load Master LVM -- disk: ',0 -
trunk/bootcode/regular/other.asm
r105 r111 89 89 ; 90 90 PRECRAP_Main Proc Near 91 92 IFDEF 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 109 ENDIF 91 110 92 111 ; First initialize Variable-Area (everything with NUL) … … 180 199 int 13h 181 200 201 ; ============================================================================= 182 202 183 203 ; Start with disk at index 0 … … 206 226 207 227 pushf 208 209 ;~ mov al,'#'210 ;~ pushf211 ;~ call VideoIO_PrintSingleChar212 ;~ popf213 ;~ mov al,0214 ;~ rcl al,1215 ;~ call VideoIO_PrintHexByte216 ;~ mov al,'#'217 ;~ call VideoIO_PrintSingleChar218 228 219 229 mov bx, offset [TrueSecs] … … 264 274 jb PRECRAP_Main_next_disk 265 275 266 276 ; ============================================================================= 267 277 268 278 IFDEF AUX_DEBUG … … 292 302 293 303 ; Huge Disk indicator 294 mov si, offset [HugeBootDisk]295 call MBR_Teletype296 mov al,[HugeDisk]297 mov si, offset [No]298 test al,al299 jz MBR_HugeDriveIndicator300 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] 301 311 302 312 MBR_HugeDriveIndicator: 303 call MBR_Teletype304 xor si,si305 call MBR_TeletypeNL313 ;~ call MBR_Teletype 314 ;~ xor si,si 315 ;~ call MBR_TeletypeNL 306 316 307 317 … … 323 333 call MBR_TeletypeNL 324 334 335 ; ============================================================================= 325 336 326 337 ; Calculate Cooper-Bar Tables … … 438 449 439 450 AFTERCRAP_Main Proc Near 451 452 IFDEF 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 469 ENDIF 470 440 471 ; =================================================== 441 472 ; Now get volume label of FloppyDrive, if wanted... … … 455 486 ; Checks Configuration CheckSum...Displays message, if failed. 456 487 PRECRAP_CheckConfiguration Proc Near Uses ds si es di 488 489 IFDEF 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 506 ENDIF 507 457 508 mov si, offset Configuration 458 509 xor bx, bx -
trunk/bootcode/regular/partmain.asm
r102 r111 514 514 ; Destroyed: None 515 515 PART_HidePartition Proc Near Uses ax bx cx dx si di 516 517 IFDEF 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 534 ENDIF 535 516 536 call PART_GetPartitionPointer ; Pointer to partition (DL) -> SI 517 537 … … 565 585 ; do anything else. 566 586 PART_MarkFirstGoodPrimary Proc Near Uses ax si di 587 588 IFDEF 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 605 ENDIF 606 567 607 mov di, offset PartitionSector+446 ; DS:SI - 1st partitionentry 568 608 ; First action to do: Remove the active flag from every partition … … 944 984 ; run boot sector... 945 985 PART_StartPartition Proc Near Uses ax dx es di 986 987 IFDEF 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 1004 ENDIF 1005 946 1006 ; 947 1007 ; Local Storage for this much too large function. … … 2165 2225 ; 2166 2226 PART_IsPrimaryPartition Proc Near Uses bx cx dx si di ds es 2227 2228 IFDEF 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 2245 ENDIF 2246 2167 2247 ; Push LBA address of partition 2168 2248 push bx -
trunk/bootcode/regular/partscan.asm
r96 r111 29 29 30 30 PARTSCAN_ScanForPartitions Proc Near 31 32 IFDEF 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 49 ENDIF 50 31 51 ; Reset X-Reference 32 52 call PARTSCAN_ResetXref … … 119 139 ; 120 140 PARTSCAN_UpdateDriveLetters Proc 141 142 IFDEF 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 159 ENDIF 160 121 161 pusha 122 162 xor bx,bx ; index-pointer … … 188 228 ; falls eine Extended Partition (DOS) gefunden wird, wird erneut gescannt. 189 229 PARTSCAN_ScanDriveForPartitions Proc Near 230 231 IFDEF 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 248 ENDIF 249 190 250 xor ax, ax 191 251 xor bx, bx ; Location Absoluter Sektor 0 … … 218 278 ; be set to this location and Carry will be set 219 279 PARTSCAN_ScanPartitionForExtended Proc Near Uses si 280 281 IFDEF 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 298 ENDIF 299 220 300 mov si, offset PartitionSector+446 ; DS:SI - 1st partition entry 221 301 xor ax, ax … … 254 334 ; The following routines have NOT *DS* set to CS, so we must address via ES 255 335 PARTSCAN_ScanPartition Proc Near Uses ax si 336 337 IFDEF 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 354 ENDIF 355 356 256 357 mov si, offset PartitionSector+446 ; DS:SI - 1st Partition-Entry 257 358 PSSP_ScanLoop: … … 316 417 ; In: SI - Points to Partition-Entry (16-Bytes) 317 418 PARTSCAN_CheckThisPartition Proc Near Uses di si 419 420 IFDEF 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 437 ENDIF 438 318 439 local PartSystemID:byte, PartTypeFlags:byte 319 440 local PartCRC:word, PartPtr:word -
trunk/bootcode/special/lvm.asm
r102 r111 56 56 ; Destroyed: None 57 57 LVM_GetSectorCRC Proc Near Uses bx cx 58 59 IFDEF 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 76 ENDIF 77 58 78 push word ptr [si+LocLVM_CRC+00] 59 79 push word ptr [si+LocLVM_CRC+02] … … 165 185 ; DS:SI - points to LVM information entry 166 186 ; Destroyed: None 187 188 ; INVALID LVM RECORD WHEN STICK INSERTED ! 189 167 190 LVM_SearchForPartition Proc Near Uses cx 191 192 IFDEF 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 209 ENDIF 210 168 211 cmp byte ptr [si+LocLVM_SignatureStart], LocLVM_SignatureByte0 169 212 jne LVMSFP_NotFound ; Quick Check, if LVM sector there … … 195 238 ; assigned or no LVM-info. 196 239 LVM_GetDriveLetter Proc Near Uses bx cx dx si di ds es 240 241 IFDEF 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 258 ENDIF 259 260 261 197 262 ; For primary partitions this information is stored in the last 198 263 ; sector of track0; for all four partition entries in case they … … 216 281 ; will be set to 0ffh indicating an invalid index. 217 282 call PART_IsPrimaryPartition 283 IF 0 284 pushf 285 pusha 286 call VideoIO_PrintHexWord 287 popa 288 popf 289 ENDIF 218 290 mov al,0 219 291 rcl al,1 ; CY if primary … … 262 334 ; This locator takes care of extended OS/2 geometry should that be used 263 335 ; 336 IF 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 346 ENDIF 347 ; THIS ONE FAULTERS WHEN DISKS > 1 264 348 call DriveIO_LoadMasterLVMSector 349 350 IF 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 370 ENDIF 265 371 266 372 LVM_GetDriveLetter_is_not_pri: … … 279 385 push si 280 386 mov ax,cx 281 mov dx,bx 387 mov dx,bx ; DL DESTROYED 282 388 mov si,offset [LVMSector] 283 389 call LVM_SearchForPartition 390 391 IF 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 401 ENDIF 402 403 IFDEF 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 418 ENDIF 419 284 420 mov bx,si ; BX now points to LVM entry 285 421 mov dx,0 … … 316 452 ; Out: CY=1 if LVM-info found, 0 if no LVM-info. 317 453 LVM_SetDriveLetter Proc Near Uses bx cx dx si di ds es 454 318 455 local disk:byte 319 456 local drive_letter:byte … … 335 472 ; correct drive-letter. 336 473 ; 474 475 IFDEF 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 492 ENDIF 337 493 338 494 mov [disk], dl … … 457 613 ; Destroyed: None 458 614 LVM_RemoveVolLetterFromSector Proc Near Uses cx 615 616 IFDEF 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 633 ENDIF 634 459 635 cmp bptr [si+LocLVM_SignatureStart], LocLVM_SignatureByte0 460 636 jne LVMRVLFS_Done ; Quick Check, if LVM sector there … … 487 663 LVM_DoLetterReassignment Proc Near Uses bx cx dx si di 488 664 489 IFDEF AUX_DEBUG 665 IFDEF AUX_DEBUG 666 IF 0 667 pushf 490 668 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 495 679 popa 496 ENDIF 680 popf 681 ENDIF 682 ENDIF 497 683 498 684 mov di, si ; Save SI in DI (Partition-pointer)
Note:
See TracChangeset
for help on using the changeset viewer.