Changeset 29 for trunk/BOOTCODE/REGULAR
- Timestamp:
- May 5, 2011, 2:00:00 PM (15 years ago)
- Location:
- trunk/BOOTCODE/REGULAR
- Files:
-
- 9 edited
-
BOOTMENU.ASM (modified) (13 diffs)
-
DRIVEIO.ASM (modified) (10 diffs)
-
OTHER.ASM (modified) (3 diffs)
-
PARTMAIN.ASM (modified) (41 diffs)
-
PARTSCAN.ASM (modified) (25 diffs)
-
PASSWORD.ASM (modified) (3 diffs)
-
STD_TEXT.ASM (modified) (1 diff)
-
TIMER.ASM (modified) (1 diff)
-
VIDEOIO.ASM (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/REGULAR/BOOTMENU.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / BOOT-MENU … … 185 185 call VideoIO_Color 186 186 187 IFDEF ReleaseCommercial188 mov si, offset RegisteredTo189 call GetLenOfString190 mov dx, 144Eh191 sub dl, cl192 mov cx, dx193 call VideoIO_Locate194 mov al, TextChar_WinRep4195 call VideoIO_PrintSingleChar196 call VideoIO_Print197 mov al, TextChar_WinRep5198 call VideoIO_PrintSingleChar199 ENDIF200 201 187 ; Additional message how to enter setup 202 188 mov si, offset TXT_BootMenuEnterSetup … … 226 212 call VideoIO_Color 227 213 mov bx, 0101h 228 mov dx, 0 450h214 mov dx, 0550h 229 215 call VideoIO_MakeWindow ; Information-Window 230 216 xor di, di … … 271 257 mov cx, 0303h 272 258 call VideoIO_Locate 273 IFDEF ReleaseCommercial274 mov si, offset RegisteredTo275 ELSE276 mov si, offset BootEndMsg ; Print End-Message...277 ENDIF259 mov si, offset BootEndMsg ; Print End-Message... 260 call VideoIO_Print 261 mov cx, 0403h 262 call VideoIO_Locate 263 mov si, offset BootEndMsg2 ; Print GPL-Message... 278 264 call VideoIO_Print 279 265 ; ------------------------------------------- 280 266 mov ah, 02h 281 267 mov bh, 00h 282 mov dx, 0 500h ; Sets cursor location to 6, 0268 mov dx, 0600h ; Sets cursor location to 7, 1 283 269 int 10h 284 270 call VideoIO_CursorOn … … 366 352 call VideoIO_Color ; Violet, blue 367 353 mov si, PartPointer 368 mov al, cs:[si+LocIPT_Drive]354 mov al, [si+LocIPT_Drive] 369 355 sub al, 7Fh ; Will only display numbers up to 99, 370 356 call VideoIO_PrintByteNumber ; so only showing harddrives... … … 411 397 call VideoIO_Locate 412 398 mov si, PartPointer 413 mov al, cs:[si+LocIPT_SystemID]399 mov al, [si+LocIPT_SystemID] 414 400 call PART_SearchFileSysName 415 401 mov cx, 0C01h … … 498 484 499 485 500 501 486 ; Calculate Menu-Variables for Boot-Menu, these use the filtered Part-Pointers 502 487 BOOTMENU_ResetMenuVars Proc Near Uses dx … … 520 505 mov Menu_TotalParts, dl 521 506 522 ; Now copy the device-name to the ContBIOSbootSeq-IPT entry 523 movzx bx, CFG_ResumeBIOSbootSeq 524 dec bx 525 shl bx, 1 526 mov si, wptr [ContinueBIOSbootTable+bx] 527 mov di, offset BIOScontIPTentry+LocIPT_Name 528 push di 529 mov cx, 11 530 mov al, ' ' 531 rep stosb 532 pop di 533 BMRMV_BootDeviceCopyLoop: 534 lodsb 535 or al, al 536 jz BMRMV_NoResumeBootSeq 537 stosb 538 jmp BMRMV_BootDeviceCopyLoop 539 BMRMV_NoResumeBootSeq: 507 ; Copy device-name to the ContBIOSbootSeq-IPT entry 508 ; Normally this does not need to get done here, but is done for safety 509 ; reasons if e.g. IPT got changed by SETUP, but that setup was discarded. 510 call PART_UpdateResumeBIOSName 540 511 541 512 ; Default-Partition -> Filtered View -> Menu_EntryDefault … … 554 525 mov Menu_EntryAutomatic, dl 555 526 556 ; Okay, now we check if Default/Last Kernel Partition Name is available... 557 ; if so, simply set Menu_EntryDefault/Menu_EntryLast. 558 mov si, offset CFG_LinuxDefaultKernel 559 call LINUX_SearchKernelName ; DL - Filtered Entry No 560 cmp dl, 0FFh 561 je BMRMV_DefaultKernelNF 562 mov Menu_EntryDefault, dl 563 BMRMV_DefaultKernelNF: 564 mov si, offset CFG_LinuxLastKernel 565 call LINUX_SearchKernelName ; DL - Filtered Entry No 566 cmp dl, 0FFh 567 je BMRMV_LastKernelNF 568 mov Menu_EntryLast, dl 569 BMRMV_LastKernelNF: 527 ; [Linux support removed since v1.02] 528 ; ; Okay, now we check if Default/Last Kernel Partition Name is available... 529 ; ; if so, simply set Menu_EntryDefault/Menu_EntryLast. 530 ; mov si, offset CFG_LinuxDefaultKernel 531 ; call LINUX_SearchKernelName ; DL - Filtered Entry No 532 ; cmp dl, 0FFh 533 ; je BMRMV_DefaultKernelNF 534 ; mov Menu_EntryDefault, dl 535 ; BMRMV_DefaultKernelNF: 536 ; mov si, offset CFG_LinuxLastKernel 537 ; call LINUX_SearchKernelName ; DL - Filtered Entry No 538 ; cmp dl, 0FFh 539 ; je BMRMV_LastKernelNF 540 ; mov Menu_EntryLast, dl 541 ; BMRMV_LastKernelNF: 570 542 571 543 ; restlichen Variablen berechnen... … … 609 581 mov dl, Menu_EntrySelected 610 582 call PART_ConvertToStraight ; CFG_PartLast is non-filtered 611 mov di, offset CFG_LinuxLastKernel612 mov cx, 11583 ; mov di, offset CFG_LinuxLastKernel 584 ; mov cx, 11 613 585 cmp dl, 0FDh ; Dont Remember on Floppy/CD-ROM/etc. 614 586 ja BMSVAM_DontRememberBoot 615 je BMSVAM_RememberKernelBoot ; but remember Kernel-Bootings...587 ; je BMSVAM_RememberKernelBoot ; but remember Kernel-Bootings... 616 588 mov CFG_PartLast, dl ; Remember partition in CFG_PartLast 617 mov al, ' '618 rep stosb ; SPACE out CFG_LinuxLastKernel589 ; mov al, ' ' 590 ; rep stosb ; SPACE out CFG_LinuxLastKernel 619 591 BMSVAM_DontRememberBoot: 620 592 ret 621 622 BMSVAM_RememberKernelBoot:623 mov dl, Menu_EntrySelected624 call PART_GetPartitionPointer ; SI - Pointer to Kernel Entry...625 add si, LocIPT_Name626 rep movsb ; Copy KernelName 2 CFG_LinuxLastKernel627 ret593 ; 594 ; BMSVAM_RememberKernelBoot: 595 ; mov dl, Menu_EntrySelected 596 ; call PART_GetPartitionPointer ; SI - Pointer to Kernel Entry... 597 ; add si, LocIPT_Name 598 ; rep movsb ; Copy KernelName 2 CFG_LinuxLastKernel 599 ; ret 628 600 BOOTMENU_SetVarsAfterMenu EndP 629 601 … … 683 655 push ax dx 684 656 call TIMER_GetTicCount 685 cmp dx, wptr cs:[FloppyGetNameTimer+2]657 cmp dx, wptr [FloppyGetNameTimer+2] 686 658 ja BME_ExpiredGetFloppy 687 cmp ax, wptr cs:[FloppyGetNameTimer+0]659 cmp ax, wptr [FloppyGetNameTimer+0] 688 660 jb BME_NoFloppyNameExpired 689 661 BME_ExpiredGetFloppy: … … 825 797 add ax, CFG_TimedDelay 826 798 adc dx, 0 827 mov w ord ptr cs:[TimedTimeOut], ax828 mov w ord ptr cs:[TimedTimeOut+2], dx799 mov wptr [TimedTimeOut], ax 800 mov wptr [TimedTimeOut+2], dx 829 801 ret 830 802 BOOTMENU_ResetTimedBoot EndP … … 835 807 add ax, 36 ; 18*2 -> 2 seconds 836 808 adc dx, 0 837 mov word ptr cs:[FloppyGetNameTimer], ax838 mov word ptr cs:[FloppyGetNameTimer+2], dx809 mov word ptr [FloppyGetNameTimer], ax 810 mov word ptr [FloppyGetNameTimer+2], dx 839 811 ret 840 812 BOOTMENU_ResetGetFloppy EndP -
trunk/BOOTCODE/REGULAR/DRIVEIO.ASM
r26 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / DRIVE I/O 20 20 ;--------------------------------------------------------------------------- 21 21 22 ; Note: Some routines set DS/ES to CS, even if its not needed. 23 ; This was done for SECURITY. So DO NOT remove it. Its there to make 24 ; sure the correct data is loaded/written to/from harddrive. 25 ; 26 ; IF YOU MODIFY ANYTHING IN HERE, YOU CAN EASILY BREAK YOUR HARDDRIVE! 22 ; Note: Some routines set DS/ES to CS or even address via CS, even if its not 23 ; needed. This was done for SECURITY. So DO NOT remove it. 24 ; Its there to make sure the correct data is loaded/written to/from 25 ; harddrive. 26 ; 27 ; IF YOU MODIFY ANYTHING IN HERE, YOU MAY EASILY BREAK YOUR HARDDRIVE! 27 28 28 29 ; Will only load base-configuration, will NOT load IPT nor Hide-Config … … 124 125 ; Internal access (to AiR-BOOT) is always done via INT 13h/CHS. 125 126 127 DriveIO_GetHardDriveCount Proc Near Uses ds si 128 push ds si 129 push 0040h 130 pop ds 131 mov si, 0075h 132 mov dh, ds:[si] ; 40:75 -> POST: Total Harddiscs == DL 133 pop si ds 134 mov TotalHarddiscs, dh 135 ret 136 DriveIO_GetHardDriveCount EndP 137 138 139 ; Fills our LBA-Usage table. It holds the LBA-address, where BIOS/CHS access is 140 ; stopped and BIOS/LBA access is started. 141 ; This is calculated by Sector*Heads. Comparing will get done with Bit 25-10 142 ; on LBA sectors, so we actually divide sector number by 1024. 143 DriveIO_InitLBASwitchTable Proc Near Uses es di 144 mov di, offset LBASwitchTable 145 mov dh, TotalHarddiscs 146 mov dl, 80h 147 DIOILUT_DriveLoop: 148 push dx di 149 mov ah, 08h 150 int 13h ; DISK - GET DRIVE PARAMETERS 151 mov ah, 0FBh ; Assume 255 heads/63 sectors, if error 152 jc DIOILUT_Error 153 and cl, 111111b ; Isolate lower 6 bits of CL -> sector count 154 movzx ax, cl 155 mov bl, dh ; DH -> head count 156 mul bl ; AX = Sectors*Heads 157 shl ah, 1 158 shl ah, 1 ; Shift 2 bits, so we are able to compare to 159 ; bit 16-23 of the LBA address 160 DIOILUT_Error: 161 pop di dx 162 mov bptr ds:[di], ah ; Save that value 163 inc di ; Go to next BYTE 164 inc dl 165 dec dh 166 jnz DIOILUT_DriveLoop 167 ret 168 DriveIO_InitLBASwitchTable EndP 169 170 ; Adjusts BX:AX / CX:DX to meet LVM sector location 171 ; Destroys SI 172 DriveIO_LVMAdjustToInfoSector Proc Near Uses 173 push cx 174 xor ch, ch 175 and cl, 63 ; Isolate lower bits, because upper 176 mov si, 63 ; ones may be used for cylinder 177 sub si, cx 178 pop cx 179 add ax, si 180 adc bx, 0 ; Adjust LBA Sector (BX:AX) 181 or cl, 63 ; Set Sector to 63 182 ret 183 DriveIO_LVMAdjustToInfoSector EndP 184 126 185 Comment *ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 127 186 Routine: Loads partition to ExecBase and checks for validity … … 132 191 Preserve: all registers 133 192 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* 134 DriveIO_LoadPartition Proc Near Uses ds si 135 int 3 193 DriveIO_LoadPartition Proc Near Uses si 136 194 mov wptr cs:[CurPartition_Location+0], ax 137 195 mov wptr cs:[CurPartition_Location+2], bx 138 196 mov wptr cs:[CurPartition_Location+4], dx 139 197 mov wptr cs:[CurPartition_Location+6], cx ; Saves the location 140 push ExecBaseSeg 141 pop ds 142 mov si, ExecBasePtr ; DS:SI - ExecBase 198 mov si, offset PartitionSector ; DS:SI - ExecBase 143 199 call DriveIO_LoadSector 144 200 clc 145 cmp w ord ptr ds:[si+LocBR_Magic], 0AA55h201 cmp wptr [si+LocBR_Magic], 0AA55h 146 202 je DIOLP_Success 147 203 ; We check, if we are scanning partitions. In that case, if CHS is not 0/0/1 … … 165 221 Preserve: all registers 166 222 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* 167 DriveIO_SavePartition Proc Near Uses ax bx cx dx dssi223 DriveIO_SavePartition Proc Near Uses ax bx cx dx si 168 224 mov ax, wptr cs:[CurPartition_Location+0] 169 225 mov bx, wptr cs:[CurPartition_Location+2] 170 226 mov dx, wptr cs:[CurPartition_Location+4] 171 227 mov cx, wptr cs:[CurPartition_Location+6] ; Gets prev. saved location 172 push ExecBaseSeg173 pop ds174 mov si, ExecBasePtr ; DS:SI - ExecBase228 mov si, offset PartitionSector ; DS:SI - ExecBase 229 cmp wptr [si+LocBR_Magic], 0AA55h ; Checks for signature, if not found 230 jne DIOSP_SevereError ; we assume a really bad error 175 231 call DriveIO_SaveSector 232 DIOSP_SevereError: 176 233 ret 177 234 DriveIO_SavePartition EndP 178 235 179 ; Lsst DS:SI fr Aufrufer236 ; Keeps DS:SI for caller 180 237 DriveIO_LoadTmpSector Proc Near Uses 181 push cs182 pop ds183 238 mov si, offset TmpSector 184 239 call DriveIO_LoadSector … … 186 241 DriveIO_LoadTmpSector EndP 187 242 188 ; Lsst DS:SI fr Aufrufer243 ; Keeps DS:SI for caller 189 244 DriveIO_SaveTmpSector Proc Near Uses 190 push cs191 pop ds192 245 mov si, offset TmpSector 193 246 call DriveIO_SaveSector 194 247 ret 195 248 DriveIO_SaveTmpSector EndP 249 250 ; Keeps DS:SI for caller, sets carry if valid LVM sector encountered 251 DriveIO_LoadLVMSector Proc Near Uses ax bx cx dx 252 test [CFG_IgnoreLVM], 1 ; We are supposed to ignore LVM, so 253 jnz DIOLLVMS_NoLVMSector ; don't load but declare as bad! 254 mov ax, wptr cs:[CurPartition_Location+0] 255 mov bx, wptr cs:[CurPartition_Location+2] 256 mov dx, wptr cs:[CurPartition_Location+4] 257 mov cx, wptr cs:[CurPartition_Location+6] ; Gets cur. partition location 258 call DriveIO_LVMAdjustToInfoSector 259 mov si, offset LVMSector 260 call DriveIO_LoadSector 261 call LVM_CheckSectorSignature 262 jnc DIOLLVMS_NoLVMSector 263 call LVM_CheckSectorCRC 264 jnc DIOLLVMS_NoLVMSector 265 ret 266 ; This here is called, if an invalid (or no) LVM information sector is found 267 ; It will truncate the first byte of the sector, so all other routines 268 ; will notice it easily by just comparing the first byte. 269 DIOLLVMS_NoLVMSector: 270 mov bptr [si+LocLVM_SignatureStart], 0 271 ret 272 DriveIO_LoadLVMSector EndP 273 274 ; Keeps DS:SI for caller, saves at anytime w/o checks (!) 275 DriveIO_SaveLVMSector Proc Near Uses ax bx cx dx 276 test [CFG_IgnoreLVM], 1 ; We are supposed to ignore LVM, so 277 jnz DIOSLVMS_SevereError ; don't save at anytime (security!) 278 mov ax, wptr cs:[CurPartition_Location+0] 279 mov bx, wptr cs:[CurPartition_Location+2] 280 mov dx, wptr cs:[CurPartition_Location+4] 281 mov cx, wptr cs:[CurPartition_Location+6] ; Gets cur. partition location 282 call LVM_CheckSectorSignature 283 jnc DIOSLVMS_SevereError ; LVM Signature must be there 284 call DriveIO_LVMAdjustToInfoSector 285 mov si, offset LVMSector 286 call DriveIO_SaveSector 287 DIOSLVMS_SevereError: 288 ret 289 DriveIO_SaveLVMSector EndP 196 290 197 291 ; Memory-Block that holds information for LBA-access via INT 13h … … 206 300 ; so users will notice that something is bad with their partition table(s) 207 301 DriveIO_GotLoadError Proc Near 208 test cs:CurIO_Scanning, 1 ; Must be CS:, cause DS!=CS here302 test cs:CurIO_Scanning, 1 ; Must be CS:, cause DS!=CS maybe here 209 303 jnz InScanMode 210 304 jmp MBR_LoadError … … 213 307 push cs 214 308 pop ds 309 call MBR_Teletype 310 mov si, offset BrokenHDD 311 sub dl, 50h ; 80h -> '0' 312 cmp dl, 39h 313 jbe DIOGLE_BelowA 314 add dl, 7 ; 3Ah -> 'A' 315 DIOGLE_BelowA: 316 mov bptr [si+5], dl 215 317 call MBR_Teletype 216 318 jmp MBRLE_Halt … … 227 329 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* 228 330 DriveIO_LoadSector Proc Near Uses ax bx ds si es di 229 test cs:[CurIO_UseExtension], 1 230 jz DIOLS_UseNormal 231 ; LBA-boundary >16450560 (FB0400h) 232 cmp bx, 00FBh 233 jae DIOLS_UseExtension 234 ; or are we forced do use LBA? 235 test cs:[CFG_ForceLBAUsage], 1 236 jnz DIOLS_UseExtension 331 test cs:[CurIO_UseExtension], 1 332 jz DIOLS_UseNormal 333 ; Are we forced do use LBA via Setting? 334 test cs:[CFG_ForceLBAUsage], 1 335 jnz DIOLS_UseExtension 336 ; Is the drive not a harddrive? 337 cmp dl, 80h 338 jb DIOLS_UseNormal 339 ; Upper 8 bits of LBA-address set? -> Use LBA (maximum boundary is FB0400h) 340 or bh, bh 341 jnz DIOLS_UseExtension 342 ; Compare Switch-Table value to bit 16-23 of LBA-address 343 mov di, dx 344 and di, 007Fh 345 cmp bptr cs:[LBASwitchTable+di], bl 346 jbe DIOLS_UseExtension 237 347 DIOLS_UseNormal: 238 mov di, 3348 mov di, 3 239 349 DIOLS_ErrorLoop: 240 push ds241 pop es242 mov bx, si; ES:BX - Destination243 mov ax, 0201h; Function 2 - Load Sector244 int 13h245 jnc DIOLS_Success246 dec di247 jnz DIOLS_ErrorLoop350 push ds 351 pop es 352 mov bx, si ; ES:BX - Destination 353 mov ax, 0201h ; Function 2 - Load Sector 354 int 13h 355 jnc DIOLS_Success 356 dec di 357 jnz DIOLS_ErrorLoop 248 358 ; Sector load failed... 249 jmp DriveIO_GotLoadError359 jmp DriveIO_GotLoadError 250 360 251 361 DIOLS_UseExtension: … … 260 370 pop ds 261 371 mov si, offset DriveIO_DAP 262 mov ah, 42h ; Extended Read372 mov ah, 42h ; Extended Read 263 373 int 13h 264 374 pop cx … … 281 391 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ* 282 392 DriveIO_SaveSector Proc Near Uses ax bx cx ds si es di 283 test cs:[CurIO_UseExtension], 1 284 jz DIOSS_UseNormal 285 ; LBA-boundary >16450560 (FB0400h) 286 cmp bx, 00FBh 287 jae DIOSS_UseExtension 288 ; or are we forced do use LBA? 289 test cs:[CFG_ForceLBAUsage], 1 290 jnz DIOSS_UseExtension 393 test cs:[CurIO_UseExtension], 1 394 jz DIOSS_UseNormal 395 ; Are we forced do use LBA via Setting? 396 test cs:[CFG_ForceLBAUsage], 1 397 jnz DIOSS_UseExtension 398 ; Is the drive not a harddrive? 399 cmp dl, 80h 400 jb DIOSS_UseNormal 401 ; Upper 8 bits of LBA-address set? -> Use LBA (maximum boundary is FB0400h) 402 or bh, bh 403 jnz DIOSS_UseExtension 404 ; Compare Switch-Table value to bit 16-23 of LBA-address 405 mov di, dx 406 and di, 007Fh 407 cmp bptr cs:[LBASwitchTable+di], bl 408 jbe DIOSS_UseExtension 291 409 DIOSS_UseNormal: 292 mov di, 3410 mov di, 3 293 411 DIOSS_ErrorLoop: 294 push ds295 pop es296 mov bx, si; ES:BX - Destination297 mov ax, 0301h; Function 3 - Write Sector298 int 13h299 jnc DIOSS_Success300 dec di301 jnz DIOSS_ErrorLoop302 call MBR_SaveError412 push ds 413 pop es 414 mov bx, si ; ES:BX - Destination 415 mov ax, 0301h ; Function 3 - Write Sector 416 int 13h 417 jnc DIOSS_Success 418 dec di 419 jnz DIOSS_ErrorLoop 420 call MBR_SaveError 303 421 304 422 DIOSS_UseExtension: -
trunk/BOOTCODE/REGULAR/OTHER.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / OTHER ROUTINES … … 89 89 ; Calculate Cooper-Bar Tables 90 90 call FX_CalculateTables 91 92 ; Calculate LVM-CRC-Table 93 call LVM_InitCRCTable 94 95 ; Get HardDriveCount 96 call DriveIO_GetHardDriveCount 97 98 ; Calculate CHS/LBA Switch Table 99 call DriveIO_InitLBASwitchTable 91 100 92 101 ; Setup PartitionPointers-Table … … 140 149 int 16h 141 150 mov SETUP_KeysOnEntry, al 151 152 ; Copy device-name to the ContBIOSbootSeq-IPT entry 153 ; We may not do this before PRECRAP_CheckConfiguration, because otherwise 154 ; this check will fail. 155 call PART_UpdateResumeBIOSName 142 156 ret 143 157 PRECRAP_Main EndP -
trunk/BOOTCODE/REGULAR/PARTMAIN.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / PARTiTiON REGULAR ROUTINES … … 24 24 xor bl, bl 25 25 mov dl, CFG_PartDefault 26 call PART_FixUp PartitionNumber26 call PART_FixUpSelectionNumber 27 27 mov CFG_PartDefault, dl 28 28 mov dl, CFG_PartLast 29 call PART_FixUp PartitionNumber29 call PART_FixUpSelectionNumber 30 30 mov CFG_PartLast, dl 31 31 mov dl, CFG_PartAutomatic 32 call PART_FixUp PartitionNumber32 call PART_FixUpSelectionNumber 33 33 mov CFG_PartAutomatic, dl 34 34 35 ; Fix-Up Linux Kernel Partition - If lost, search for FAT-16 36 mov bl, 06h 37 mov dl, CFG_LinuxKrnlPartition 38 call PART_FixUpPartitionNumber 39 mov CFG_LinuxKrnlPartition, dl 40 41 ; Fix-Up Linux Root Partition - If lost, search for Linux partition (83h) 42 mov bl, 83h 43 mov dl, CFG_LinuxRootPartition 44 call PART_FixUpPartitionNumber 45 mov CFG_LinuxRootPartition, dl 35 ; [Linux support removed since v1.02] 36 ; ; Fix-Up Linux Kernel Partition - If lost, search for FAT-16 37 ; mov bl, 06h 38 ; mov dl, CFG_LinuxKrnlPartition 39 ; call PART_FixUpPartitionNumber 40 ; mov CFG_LinuxKrnlPartition, dl 41 ; 42 ; ; Fix-Up Linux Root Partition - If lost, search for Linux partition (83h) 43 ; mov bl, 83h 44 ; mov dl, CFG_LinuxRootPartition 45 ; call PART_FixUpPartitionNumber 46 ; mov CFG_LinuxRootPartition, dl 46 47 ret 47 48 PART_FixUpDefaultPartitionValues EndP … … 62 63 ; BL - Requested Partition ID 63 64 ; Out: DL - New number of partition (guessed normally ;) 64 PART_FixUpPartitionNumber Proc Near Uses ax cx 65 cmp dl, 0FFh 66 je PFUPN_PartitionDisabled 65 PART_FixUpSelectionNumber Proc Near Uses ax cx 66 cmp dl, 080h 67 je PFUPN_SelectionDisabled 68 ja PFUPN_SpecialSelection 67 69 call PARTSCAN_GetXref ; DL - PartitionNo prev IPT 68 70 cmp dh, 0FFh ; DH -> Partition No in new IPT 69 je PFUPN_PartitionGone 70 PFUPN_PartitionDisabled: 71 ret 72 73 ; Partition is not referenced in New-IPT, so dig for requested partition 74 PFUPN_PartitionGone: 71 je PFUPN_SelectionGone 72 mov dl, dh 73 PFUPN_SelectionDisabled: 74 ret 75 76 PFUPN_SpecialSelection: 77 cmp dl, 0FEh ; Resume-BIOS? 78 ja PFUPN_SpecialSelectionFloppy 79 cmp CFG_ResumeBIOSbootSeq, 0 80 je PFUPN_SelectionGone 81 jmp PFUPN_Found 82 PFUPN_SpecialSelectionFloppy: 83 cmp CFG_IncludeFloppy, 0 84 je PFUPN_SelectionGone 85 jmp PFUPN_Found 86 87 ; Partition is not referenced in New-IPT or Resume-BIOS/Floppy selected, but 88 ; actual media is disabled...so dig for requested partition 89 PFUPN_SelectionGone: 75 90 mov cl, CFG_Partitions 76 91 or cl, cl … … 94 109 PFUPN_BootableSearchLoop: 95 110 call PART_GetPartitionPointer ; Gets SI for partition DL 96 mov al, cs:[si+LocIPT_Flags]111 mov al, ds:[si+LocIPT_Flags] 97 112 and al, Flags_BootAble 98 113 jnz PFUPN_Found … … 106 121 107 122 PFUPN_NothingFound: 108 mov dl, 0 FFh ; Now being Disabled123 mov dl, 080h ; Now being Disabled 109 124 PFUPN_Found: 110 125 ret 111 PART_FixUp PartitionNumber EndP126 PART_FixUpSelectionNumber EndP 112 127 113 128 ; ============================================================================ 114 ; In: CS:SI - IPT-Entry of partition115 ; ExecBaseSeg:Ptr - Actual Boot-Record of partition129 ; In: DS:SI - IPT-Entry of partition 130 ; DS:PartitionSector - Actual Boot-Record of partition 116 131 ; Out: *none* (BootRecordCRD updated) 117 132 PART_UpdateBootRecordCRC Proc Near Uses bx 118 push ds si 119 push ExecBaseSeg 120 pop ds 121 mov si, offset ExecBasePtr 122 mov bx, 4B4Dh ; Magic: 'MK' 123 call MBR_GetCheckOfSector 124 pop si ds 125 mov cs:[si+LocIPT_BootRecordCRC], bx 133 mov si, offset PartitionSector 134 mov bx, 4B4Dh ; Magic: 'MK' 135 call MBR_GetCheckOfSector 136 mov [si+LocIPT_BootRecordCRC], bx 126 137 ret 127 138 PART_UpdateBootRecordCRC EndP 139 140 ; Copies the device-name to the Resume-BIOS IPT entry 141 PART_UpdateResumeBIOSName Proc Near Uses ax bx cx si di 142 movzx bx, CFG_ResumeBIOSbootSeq 143 dec bx 144 shl bx, 1 145 mov si, wptr [ContinueBIOSbootTable+bx] 146 mov di, offset BIOScontIPTentry+LocIPT_Name 147 push di 148 mov cx, 11 149 mov al, ' ' 150 rep stosb 151 pop di 152 PURBN_BootDeviceCopyLoop: 153 lodsb 154 or al, al 155 jz PURBN_NoResumeBootSeq 156 stosb 157 jmp PURBN_BootDeviceCopyLoop 158 PURBN_NoResumeBootSeq: 159 ret 160 PART_UpdateResumeBIOSName EndP 128 161 129 162 ; ============================================================================ … … 166 199 PCMPP_NoResumeBootSeqInclude: 167 200 168 ; Now include all Linux Kernels, if any available... 169 movzx cx, LINUX_KernelNo 170 or cx, cx 171 jz PCMPP_NoLinuxKernels 172 mov ax, offset LINUX_KernelEntries 173 PCMPP_KernelLoop: 174 mov ds:[bx], ax 175 add bx, 2 176 add ax, LocIPT_LenOfIPT 177 dec cx 178 jnz PCMPP_KernelLoop 179 PCMPP_NoLinuxKernels: 201 ; [Linux support removed since v1.02] 202 ; ; Now include all Linux Kernels, if any available... 203 ; movzx cx, LINUX_KernelNo 204 ; or cx, cx 205 ; jz PCMPP_NoLinuxKernels 206 ; mov ax, offset LINUX_KernelEntries 207 ; PCMPP_KernelLoop: 208 ; mov ds:[bx], ax 209 ; add bx, 2 210 ; add ax, LocIPT_LenOfIPT 211 ; dec cx 212 ; jnz PCMPP_KernelLoop 213 ; PCMPP_NoLinuxKernels: 180 214 181 215 movzx cx, CFG_Partitions ; LocIPT_MaxPartitions … … 201 235 ; Gets a pointer to the given partition 202 236 ; In: DL - Number of partition 203 ; Out: SI - Pointer to it (use CS)237 ; Out: SI - Pointer to it 204 238 PART_GetPartitionPointer Proc Near Uses bx 205 239 cmp dl, 0FEh … … 208 242 movzx bx, dl 209 243 shl bx, 1 210 mov si, wptr cs:[PartitionPointers+bx]244 mov si, wptr [PartitionPointers+bx] 211 245 ret 212 246 PGPP_IsBIOSbootSeq: … … 250 284 jb PCTS_IsBIOSbootSeq 251 285 je PCTS_IsFloppy 252 cmp ax, offset LINUX_KernelEntries 253 jae PCTS_IsKernelEntry 286 ; [Linux support removed since v1.02] 287 ; cmp ax, offset LINUX_KernelEntries 288 ; jae PCTS_IsKernelEntry 254 289 sub ax, offset PartitionTable 255 290 mov bl, LocIPT_LenOfIPT … … 257 292 mov dl, al 258 293 ret 259 PCTS_IsKernelEntry: 260 mov dl, 0FDh 261 ret 294 ; [Linux support removed since v1.02] 295 ; PCTS_IsKernelEntry: 296 ; mov dl, 0FDh 297 ; ret 262 298 PCTS_IsBIOSbootSeq: 263 299 mov dl, 0FEh … … 271 307 ; Out: DL - Number of partition in filtered view 272 308 PART_ConvertFromStraight Proc Near Uses es di 309 cmp dl, 0FEh 310 jb PCFS_IsPartition 311 mov ax, offset BIOScontIPTentry 312 je PCFS_DoSearch 313 mov ax, offset FloppyIPTentry 314 jmp PCFS_DoSearch 315 PCFS_IsPartition: 273 316 ; First we get Partition-Offset in AX 274 317 movzx ax, dl … … 276 319 mul bl 277 320 add ax, offset PartitionTable 321 PCFS_DoSearch: 278 322 ; Now search for this offset in our filtered Partition-Pointer-Table 279 323 push cs … … 297 341 ; Destroyed: AX 298 342 PART_GetSizeElementPointer Proc Near Uses bx 299 cmp ax, offset LINUX_KernelEntries 300 jae PGSEP_IsKernelEntry 343 ; [Linux support removed since v1.02] 344 ; cmp ax, offset LINUX_KernelEntries 345 ; jae PGSEP_IsKernelEntry 301 346 mov si, offset PartitionSizeTable 302 347 sub ax, offset PartitionTable 303 jmp PGSEP_Continue 304 PGSEP_IsKernelEntry: 305 mov si, offset LINUX_KernelSizeTable 306 sub ax, offset LINUX_KernelEntries 307 PGSEP_Continue: 348 ; jmp PGSEP_Continue 349 ; [Linux support removed since v1.02] 350 ; PGSEP_IsKernelEntry: 351 ; mov si, offset LINUX_KernelSizeTable 352 ; sub ax, offset LINUX_KernelEntries 353 ; PGSEP_Continue: 308 354 mov bl, LocIPT_LenOfIPT 309 355 div bl ; Divide with IPTlength … … 381 427 ; install MBR Protection, if wanted 382 428 ; Special Boot Support, if needed (OS/2 Extended partitions) 429 ; Copy boot-sector to StartBase 383 430 ; run boot sector... 384 431 PART_StartPartition Proc Near Uses ax dx es di … … 389 436 call PART_ConvertToStraight ; ...we save straight view for later... 390 437 mov BootPartNo, dl 438 ; Straight - FFh -> Floppy boot 439 ; FEh -> BIOS continue (CD-ROM, ZIP, etc.) 391 440 392 441 ; We need straight pointers from now on, so calculate the table... … … 397 446 398 447 push si 399 mov dl, cs:[si+LocIPT_Drive]400 mov dh, cs:[si+LocIPT_SystemID]448 mov dl, [si+LocIPT_Drive] 449 mov dh, [si+LocIPT_SystemID] 401 450 ; Copy Partition-Name to BootingNow area for display purposes 402 451 add si, LocIPT_Name … … 411 460 mov si, offset TXT_BootingNow1 412 461 call MBR_Teletype 413 cmp dh, 0FDh 414 je PSP_IsKernel 462 ; [Linux support removed since v1.02] 463 ; cmp dh, 0FDh 464 ; je PSP_IsKernel 415 465 or dl, dl 416 466 jnz PSP_IsHarddisc … … 420 470 jmp PSP_IsFloppyCDROMetc 421 471 422 PSP_IsKernel: 423 IFDEF ReleaseCode 424 ; Save configuration on HDD boots (save CFG_LinuxLastKernel) 425 call DriveIO_SaveConfiguration 426 ENDIF 427 call MBR_Teletype ; Prints out BootingNow2 including KernelName 428 mov si, offset TXT_BootingNowKernel 429 call MBR_Teletype 430 jmp PSP_IsFloppyCDROMetc 472 ; [Linux support removed since v1.02] 473 ; PSP_IsKernel: 474 ; IFDEF ReleaseCode 475 ; ; Save configuration on HDD boots (save CFG_LinuxLastKernel) 476 ; call DriveIO_SaveConfiguration 477 ; ENDIF 478 ; call MBR_Teletype ; Prints out BootingNow2 including KernelName 479 ; mov si, offset TXT_BootingNowKernel 480 ; call MBR_Teletype 481 ; jmp PSP_IsFloppyCDROMetc 431 482 432 483 PSP_IsHarddisc: … … 440 491 pop si ; restores SI (IPT-pointer) 441 492 442 mov ax, wptr cs:[si+LocIPT_AbsolutePartTable+0]443 mov bx, wptr cs:[si+LocIPT_AbsolutePartTable+2]444 mov cx, wptr cs:[si+LocIPT_LocationPartTable+1]445 mov dh, bptr cs:[si+LocIPT_LocationPartTable+0]446 mov dl, cs:[si+LocIPT_Drive]493 mov ax, wptr [si+LocIPT_AbsolutePartTable+0] 494 mov bx, wptr [si+LocIPT_AbsolutePartTable+2] 495 mov cx, wptr [si+LocIPT_LocationPartTable+1] 496 mov dh, bptr [si+LocIPT_LocationPartTable+0] 497 mov dl, [si+LocIPT_Drive] 447 498 call DriveIO_LoadPartition ; Load Table... 448 499 ; --------------------------------------------------- MODIFY PARTITION TABLE 449 push ExecBaseSeg500 push cs 450 501 pop es 451 mov di, ExecBasePtr 452 add di, 446 ; DS:SI - Erster Partitionseintrag 502 mov di, offset PartitionSector+446 ; ES:DI - First Partitionentry 453 503 454 504 ; Remove all active-flags for safety reasons, primary partition table will … … 464 514 465 515 ; Put the partition-to-be-booted location into registers... 466 mov ax, wptr cs:[si+LocIPT_AbsoluteBegin+0]467 mov bx, wptr cs:[si+LocIPT_AbsoluteBegin+2]468 sub ax, wptr cs:[si+LocIPT_AbsolutePartTable+0]469 sbb bx, wptr cs:[si+LocIPT_AbsolutePartTable+2]516 mov ax, wptr [si+LocIPT_AbsoluteBegin+0] 517 mov bx, wptr [si+LocIPT_AbsoluteBegin+2] 518 sub ax, wptr [si+LocIPT_AbsolutePartTable+0] 519 sbb bx, wptr [si+LocIPT_AbsolutePartTable+2] 470 520 ; BX:AX - absolute position of partition relative to partition table 471 521 ; ...and search for it... … … 478 528 PSP_SearchMismatch: 479 529 add di, LocBRPT_LenOfEntry ; 16 Bytes per Partition-Entry 480 cmp di, 500+ ExecBasePtr530 cmp di, 500+offset PartitionSector 481 531 jb PSP_SearchLoop 482 532 jmp MBR_HaltSystem … … 493 543 ; If yes, set magic bytes 'I13X' at 3000:0 for boot-loader to recognize. 494 544 ; This method is (c) by IBM <g> 495 mov ax, wptr cs:[si+LocIPT_AbsoluteBegin+0]496 mov bx, wptr cs:[si+LocIPT_AbsoluteBegin+2]545 mov ax, wptr [si+LocIPT_AbsoluteBegin+0] 546 mov bx, wptr [si+LocIPT_AbsoluteBegin+2] 497 547 add ax, wptr es:[di+LocBRPT_AbsoluteLength+0] ; Add length to absolute 498 548 adc bx, wptr es:[di+LocBRPT_AbsoluteLength+2] ; begin location … … 515 565 516 566 ; now check, if we need to hide any partition 517 test byte ptr cs:[si+LocIPT_Flags], Flags_HideFeature567 test byte ptr [si+LocIPT_Flags], Flags_HideFeature 518 568 jz PSP_NoHideFeature 519 569 ; --------------------------------------------------------- PARTITION HIDING … … 532 582 mov cl, CFG_Partitions 533 583 PSP_PartitionsHideLoop: 534 mov dl, cs:[di]584 mov dl, es:[di] 535 585 inc di 536 586 cmp dl, 0FFh … … 543 593 ; So something got hidden and we have to remark a primary partition, 544 594 ; if we are booting something non-primary from 1st hdd. 545 cmp bptr ds:[si+LocIPT_Drive], 80h595 cmp bptr [si+LocIPT_Drive], 80h 546 596 ja PSP_HideAdjustPrimaryMark ; When booting any hdd, but 1st 547 mov ax, wptr ds:[si+LocIPT_AbsolutePartTable]548 mov bx, wptr ds:[si+LocIPT_AbsolutePartTable+2]597 mov ax, wptr [si+LocIPT_AbsolutePartTable] 598 mov bx, wptr [si+LocIPT_AbsolutePartTable+2] 549 599 or ax, ax 550 600 jnz PSP_HideAdjustPrimaryMark ; or booting non-primary partition … … 565 615 566 616 PSP_NoHideFeature: 617 ; Check, if we are supposed to ignore LVM altogether... 618 test [CFG_IgnoreLVM], 1 619 jnz PSP_NoLVMReassignment 620 ; --------------------------------------------------------- LVM REASSIGNMENT 621 ; Driveletter must be set for this partition 622 test byte ptr [si+LocIPT_Flags], Flags_DriveLetter 623 jz PSP_NoLVMReassignment 624 movzx bx, BootPartNo ; EntryNumber is straight view 625 mov al, bptr [DriveLetters+bx] 626 sub al, 3Dh ; Convert e.g. 80h -> 'C' 627 cmp al, bptr [PartitionVolumeLetters+bx] 628 je PSP_NoLVMReassignment ; If driveletters match -> no change 629 call LVM_DoLetterReassignment ; Give partition SI letter AL 630 PSP_NoLVMReassignment: 567 631 push si 568 632 ; ------------------------------------------------------- -"PLEASE WAIT..."- … … 584 648 ; -------------------------------------------------- SPECIAL BOOT PROCESSING 585 649 ; Check here, if the Boot shall be done via resume to BIOS... 586 mov al, bptr cs:[si+LocIPT_SystemID]650 mov al, bptr [si+LocIPT_SystemID] 587 651 cmp al, 0FEh ; Via BIOS ? (aka resume BIOS boot sequence) 588 652 je PSP_ResumeBIOSbootSeq 589 cmp al, 0FDh ; Kernel-Booting ? 590 je PSP_KernelBooting 653 ; [Linux support removed since v1.02] 654 ; cmp al, 0FDh ; Kernel-Booting ? 655 ; je PSP_KernelBooting 591 656 jmp PSP_StartNormal 592 657 … … 597 662 dw 0F000h 598 663 599 PSP_KernelBooting: 600 call LINUX_LoadKernel ; DS:SI - Entry Pointer to Kernel 601 db 0EAh ; if return to here -> Reboot 602 dw 0FFF0h 603 dw 0F000h 604 605 ; ================================================================== 606 ; FROM THIS POINT ON, ONLY *SI* REGISTER IS NEEDED TO BE PRESERVED 607 ; ================================================================== 664 ; [Linux support removed since v1.02] 665 ; PSP_KernelBooting: 666 ; call LINUX_LoadKernel ; DS:SI - Entry Pointer to Kernel 667 ; db 0EAh ; if return to here -> Reboot 668 ; dw 0FFF0h 669 ; dw 0F000h 670 671 ; ======================================================================= 672 ; FROM THIS POINT ON, ONLY DS and SI REGISTER IS NEEDED TO BE PRESERVED 673 ; ======================================================================= 608 674 609 675 PSP_StartNormal: 610 mov ax, wptr cs:[si+LocIPT_AbsoluteBegin+0]611 mov bx, wptr cs:[si+LocIPT_AbsoluteBegin+2]612 mov cx, cs:[si+LocIPT_LocationBegin+1]613 mov dh, cs:[si+LocIPT_LocationBegin+0]614 mov dl, cs:[si+LocIPT_Drive]676 mov ax, wptr [si+LocIPT_AbsoluteBegin+0] 677 mov bx, wptr [si+LocIPT_AbsoluteBegin+2] 678 mov cx, [si+LocIPT_LocationBegin+1] 679 mov dh, [si+LocIPT_LocationBegin+0] 680 mov dl, [si+LocIPT_Drive] 615 681 call DriveIO_LoadPartition ; Loads boot-sector... 616 682 617 683 test CFG_DetectVIBR, 1 618 684 jz PSP_NoVIBR 619 test byte ptr cs:[si+LocIPT_Flags], Flags_VIBR_Detection685 test byte ptr [si+LocIPT_Flags], Flags_VIBR_Detection 620 686 jz PSP_NoVIBR 621 687 ; ---------------------------------------------------------- CHECKS FOR VIBR 622 push ds si 623 push ExecBaseSeg 624 pop ds 625 mov si, offset ExecBasePtr 688 push si 689 mov si, offset PartitionSector 626 690 mov bx, 4B4Dh ; Magic: 'MK' 627 691 call MBR_GetCheckOfSector 628 pop si ds629 cmp cs:[si+LocIPT_BootRecordCRC], bx692 pop si 693 cmp [si+LocIPT_BootRecordCRC], bx 630 694 je PSP_NoVIBR 631 mov bx, cs:[si+LocIPT_BootRecordCRC]695 mov bx, [si+LocIPT_BootRecordCRC] 632 696 or bx, bx 633 697 jz PSP_NoVIBR … … 645 709 jz PSP_NoMBRprotect 646 710 ; -------------------------------------------------- INSTALLS MBR-PROTECTION 647 push si ; We needSI later...711 push ds si ; We need DS:SI later... 648 712 ; First subtract 1024 bytes from Base-Memory... 649 713 push ds … … 658 722 ; Now copy in our code (to DX:0)... 659 723 660 mov ax, cs 661 mov ds, ax 662 mov si, offset MBR_Protection ; DS:SI - Source Image 724 mov si, offset MBR_Protection ; DS:SI - Source Image 663 725 mov es, dx 664 xor di, di ; ES:DI - Destination726 xor di, di ; ES:DI - Destination 665 727 mov cx, 512 666 rep movsw ; Move 1024 bytes...728 rep movsw ; Move 1024 bytes... 667 729 668 730 ; Now fill in variables... … … 671 733 mov ds, ax 672 734 mov si, 10h*4 673 xor di, di ; INT 10h Vector to MBR Protection735 xor di, di ; INT 10h Vector to MBR Protection 674 736 movsd 675 mov si, 13h*4 ; INT 13h Vector to MBR Protection737 mov si, 13h*4 ; INT 13h Vector to MBR Protection 676 738 movsd 677 mov al, CFG_IgnoreWriteToMBR ; Option to MBR Protection739 mov al, CFG_IgnoreWriteToMBR ; Option to MBR Protection 678 740 stosb 679 741 … … 683 745 mov ax, 9 684 746 mov ds:[si], ax 685 mov ds:[si+2], dx ; Vector hardcoded at DS:0009747 mov ds:[si+2], dx ; Vector hardcoded at DS:0009 686 748 ; MBR-Protection now active :) 687 pop si ; RestoreSI749 pop si ds ; Restore DS:SI 688 750 689 751 ; ------------------------------------------------ SPECIAL PARTITION SUPPORT 690 752 ; needed by OS/2 Warp / eComStation 691 753 PSP_NoMBRprotect: 692 cmp bptr cs:[si+LocIPT_SystemID], 08; I hate Microsuck NTFS check754 cmp bptr [si+LocIPT_SystemID], 08 ; I hate Microsuck NTFS check 693 755 je PSP_NoSpecialSupport 694 756 695 push ExecBaseSeg 696 pop es 697 mov di, ExecBasePtr ; ES:DI - Actual Boot-Record 757 mov di, offset PartitionSector ; ES:DI - Actual Boot-Record 698 758 ; Special Support Detection 699 759 mov ax, wptr es:[di+24] … … 707 767 jne PSP_NoSpecialSupport 708 768 ; Special Support needed 709 mov al, bptr cs:[si+LocIPT_Drive]769 mov al, bptr [si+LocIPT_Drive] 710 770 mov bptr es:[di+36], al ; Write Actual Drive-Letter 711 mov ax, cs:[si+LocIPT_AbsoluteBegin]771 mov ax, [si+LocIPT_AbsoluteBegin] 712 772 mov wptr es:[di+28], ax ; Fixing Hidden Sectors count 713 mov ax, cs:[si+LocIPT_AbsoluteBegin+2]773 mov ax, [si+LocIPT_AbsoluteBegin+2] 714 774 mov wptr es:[di+30], ax ; Done by OS/2 BootMan as well... 715 775 716 776 ; ------------------------------------------------ LOGICAL PARTITION SUPPORT 717 777 PSP_NoSpecialSupport: 718 test byte ptr cs:[si+LocIPT_Flags], Flags_DriveLetter778 test byte ptr [si+LocIPT_Flags], Flags_DriveLetter 719 779 jz PSP_NoLogicalSupport 720 780 721 781 movzx bx, BootPartNo ; EntryNumber is straight view 722 mov al, bptr cs:[DriveLetters+bx]782 mov al, bptr [DriveLetters+bx] 723 783 mov bptr es:[di+37], al ; Write Drive Letter (OS/2 only) 724 784 785 ; -------------------------------------------- COPY BOOT-RECORD TO STARTBASE 786 PSP_NoLogicalSupport: 787 push si 788 mov ax, StartBaseSeg 789 mov es, ax 790 mov cx, 256 791 mov si, offset PartitionSector 792 mov di, StartBasePtr 793 rep movsw 794 pop si 725 795 ; ---------------------------------------------------- NOW START BOOT-RECORD 726 PSP_NoLogicalSupport:727 796 xor ax, ax 728 797 xor bx, bx … … 732 801 xor dh, dh ; Drive supported by BIOS 733 802 mov dl, cs:[si+LocIPT_Drive] ; Drive Physical No 734 db 0EAh ; JUMP TO Entry Point...Bye Bye 735 dw ExecBasePtr 736 dw ExecBaseSeg 803 IFDEF ReleaseCode 804 db 0EAh ; JUMP TO Entry Point...Bye Bye 805 dw StartBasePtr 806 dw StartBaseSeg 807 ENDIF 737 808 PART_StartPartition EndP 738 809 … … 740 811 ; In: DL - Partition to hide 741 812 ; Destroyed: None 742 PART_HidePartition Proc Near Uses ax bx cx dx si esdi813 PART_HidePartition Proc Near Uses ax bx cx dx si di 743 814 call PART_GetPartitionPointer ; Pointer to partition (DL) -> SI 744 815 745 816 ; First load the partition table of that partition... 746 mov ax, wptr cs:[si+LocIPT_AbsolutePartTable+0]747 mov bx, wptr cs:[si+LocIPT_AbsolutePartTable+2]748 mov cx, wptr cs:[si+LocIPT_LocationPartTable+1]749 mov dh, bptr cs:[si+LocIPT_LocationPartTable+0]750 mov dl, cs:[si+LocIPT_Drive]817 mov ax, wptr [si+LocIPT_AbsolutePartTable+0] 818 mov bx, wptr [si+LocIPT_AbsolutePartTable+2] 819 mov cx, wptr [si+LocIPT_LocationPartTable+1] 820 mov dh, bptr [si+LocIPT_LocationPartTable+0] 821 mov dl, [si+LocIPT_Drive] 751 822 call DriveIO_LoadPartition 752 823 ; Partition-Table now LOADED 753 push ExecBaseSeg 754 pop es 755 mov di, ExecBasePtr 756 add di, 446 ; DS:SI - 1st partitionentry... 824 mov di, offset PartitionSector+446 ; ES:DI - 1st partitionentry... 757 825 758 826 ; Put our partition's location into registers... 759 mov ax, wptr cs:[si+LocIPT_AbsoluteBegin+0]760 mov bx, wptr cs:[si+LocIPT_AbsoluteBegin+2]761 sub ax, wptr cs:[si+LocIPT_AbsolutePartTable+0]762 sbb bx, wptr cs:[si+LocIPT_AbsolutePartTable+2]827 mov ax, wptr [si+LocIPT_AbsoluteBegin+0] 828 mov bx, wptr [si+LocIPT_AbsoluteBegin+2] 829 sub ax, wptr [si+LocIPT_AbsolutePartTable+0] 830 sbb bx, wptr [si+LocIPT_AbsolutePartTable+2] 763 831 ; BX:AX - absolute position of partition relative to partition table 764 832 ; ...and search for it... … … 771 839 PHP_SearchMismatch: 772 840 add di, LocBRPT_LenOfEntry ; 16 Bytes per partition entry 773 cmp di, 500+ ExecBasePtr841 cmp di, 500+offset PartitionSector 774 842 jb PHP_SearchLoop 775 843 jmp MBR_HaltSystem ; not found, something is wrong here … … 792 860 ; *not* the BIOS. This one *could* cause havoc to some systems, but I can't 793 861 ; do anything else. 794 ; =In this routine DS may not be equal CS= 795 PART_MarkFirstGoodPrimary Proc Near Uses ax si es di 796 push ExecBaseSeg 797 pop es 798 mov di, ExecBasePtr 799 add di, 446 ; DS:SI - First Partition-Entry 862 PART_MarkFirstGoodPrimary Proc Near Uses ax si di 863 mov di, offset PartitionSector+446 ; DS:SI - 1st partitionentry 800 864 ; First action to do: Remove the active flag from every partition 801 865 push di … … 827 891 PMPP_Search1NoHit: 828 892 add di, LocBRPT_LenOfEntry ; 16 Bytes per Partition-Entry 829 cmp di, 500+ ExecBasePtr893 cmp di, 500+offset PartitionSector 830 894 jb PMPP_Search1Loop 831 895 832 mov di, ExecBasePtr 833 add di, 446 ; DS:SI - First Partition-Entry 896 mov di, offset PartitionSector+446 ; DS:SI - 1st Partition-Entry 834 897 ; Second Search, hit on anything that is not an extended partition 835 898 ; (05 or 0Fh) … … 844 907 PMPP_Search2NoHit: 845 908 add di, LocBRPT_LenOfEntry ; 16 Bytes per Partition-Entry 846 cmp di, 500+ ExecBasePtr909 cmp di, 500+offset PartitionSector 847 910 jb PMPP_Search2Loop 848 911 jmp PMPP_SearchFailed … … 859 922 ; SI - Pointer to Name (8char) 860 923 ; Destroyed: *none* 861 PART_SearchFileSysName Proc Near Uses dsbx dx924 PART_SearchFileSysName Proc Near Uses bx dx 862 925 movzx bx, al 863 push cs864 pop ds865 926 mov si, offset FileSysIDs 866 927 PSFSN_SearchLoop: … … 892 953 ; In: AL - FileSysID 893 954 ; Out: AL - Hidden File-System-ID 894 PART_SearchFileSysHiddenID Proc Near Uses dsbx955 PART_SearchFileSysHiddenID Proc Near Uses bx 895 956 movzx bx, al 896 push cs897 pop ds898 957 mov si, offset FileSysIDs 899 958 PSFSHI_SearchLoop: -
trunk/BOOTCODE/REGULAR/PARTSCAN.ASM
r26 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / PARTiTiON SCANNING 20 20 ;--------------------------------------------------------------------------- 21 21 22 ; Note: This is complex code. Also some of these functions have DS != CS, so23 ; make sure that you know what you are doing inhere.22 ; Note: This is complex code. So make sure that you know what you are doing in 23 ; here. 24 24 25 25 PARTSCAN_ScanForPartitions Proc Near Uses … … 27 27 call PARTSCAN_ResetXref 28 28 29 push ds si 30 push 0040h 31 pop ds 32 mov si, 0075h 33 mov dh, ds:[si] ; 40:75 -> POST: Total Harddiscs == DL 34 pop si ds 35 mov TotalHarddiscs, dh 29 mov dh, TotalHarddiscs 36 30 xor al, al 37 31 mov NewPartitions, al … … 67 61 rep movsw 68 62 69 ; Search for any Linux partition and remember, if it got found... 70 mov si, offset PartitionTable 71 movzx cx, CFG_Partitions 72 xor dl, dl ; DL - Is Linux here ? 73 or cx, cx 74 jz PSSFP_NoPartitions 75 PSSFP_LinuxLoop: 76 cmp bptr [si+LocIPT_SystemID], 083h ; Hard-Coded 77 jne PSSFP_NoLinux 78 mov dl, 1 ; Linux found... 79 PSSFP_NoLinux: 80 add si, LocIPT_LenOfIPT 81 loop PSSFP_LinuxLoop 82 PSSFP_NoPartitions: 83 mov GotLinux, dl ; Set Flag 63 ; [Linux support removed since v1.02] 64 ; ; Search for any Linux partition and remember, if it got found... 65 ; mov si, offset PartitionTable 66 ; movzx cx, CFG_Partitions 67 ; xor dl, dl ; DL - Is Linux here ? 68 ; or cx, cx 69 ; jz PSSFP_NoPartitions 70 ; PSSFP_LinuxLoop: 71 ; cmp bptr [si+LocIPT_SystemID], 083h ; Hard-Coded 72 ; jne PSSFP_NoLinux 73 ; mov dl, 1 ; Linux found... 74 ; PSSFP_NoLinux: 75 ; add si, LocIPT_LenOfIPT 76 ; loop PSSFP_LinuxLoop 77 ; PSSFP_NoPartitions: 78 ; mov GotLinux, dl ; Set Flag 84 79 85 80 ; ...and finally check, if we need to set a Drive-Letter … … 125 120 call DriveIO_LoadPartition 126 121 jc PSSDFP_InvalidPartition 122 ; LVM Support - Reads LVM Information Sector 123 call DriveIO_LoadLVMSector 127 124 call PARTSCAN_ScanPartition 128 125 IFDEF ReleaseCode … … 135 132 PARTSCAN_ScanDriveForPartitions EndP 136 133 134 ; Scans Current Partition for Extended Partitions, if found, AX,BX,CX,DX will 135 ; be set to this location and Carry will be set 136 PARTSCAN_ScanPartitionForExtended Proc Near Uses si 137 mov si, offset PartitionSector+446 ; DS:SI - 1st partition entry 138 xor ax, ax 139 PSSPFE_ScanLoop: 140 mov al, [si+LocBRPT_SystemID] 141 cmp al, 5 ; Is Partition EXTENDED ? 142 je PSSPFE_ExtendedPartition 143 cmp al, 0Fh ; Is Partition EXTENDED (M$) ? 144 je PSSPFE_ExtendedPartition 145 jmp PSSPFE_IgnorePartition 146 PSSPFE_ExtendedPartition: 147 mov ax, wptr [si+LocBRPT_RelativeBegin] 148 mov bx, wptr [si+LocBRPT_RelativeBegin+2] 149 add ax, wptr [ExtendedAbsPos+0] ; Adjust... 150 adc bx, wptr [ExtendedAbsPos+2] ; (Shit Design!) 151 test [ExtendedAbsPosSet], 1 152 jnz PSSPFE_ExtendedMainKnown 153 mov wptr [ExtendedAbsPos+0], ax 154 mov wptr [ExtendedAbsPos+2], bx 155 mov [ExtendedAbsPosSet], 1 156 PSSPFE_ExtendedMainKnown: 157 mov cx, wptr [si+LocBRPT_BeginSector] ; Cylinder/Sector 158 mov dh, bptr [si+LocBRPT_BeginHead] ; Head 159 mov dl, bptr [CurPartition_Location+4] ; Drive 160 stc 161 jmp PSSPFE_EndOfSearch 162 PSSPFE_IgnorePartition: 163 add si, LocBRPT_LenOfEntry 164 cmp si, 500+offset PartitionSector 165 jb PSSPFE_ScanLoop 166 clc 167 PSSPFE_EndOfSearch: 168 ret 169 PARTSCAN_ScanPartitionForExtended EndP 170 137 171 ; The following routines have NOT *DS* set to CS, so we must address via ES 138 PARTSCAN_ScanPartition Proc Near Uses ax ds si 139 push ExecBaseSeg 140 pop ds 141 mov si, ExecBasePtr 142 add si, 446 ; DS:SI - First Partition-Entry 172 PARTSCAN_ScanPartition Proc Near Uses ax si 173 mov si, offset PartitionSector+446 ; DS:SI - 1st Partition-Entry 143 174 PSSP_ScanLoop: 144 mov al, bptr ds:[si+LocBRPT_SystemID]175 mov al, bptr [si+LocBRPT_SystemID] 145 176 cmp al, 5 ; Is Partition EXTENDED ? 146 177 je PSSP_IgnorePartition … … 149 180 cmp al, 0 ; Is Partition EMPTY ? 150 181 je PSSP_IgnorePartition 151 ; Ignore th is Partitions, because there are no real Partitions182 ; Ignore these partitions, because there are no real Partitions 152 183 call PARTSCAN_CheckThisPartition 153 184 PSSP_IgnorePartition: 154 185 ; Lscht das Boot-Able Flag... 155 and byte ptr ds:[si+LocBRPT_Flags], 7Fh ; Reset the Active-Flag186 and byte ptr [si+LocBRPT_Flags], 7Fh ; Reset the Active-Flag 156 187 add si, LocBRPT_LenOfEntry ; 16 Bytes per partition entry 157 cmp si, 500+ ExecBasePtr188 cmp si, 500+offset PartitionSector 158 189 jb PSSP_ScanLoop 159 190 ; If we are on first HDD and in primary partition table -> mark primary 160 cmp bptr es:[CurPartition_Location+4], 80h ; Drive191 cmp bptr [CurPartition_Location+4], 80h ; Drive 161 192 jne PSSP_NoMarkPrimary 162 cmp wptr es:[CurPartition_Location+0], 0193 cmp wptr [CurPartition_Location+0], 0 163 194 jne PSSP_NoMarkPrimary 164 cmp wptr es:[CurPartition_Location+2], 0 ; Absolute Location195 cmp wptr [CurPartition_Location+2], 0 ; Absolute Location 165 196 jne PSSP_NoMarkPrimary 166 197 call PART_MarkFirstGoodPrimary … … 175 206 ; the old table, otherwise they are generated freshly. 176 207 ; Will also fill out PartitionXref to sync HideConfig later 177 ; In: DS:SI - Partition-Entry (16-Bytes) 178 ; ES - is CS 179 ; (DS is *NOT* CS here) 180 PARTSCAN_CheckThisPartition Proc Near Uses di ds si 208 ; In: SI - Points to Partition-Entry (16-Bytes) 209 PARTSCAN_CheckThisPartition Proc Near Uses di si 181 210 local PartSystemID:byte, PartTypeFlags:byte 182 local PartCRC:word, PartPtr:dword 183 184 mov ax, ds 185 mov wptr [PartPtr+2], ax ; ... 186 mov wptr [PartPtr+0], si ; Save Pointer to PartitionEntry 187 188 mov al, bptr ds:[si+LocBRPT_SystemID] 211 local PartCRC:word, PartPtr:word 212 213 mov wptr [PartPtr], si ; Save Pointer to PartitionEntry 214 215 mov al, bptr [si+LocBRPT_SystemID] 189 216 mov PartSystemID, al 190 217 191 mov cx, wptr ds:[si+LocBRPT_BeginSector] ; Cylinder/Sector192 mov dh, bptr ds:[si+LocBRPT_BeginHead] ; Head193 mov dl, bptr es:[CurPartition_Location+4] ; Drive194 mov ax, wptr ds:[si+LocBRPT_RelativeBegin] ; Absolute Sector195 mov bx, wptr ds:[si+LocBRPT_RelativeBegin+2]196 add ax, wptr es:[CurPartition_Location+0] ; +Partition-Absolute197 adc bx, wptr es:[CurPartition_Location+2] ; sectors218 mov cx, wptr [si+LocBRPT_BeginSector] ; Cylinder/Sector 219 mov dh, bptr [si+LocBRPT_BeginHead] ; Head 220 mov dl, bptr [CurPartition_Location+4] ; Drive 221 mov ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector 222 mov bx, wptr [si+LocBRPT_RelativeBegin+2] 223 add ax, wptr [CurPartition_Location+0] ; +Partition-Absolute 224 adc bx, wptr [CurPartition_Location+2] ; sectors 198 225 call DriveIO_LoadTmpSector ; Loads Boot record 199 226 ; Sets up DS:SI - TmpSector … … 218 245 ; SI - Boot-Record of Partition 219 246 ; DI - File System Name 220 ; DS==CS here221 247 ;================================ 222 248 249 cmp PartSystemID, 07h ; We got IFS here? 250 jne PCCTP_IFSdone 251 ; Check, if 'JFS ' is at DWORD offset 36h 252 cmp wptr [si+36h], 'FJ' 253 jne PCCTP_IFSnoJFS 254 cmp wptr [si+38h], ' S' 255 jne PCCTP_IFSnoJFS 256 mov PartSystemID, 0FCh ; FC is JFS internally 257 jmp PCCTP_IFSdone 258 PCCTP_IFSnoJFS: 259 ; Check, if 'HPFS' is at DWORD offset 36h 260 cmp wptr [si+36h], 'PH' 261 jne PCCTP_ProbablyNTFS 262 cmp wptr [si+38h], 'SF' 263 je PCCTP_IFSdone ; 07 is HPFS internally 264 PCCTP_ProbablyNTFS: 265 inc PartSystemID ; 08 is NTFS instead of 07 266 PCCTP_IFSdone: 267 268 ; First check, if LVM Information Sector is available and this partition 269 ; is supported. 270 push ax dx si di 271 mov si, wptr [PartPtr] 272 mov ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector 273 mov dx, wptr [si+LocBRPT_RelativeBegin+2] 274 add ax, wptr [CurPartition_Location+0] ; +Partition-Absolute 275 adc dx, wptr [CurPartition_Location+2] ; sectors 276 mov si, offset LVMSector 277 call LVM_SearchForPartition ; Search for DX:AX partition 278 jnc PCCTP_CheckBootRecord 279 ; Check, if volume has driveletter assigned and remember it for later 280 mov al, [si+LocLVM_VolumeLetter] 281 or al, al 282 jnz PCCTP_HasVolumeLetter 283 mov al, 1 ; 0 would mean "not LVM supported" 284 PCCTP_HasVolumeLetter: 285 ; Save VolumeLetter in separate table 286 movzx bx, NewPartitions ; NewPartitions is one behind here, so 287 mov [PartitionVolumeLetters+bx], al ; it's already a zero-based offset 288 ; Now copy VolumeID and VolumeName to temporary space 289 mov di, offset MBR_NoName_Patched 290 mov ax, [si+LocLVM_PartitionID] 291 stosw 292 mov ax, [si+LocLVM_PartitionID+2] 293 stosw ; Set Serial-Field to LVM-VolumeID 294 add si, LocLVM_PartitionName 295 mov cx, 5 296 rep movsw ; Copy LVM-PartitionName to Temp Space 297 movsb ; (11 bytes in total) 298 pop di si dx ax 299 mov si, offset MBR_NoName_Patched 300 xor ah, ah ; no Flags_NoPartName 301 jmp PCCTP_NameSearchInIPT 302 303 PCCTP_CheckBootRecord: 304 pop di si dx ax 223 305 test ah, FileSysFlags_NoName ; No-Name-Flag ? -> No Partition Name 224 306 jnz PCCTP_ThereIsNoName ; available 225 cmp PartSystemID, 07h ; We got IFS here? 226 jne PCCTP_NotNTFS 227 ; Check, if 'HPFS' is at DWORD offset 36h 228 cmp wptr ds:[si+36h], 'PH' 229 jne PCCTP_SeemsNTFS 230 cmp wptr ds:[si+38h], 'SF' 231 je PCCTP_NotNTFS 232 PCCTP_SeemsNTFS: 233 inc PartSystemID 234 jmp PCCTP_ThereIsNoName 235 PCCTP_NotNTFS: 307 ; We check for NTFS (got detected a little bit earlier in this routine) 308 cmp PartSystemID, 08h ; We got IFS/NTFS here? 309 jne PCCTP_IsNoNTFS 310 jmp PCCTP_ThereIsNoName ; NTFS has no volume label 311 PCCTP_IsNoNTFS: 312 add si, 2Bh ; DS:SI - Partition-Name 236 313 test ah, FileSysFlags_FAT32 ; FAT32 specific name getting ? 237 314 jz PCCTP_ResumeNormal 238 315 add si, 1Ch ; Fix for FAT 32, shiat 239 316 PCCTP_ResumeNormal: 240 add si, 2Bh ; DS:SI - Partition-Name241 317 mov cx, 11 ; 11 bytes length 242 318 call PART_CheckForValidPartName 243 319 jnc PCCTP_ThereIsNoName 244 ; jnc PCCTP_SetNameToNoName245 320 sub si, 4 ; DS:SI -> Serial&Name (15-Bytes) 246 321 xor ah, ah ; no Flags_NoPartName 247 jmp PCCTP_NameSearchInIPT 248 249 ; WAS: NTFS/HPFS detection problem 250 ; PCCTP_SetNameToNoName: 251 ; cmp PartSystemID, 07h ; We got HPFS that failed ? 252 ; jne PCCTP_NotHPFS ; -> is NTFS (internal type 08h) 253 ; inc PartSystemID ; All that fails is Microsoft <bg> 254 ; PCCTP_NotHPFS: 255 ; jmp PCCTP_ThereIsNoName 322 ; jmp PCCTP_NameSearchInIPT 256 323 257 324 ;======================================================= … … 263 330 xor ah, ah ; no Flags_NoPartName cause PartName valid 264 331 mov di, offset PartitionTable ; ES:DI - IPT-Start 265 mov dl, es:CFG_Partitions332 mov dl, CFG_Partitions 266 333 or dl, dl 267 jz PCCTP_NameCompFailed 334 jnz PCCTP_SerialNameCompLoop 335 jmp PCCTP_CompareFailed 268 336 PCCTP_SerialNameCompLoop: 269 mov al, es:[di+LocIPT_Flags]337 mov al, [di+LocIPT_Flags] 270 338 test al, Flags_NowFound 271 339 jnz PCCTP_SerialNameAlreadyFound … … 285 353 mov dl, CFG_Partitions 286 354 PCCTP_NameCompLoop: 287 mov al, es:[di+LocIPT_Flags]355 mov al, [di+LocIPT_Flags] 288 356 test al, Flags_NowFound 289 357 jnz PCCTP_NameAlreadyFound … … 296 364 pop di si 297 365 jne PCCTP_NameNoMatch 298 mov cx, ds:[si+0] ; Get Serial299 mov es:[di+0], cx300 mov cx, ds:[si+2]301 mov es:[di+2], cx ; ...and put it into IPT366 mov cx, [si+0] ; Get Serial 367 mov [di+0], cx 368 mov cx, [si+2] 369 mov [di+2], cx ; ...and put it into IPT 302 370 jmp PCCTP_Match 303 371 PCCTP_NameNoMatch: … … 307 375 jnz PCCTP_NameCompLoop 308 376 PCCTP_NameCompFailed: 377 378 ; So finally we search for Location and PartitionID 379 push si 380 ; Initialize some stuff for Location-Search 381 mov dh, PartSystemID 382 mov si, [PartPtr] ; DS:SI - Cur Partition Table 383 ; Relative Sector to MBR/EPR 384 mov cx, wptr [si+LocBRPT_RelativeBegin] 385 mov bx, wptr [si+LocBRPT_RelativeBegin+2] 386 add cx, [CurPartition_Location+0] 387 add bx, [CurPartition_Location+2] 388 ; BX:CX - Absolute First Sector of Partition on HDD 389 pop si 390 mov di, offset PartitionTable ; ES:DI - IPT-Start 391 mov dl, CFG_Partitions 392 PCCTP_NameLocCompLoop: 393 mov al, [di+LocIPT_Flags] 394 test al, Flags_NowFound 395 jnz PCCTP_NameLocAlreadyFound 396 ; Now compare IPT with current Partition 397 cmp dh, [di+LocIPT_SystemID] 398 jne PCCTP_NameLocMismatch 399 cmp cx, [di+LocIPT_AbsoluteBegin] 400 jne PCCTP_NameLocMismatch 401 cmp bx, [di+LocIPT_AbsoluteBegin+2] 402 jne PCCTP_NameLocMismatch 403 ; We matched location, now copy the current PartitionID and Name to 404 ; the old IPT. 405 push di 406 add di, LocIPT_Serial ; DS:SI - LocIPT-Serial&Name 407 mov cx, 15 408 rep movsb ; Copy 15 bytes 409 pop di 410 jmp PCCTP_Match 411 PCCTP_NameLocMismatch: 412 PCCTP_NameLocAlreadyFound: 413 add di, LocIPT_LenOfIPT 414 dec dl 415 jnz PCCTP_NameLocCompLoop 416 ; None of the searches worked, so forget it... 309 417 jmp PCCTP_CompareFailed 310 418 311 419 PCCTP_ThereIsNoName: 312 ; First, try to find this partition by comparing location and PartitionID420 ; Try to find this partition by comparing location and PartitionID 313 421 ; aka LocIPT_AbsoluteBegin:dword and LocIPT_SystemID 314 422 ; If found, simply go to the normal match-routine, otherwise use the 315 423 ; File-System-Name to build the Volume-Label for the New IPT Entry. 316 424 mov dh, PartSystemID 317 push ds 318 lds si, dptr PartPtr ; DS:SI - Cur Partition Entry 319 ; Relative Sector to MBR/EPR 320 mov cx, wptr ds:[si+LocBRPT_RelativeBegin] 321 mov bx, wptr ds:[si+LocBRPT_RelativeBegin+2] 322 add cx, cs:[CurPartition_Location+0] 323 add bx, cs:[CurPartition_Location+2] 324 ; BX:CX - Absolute First Sector of Partition on HDD 325 pop ds 425 mov si, [PartPtr] ; DS:SI - Cur Partition Table 426 ; Relative Sector to MBR/EPR 427 mov cx, wptr [si+LocBRPT_RelativeBegin] 428 mov bx, wptr [si+LocBRPT_RelativeBegin+2] 429 add cx, [CurPartition_Location+0] 430 add bx, [CurPartition_Location+2] 326 431 ; Build a standard-Volume Label from FileSystemNamePtr 327 432 ; We have to call SearchFileSysName again because of NTFS … … 330 435 call PART_SearchFileSysName ; We want SI here <- FileSystemNamePtr 331 436 mov di, offset MBR_NoName_Patched 332 add di, 4 ; Skip Serial-Field 333 mov cx, 8 334 rep movsb ; Copy FileSystemName to Temp Space 437 xor ax, ax 438 stosw 439 stosw ; Set Serial-Field to "NUL" 440 mov cx, 4 441 rep movsw ; Copy FileSystemName to Temp Space 442 xor ax, ax 443 stosw 444 stosb ; Fill last 3 bytes with "NUL" 335 445 mov si, offset MBR_NoName_Patched 336 446 pop cx ax … … 345 455 mov ah, Flags_NoPartName ;set Flags_NoPartName, PartName invalid 346 456 mov di, offset PartitionTable ; ES:DI - IPT-Start 347 mov dl, es:CFG_Partitions457 mov dl, CFG_Partitions 348 458 or dl, dl 349 459 jz PCCTP_LocCompFailed 350 460 PCCTP_LocCompLoop: 351 mov al, es:[di+LocIPT_Flags]461 mov al, [di+LocIPT_Flags] 352 462 test al, Flags_NowFound 353 463 jnz PCCTP_LocAlreadyFound 354 464 ; Now compare IPT with current Partition 355 cmp dh, es:[di+LocIPT_SystemID]465 cmp dh, [di+LocIPT_SystemID] 356 466 jne PCCTP_LocMismatch 357 cmp cx, es:[di+LocIPT_AbsoluteBegin]467 cmp cx, [di+LocIPT_AbsoluteBegin] 358 468 jne PCCTP_LocMismatch 359 cmp bx, es:[di+LocIPT_AbsoluteBegin+2]469 cmp bx, [di+LocIPT_AbsoluteBegin+2] 360 470 jne PCCTP_LocMismatch 361 471 jmp PCCTP_Match … … 379 489 ; for converting HideConfig. 380 490 mov dh, dl 381 mov dl, es:CFG_Partitions491 mov dl, CFG_Partitions 382 492 sub dl, dh 383 493 mov dh, NewPartitions ; is actually a counter … … 385 495 386 496 ; Get Saved-Flags... 387 mov cl, b yte ptr es:[di+LocIPT_Flags]; Use saved Flags497 mov cl, bptr [di+LocIPT_Flags] ; Use saved Flags 388 498 389 499 ; ...and Saved-CRC if available... 390 mov ax, wptr es:[di+LocIPT_BootRecordCRC]500 mov ax, wptr [di+LocIPT_BootRecordCRC] 391 501 or ax, ax 392 502 jz PCCTP_UseNewComputedCRC … … 394 504 PCCTP_UseNewComputedCRC: 395 505 ; ...and mark partition in IPT as already found 396 or b yte ptr es:[di+LocIPT_Flags], Flags_NowFound506 or bptr [di+LocIPT_Flags], Flags_NowFound 397 507 ; ...get Serial&Name from IPT-table... 398 508 mov si, di … … 412 522 mov al, PartTypeFlags 413 523 ; May I auto-add partitions ? 414 test es:CFG_PartitionsDetect, 1524 test CFG_PartitionsDetect, 1 415 525 jz PCCTP_MayNotAddAny ; add, but non-bootable 416 526 test al, FileSysFlags_BootAble ; AH kam von SearchFileSysName … … 447 557 ; Calculate Pointer to IPT 448 558 mov di, offset NewPartTable ; ES:DI - NewPartTable 449 movzx ax, es:NewPartitions559 movzx ax, NewPartitions 450 560 mov bl, LocIPT_LenOfIPT 451 561 mul bl … … 459 569 pop cx 460 570 461 lds si, dptr PartPtr; DS:SI - Cur Partition Entry462 mov al, bptr es:[CurPartition_Location+4] ; Drive571 mov si, [PartPtr] ; DS:SI - Cur Partition Entry 572 mov al, bptr [CurPartition_Location+4] ; Drive 463 573 stosb 464 574 mov al, PartSystemID ; Unhidden SystemID … … 468 578 mov ax, PartCRC ; BootRecordCRC... 469 579 stosw 470 mov al, bptr ds:[si+LocBRPT_BeginHead]580 mov al, bptr [si+LocBRPT_BeginHead] 471 581 stosb 472 mov ax, wptr ds:[si+LocBRPT_BeginSector] ; Cylinder/Sector582 mov ax, wptr [si+LocBRPT_BeginSector] ; Cylinder/Sector 473 583 stosw 474 mov al, bptr es:[CurPartition_Location+5] ; Head of Part-Table584 mov al, bptr [CurPartition_Location+5] ; Head of Part-Table 475 585 stosb 476 mov ax, wptr es:[CurPartition_Location+6] ; Cylinder/Sector586 mov ax, wptr [CurPartition_Location+6] ; Cylinder/Sector 477 587 stosw 478 mov ax, wptr ds:[si+LocBRPT_RelativeBegin]479 mov bx, wptr ds:[si+LocBRPT_RelativeBegin+2]480 mov cx, wptr es:[CurPartition_Location+0] ; +Partition-Absolute481 mov dx, wptr es:[CurPartition_Location+2] ; sectors588 mov ax, wptr [si+LocBRPT_RelativeBegin] 589 mov bx, wptr [si+LocBRPT_RelativeBegin+2] 590 mov cx, wptr [CurPartition_Location+0] ; +Partition-Absolute 591 mov dx, wptr [CurPartition_Location+2] ; sectors 482 592 add ax, cx 483 593 adc bx, dx … … 489 599 mov ax, dx 490 600 stosw 491 inc es:NewPartitions; NEW IPT Entry DONE492 493 cmp es:NewPartitions, LocIPT_MaxPartitions601 inc NewPartitions ; NEW IPT Entry DONE 602 603 cmp NewPartitions, LocIPT_MaxPartitions 494 604 jbe PCCTP_NotTooManyPartitions 495 mov ax, cs496 mov ds, ax497 605 mov si, offset TXT_TooManyPartitions 498 606 call MBR_Teletype … … 502 610 ; UNHIDE PARTITION, if it was hidden previously 503 611 mov al, PartSystemID 504 cmp al, 08h ; internally NTFS ? 505 jne PCCTP_NoInternalNTFS 506 dec al 507 PCCTP_NoInternalNTFS: 508 mov bptr ds:[si+LocBRPT_SystemID], al 509 510 ; Calculate Size of this partition... 511 movzx ax, es:NewPartitions 612 cmp al, 08h ; internally IFS/NTFS? 613 je PCCTP_GotInternalIFS 614 cmp al, 0FCh ; internally IFS/JFS? 615 jne PCCTP_NoInternalIFS 616 PCCTP_GotInternalIFS: 617 mov al, 07h 618 PCCTP_NoInternalIFS: 619 mov bptr [si+LocBRPT_SystemID], al 620 621 ; Calculate Size of this partition and put it into separate table... 622 movzx ax, NewPartitions 512 623 dec ax 513 624 mov bx, ax … … 517 628 mov di, offset PartitionSizeTable 518 629 add di, ax ; DI - Partition Size-Element 519 mov ax, wptr ds:[si+LocBRPT_AbsoluteLength] ; Sector-Size520 mov bx, wptr ds:[si+LocBRPT_AbsoluteLength+2]630 mov ax, wptr [si+LocBRPT_AbsoluteLength] ; Sector-Size 631 mov bx, wptr [si+LocBRPT_AbsoluteLength+2] 521 632 call PART_FillOutSizeElement 522 633 ret 523 634 PARTSCAN_CheckThisPartition EndP 524 525 ; Scans Current Partition for Extended Partitions, if found, AX,BX,CX,DX will526 ; be set to this location and Carry will be set527 PARTSCAN_ScanPartitionForExtended Proc Near Uses ds si528 mov ax, ExecBaseSeg529 mov ds, ax530 mov si, ExecBasePtr531 add si, 446 ; DS:SI - First Partition Entry532 xor ax, ax533 PSSPFE_ScanLoop:534 mov al, ds:[si+LocBRPT_SystemID]535 cmp al, 5 ; Is Partition EXTENDED ?536 je PSSPFE_ExtendedPartition537 cmp al, 0Fh ; Is Partition EXTENDED (M$) ?538 je PSSPFE_ExtendedPartition539 jmp PSSPFE_IgnorePartition540 PSSPFE_ExtendedPartition:541 mov ax, wptr ds:[si+LocBRPT_RelativeBegin]542 mov bx, wptr ds:[si+LocBRPT_RelativeBegin+2]543 add ax, wptr es:[ExtendedAbsPos+0] ; Adjust...544 adc bx, wptr es:[ExtendedAbsPos+2] ; (Shit Design!)545 test es:[ExtendedAbsPosSet], 1546 jnz PSSPFE_ExtendedMainKnown547 mov wptr es:[ExtendedAbsPos+0], ax548 mov wptr es:[ExtendedAbsPos+2], bx549 mov cs:[ExtendedAbsPosSet], 1550 PSSPFE_ExtendedMainKnown:551 mov cx, wptr ds:[si+LocBRPT_BeginSector] ; Cylinder/Sector552 mov dh, bptr ds:[si+LocBRPT_BeginHead] ; Head553 mov dl, bptr es:[CurPartition_Location+4] ; Drive554 stc555 jmp PSSPFE_EndOfSearch556 PSSPFE_IgnorePartition:557 add si, LocBRPT_LenOfEntry558 cmp si, 500+ExecBasePtr559 jb PSSPFE_ScanLoop560 clc561 PSSPFE_EndOfSearch:562 ret563 PARTSCAN_ScanPartitionForExtended EndP564 635 565 636 ; =================== … … 567 638 ; =================== 568 639 569 ; The following routines have DS==CS again570 571 640 ; Reset X-Reference 572 PARTSCAN_ResetXref Proc Near Uses ax cx es di 573 push cs 574 pop es 641 PARTSCAN_ResetXref Proc Near Uses ax cx di 575 642 mov di, offset PartitionXref ; X-Reference for later syncing 576 643 mov cx, LocIPT_MaxPartitions -
trunk/BOOTCODE/REGULAR/PASSWORD.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / PASSWORD … … 22 22 ; Don't ask me, what I'm doing in here to encode the passwords. I don't even 23 23 ; know by myself anymore. It's some kind of hash and I hope that it isn't weak 24 ; and some mad uber-hacker-god will laugh about it .24 ; and some mad uber-hacker-god will laugh about it - but i bet so ;-) 25 25 26 26 PASSWORD_AskSystemPwd Proc Near Uses ax bx si di … … 49 49 ret 50 50 PASSWORD_AskChangeBootPwd EndP 51 52 ;CFG_MasterPassword dw 0101Fh ; Encoded Password (this is just CR) 53 ; dw 07A53h 54 ; dw 0E797h 55 ; dw 0A896h 56 ; BUGBUG - If unspecified password to ask, check if one of our two are CR 57 ; And if that's the case, we need to skip over checking that one. 58 ; If both are CR, return to caller 59 51 60 52 61 ; In: ax - Magic for AskPassword Subroutine -
trunk/BOOTCODE/REGULAR/STD_TEXT.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / TEXT 20 20 ;--------------------------------------------------------------------------- 21 21 22 ; If you modify this Copyright and release this shiatunder your own name,22 ; If you modify this Copyright and release this under your own name, 23 23 ; I'm going to sue your cheap ass, rape your dog and blow up your house. =) 24 24 25 CopyrightVersionLen equ 5 26 Copyright db ' AiR-BOOT v1.01 - (c) 1998-2003 Martin Kiewitz, Dedicated to Gerd Kiewitz', 0 27 IFDEF ReleaseCommercial 28 RegisteredTo db 'Registered To: Myself', 0 29 ELSE 30 BootEndMsg db 'Distribute/copy freely. Only meant for private usage.', 0 31 ENDIF 25 CopyrightVersionLen equ 5 26 Copyright db ' AiR-BOOT v1.06 - (c) 1998-2009 M. Kiewitz, Dedicated to Gerd Kiewitz', 0 27 BootEndMsg db 'Free usage allowed, as long as you dont or have not worked for US government', 0 28 BootEndMsg2 db 'This is GPLv3+ software. Please visit http://AiR-BOOT.sourceforge.net', 0 32 29 33 CheckID_MBR db 'AiRBOOT' 30 CheckID_MBR db 'AiRBOOT' 31 BrokenHDD db ' (HDDx)', 0 34 32 35 ContinueBIOSbootTable dw offset TXT_SETUP_MAGIC_CDROM 36 dw offset TXT_SETUP_MAGIC_Network 37 dw offset TXT_SETUP_MAGIC_ZIPLS 38 dw 0 33 ; Colors for special words hard-coded. Keep all 0s. 34 TXT_SETUP_LowerMessage db 'This software is released under ', 0, 'GPLv3+.', 0 35 db 'It may not be used by US government', 0 36 db 'For more information and source, please visit', 0 37 db 'http://AiR-BOOT.sourceforge.net', 0 38 db 'Contact via e-mail: ', 0, 'm_kiewitz [AT] users.sourceforge.net', 0 39 40 ContinueBIOSbootTable dw offset TXT_SETUP_MAGIC_CDROM 41 dw offset TXT_SETUP_MAGIC_Network 42 dw offset TXT_SETUP_MAGIC_ZIPLS 43 dw 0 -
trunk/BOOTCODE/REGULAR/TIMER.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / TIMER -
trunk/BOOTCODE/REGULAR/VIDEOIO.ASM
r23 r29 1 2 ; Disclaimer:3 ; =============4 ; The sourcecode is released via www.netlabs.org CVS *ONLY*.5 ; You MUST NOT upload it to other servers nor republish it in any way.6 ; The sourcecode is still COPYRIGHTED and NOT RELEASED UNDER GPL.7 ; It's (c) Copyright 1998-2003 by Martin Kiewitz.8 ; You may recompile the source and do *PRIVATE* modifications, but please keep9 ; in mind that modifying this code needs at least *some* assembly skill. If10 ; you mess up your system, because you needed to hack your way through, don't11 ; blame me. Releasing a customized version of AiR-BOOT, selling it in any form12 ; or reusing parts of this source is *PROHIBITED*. Ask me, if you have some13 ; idea about new functionality *before* developing the code, otherwise I will14 ; definitely reject it. Also please accept, that I have some basic design15 ; rules on AiR-BOOT and I will maintain them at all costs, so this won't get16 ; another GRUB.17 1 ; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz 2 ; 3 ; This file is part of AiR-BOOT 4 ; 5 ; AiR-BOOT is free software: you can redistribute it and/or modify it under 6 ; the terms of the GNU General Public License as published by the Free 7 ; Software Foundation, either version 3 of the License, or (at your option) 8 ; any later version. 9 ; 10 ; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY 11 ; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS 12 ; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 ; details. 14 ; 15 ; You should have received a copy of the GNU General Public License along with 16 ; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>. 17 ; 18 18 ;--------------------------------------------------------------------------- 19 19 ; AiR-BOOT / VIDEO I/O
Note:
See TracChangeset
for help on using the changeset viewer.
