Changeset 52
- Timestamp:
- Apr 13, 2014, 4:45:41 PM (11 years ago)
- Location:
- trunk/BOOTCODE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/AIR-BOOT.ASM
r51 r52 457 457 ; FIRST ENTRY-POINT 458 458 ; ----------------------------------------------------------------------------- 459 ; BOOKMARK: FIRST ENTRY-POINT (Invoked by BIOS) 459 460 ; ###################################################### 460 461 ; # ENTRY-POINT WHERE THE BIOS TRANSFERS CONTROL TO US # … … 490 491 ; THIRD ENTRY-POINT 491 492 ; ----------------------------------------------------------------------------- 493 ; BOOKMARK: THIRD ENTRY-POINT (Relocate code) 492 494 ; 493 495 ; No single instruction below should be changed, added or removed in the code … … 578 580 579 581 ; 582 ; BOOKMARK: Halt System 580 583 ; Entry-point for halting the system. 581 584 ; … … 625 628 ; Jump again... 626 629 ; This time to the code that relocates to 8000:0000. 630 ; BOOKMARK: SECOND ENTRY_POINT (Skipped over AB signature) 627 631 jmp MBR_Start 628 632 … … 675 679 ; 676 680 677 ; In: BX - Base Check, DS:SI - Pointer to 512-byte-area to be included 678 ; Out: BX - Base Check Result 681 ; In: BX - Base Check 682 ; DS:SI - Pointer to 512-byte-area to be included 683 ; Out: BX - Base Check Result 679 684 ; Destroyed: SI will get updated (+512) 680 685 MBR_GetCheckOfSector Proc Near Uses ax cx … … 709 714 ; This is where the rest of AiR-BOOT gets loaded from track0. 710 715 ; 711 716 ; BOOKMARK: Running at relocated position (Load additional sectors) 712 717 ;------------------------------------------------------------------------------ 713 718 MBR_RealStart: … … 719 724 mov sp, 7FFEh ; Even is better 720 725 push es ; ES holds segment where we moved to 721 pop ds ; Set DS= =ES to Code Segment726 pop ds ; Set DS=ES to Code Segment 722 727 723 728 ; … … 855 860 ORIGIN 001B8h 856 861 857 ; AiR-BOOT will merge the field from the MBR it replaces. 862 ; AiR-BOOT installer will merge the field 863 ; from the MBR it replaces. 858 864 MBR_DrvSig db 'DSIG' 859 865 860 866 ; Unused word at 01BCh. 861 867 ; An LVM 2.x MBR puts 0CC33h here. 862 ; AiR-BOOT will merge the field from the MBR it replaces. 868 ; AiR-BOOT installer will merge the field 869 ; from the MBR it replaces. 863 870 MBR_Spare dw '$$' 864 871 … … 870 877 871 878 ; The 4 entries just for show. 872 ; AiR-BOOT will merge them from the MBR it replaces.879 ; AiR-BOOT installer will merge them from the MBR it replaces. 873 880 MBR_PartTable: 874 881 db 16 dup('0') … … 960 967 ; # ENTRY-POINT AFTER ALL THE INITIAL HASSLE # 961 968 ; ############################################ 969 ; BOOKMARK: AiR_BOOT_Start (AiR-BOOT now completely loaded) 962 970 AiR_BOOT_Start: 963 971 … … 970 978 ; 971 979 ; Pop the old SS:SP from the stack and save it in the BSS. 980 ; Note that this is outside the normal variable area that gets cleared. 981 ; This allows AiR-BOOT to restart itself when debugging and come-up 982 ; with access to the original values of registers the BIOS passed. 972 983 ; 973 984 pop [OldSP] … … 1011 1022 ; 1012 1023 ; First it clears the BSS area. 1013 ; Note that the old SS:SP is stored outside this area so t i1024 ; Note that the old SS:SP is stored outside this area so this 1014 1025 ; does not get lost. 1015 1026 ; Then initialize various runtime variables and structures. 1016 1027 ; 1028 ; BOOKMARK: Pre Crap 1017 1029 call PRECRAP_Main 1018 1030 ; Number of harddisks and other system-info is now known. … … 1078 1090 ; ----------------------------------------------------------------------------- 1079 1091 ; 1080 ; Scan all partitions1092 ; BOOKMARK: Scan all partitions 1081 1093 ; 1082 1094 call PARTSCAN_ScanForPartitions … … 1107 1119 ; partitions. 1108 1120 ; 1121 ; BOOKMARK: Update Driveletters so they are in-sync again 1109 1122 call PARTSCAN_UpdateDriveLetters 1110 1123 ; Driveletter <-> Partition correlation is now restored. … … 1169 1182 1170 1183 ; 1171 ; Here we check if eComStation v2.1 is being installed. 1184 ; BOOKMARK: Check for eCS being installed 1185 ; Here we check if eComStation v2.1+ is being installed. 1172 1186 ; If so, we forgo the menu and directly boot it. 1173 1187 ; … … 1207 1221 1208 1222 1223 ; BOOKMARK: Scan for Partitions (Only if eCS install going on) 1209 1224 ; Because one or more partitions are possibly added, the 1210 1225 ; PartitionXref table is not 'in sync' and could cause the … … 1287 1302 1288 1303 1304 ; BOOKMARK: Save Configuration 1289 1305 ; Save configuration so phase1 boot-through is disabled 1290 1306 ; on next boot. … … 1303 1319 ; Do some post processing. 1304 1320 ; 1321 ; BOOKMARK: After Crap 1305 1322 call AFTERCRAP_Main 1306 1323 … … 1376 1393 ENDIF 1377 1394 1395 ; BOOKMARK: Build Main Menu 1378 1396 call BOOTMENU_BuildBackground 1379 1397 call BOOTMENU_BuildMain … … 1386 1404 call BOOTMENU_ResetTimedBoot 1387 1405 1406 ; BOOKMARK: Display Main Menu 1388 1407 call BOOTMENU_Execute 1389 1408 … … 1398 1417 ENDIF 1399 1418 1419 ; BOOKMARK: Display bye-screen and start selected partition 1400 1420 call BOOTMENU_BuildGoodBye 1401 1421 … … 1458 1478 ; It skips the movement of the MBR but otherwise it is a functional restart. 1459 1479 ; The old BIOS SS:SP where the registers on entry are stored is passed along. 1460 ; 1480 ; This entry-point is used for debugging purposes. 1481 ; 1482 ; BOOKMARK: AiR-BOOT Restart (used for debugging) 1461 1483 AirbootRestart: 1462 1484 mov bx, [OldSP] ; Old SP when BIOS transferred control to AB … … 1470 1492 ; It is entered on severe error conditions. 1471 1493 ; 1494 ; BOOKMARK: Halt System 1472 1495 HaltSystem: 1473 1496 call VideoIO_ClearScreen … … 1485 1508 1486 1509 ; 1487 ; The following section includes various assembler 1488 ; modules. These contain functionality for a multitude of 1489 ; categories like disk-access, video-io, lvm, debugging, etc. 1510 ; The following section includes various assembler modules 1511 ; at the source level. These contain functionality for a 1512 ; multitude of categories like disk-access, video-io, lvm, 1513 ; debugging, etc. Later versions of AiR-BOOT will use such 1514 ; modules at the object-file level so they can be shared 1515 ; more easily. 1490 1516 ; 1491 1517 … … 1494 1520 ; INCLUDED FILE SECTION 1495 1521 ; ----------------------------------------------------------------------------- 1522 1523 ; BOOKMARK: Include Section 1496 1524 1497 1525 ; … … 1619 1647 ; End of code marker. 1620 1648 ; 1649 ; BOOKMARK: END OF CODE 1621 1650 db 'BABE' 1622 1651 db 'FACE' … … 1641 1670 ; ----------------------------------------------------------------------------- 1642 1671 1672 ; BOOKMARK: BLDLEVEL Information 1643 1673 ORIGIN 068A0h 1644 1674 … … 1698 1728 1699 1729 ; 1700 ; This is the AiR-BOOT MBR -Protection Image.1730 ; This is the AiR-BOOT MBR Protection Image. 1701 1731 ; The stuff generated here gets overwritten when the 1702 1732 ; MBR_PROT module, which is assembled separately, … … 1704 1734 ; So you won't find the string below in the generated binary. 1705 1735 ; 1736 ; BOOKMARK: AiR-BOOT MBR Protection Image 1706 1737 ORIGIN 06900h 1707 1738 … … 1748 1779 ; variables remain vaild. 1749 1780 ; 1781 ; BOOKMARK: AiR-BOOT Configuration Sector 1750 1782 ORIGIN 06C00h 1751 1783 … … 1848 1880 ; Drive Letters. 1849 1881 ; 1882 ; BOOKMARK: Stored Drive Letters 1850 1883 ORIGIN 06CB0h 1851 1884 … … 1876 1909 ; So future config changes will not break auto-install. 1877 1910 ; 1911 ; BOOKMARK: Name of eCS Installation Volume 1878 1912 ORIGIN 06D00h 1879 1913 … … 1902 1936 ; Entries allocated down from 06E00 boundary. 1903 1937 ; 1938 ; BOOKMARK: Floppy/CD-ROM/BIOS Boot Entries 1904 1939 ORIGIN 06DABh ; 427 Boundry 1905 1940 … … 1955 1990 ; AiR-BOOT Internal Partition Table (IPT) 1956 1991 ; 1992 ; BOOKMARK: Internal Partition Table 1957 1993 ORIGIN % (image_size - 0a00h - (image_size - image_size_60secs)) 1958 1994 … … 2002 2038 ; Hidden Partition Table (6-bit packed as of v1.0.8) 2003 2039 ; 2040 ; BOOKMARK: Hidden Partition Table (packed) 2004 2041 ORIGIN % (image_size - 600h - (image_size - image_size_60secs) / 2) 2005 2042 … … 2038 2075 ; AiR-BOOT MBR Backup. 2039 2076 ; 2077 ; BOOKMARK: MBR Backup 2040 2078 ORIGIN % (image_size - 200h) 2041 2079 … … 2077 2115 ;############################################################################## 2078 2116 2079 2117 ; BOOKMARK: BSS Segment 2080 2118 2081 2119 ; … … 2127 2165 ; SECTOR BUFFERS 2128 2166 ; ----------------------------------------------------------------------------- 2167 ; BOOKMARK: Sector Buffers 2129 2168 PartitionSector db 512 dup (?) ; Temporary Sector for Partition 2130 2169 PBRSector db 512 dup (?) ; Temporary Sector for JFS/HPFS writeback … … 2137 2176 ; ----------------------------------------------------------------------------- 2138 2177 ; Everything used to build a new IPT and reference it to the old one 2178 ; BOOKMARK: New Partition Table 2139 2179 NewPartTable db 1536 dup (?) ; New Partition Table 2140 2180 … … 2143 2183 ; NEW HIDE PARTITION TABLE 2144 2184 ; ----------------------------------------------------------------------------- 2145 ; New Hide-Partition Table2185 ; BOOKMARK: New Hide-Partition Table 2146 2186 NewHidePartTable db LocIPT_MaxPartitions * LocHPT_LenOfHPT dup (?) 2147 2187 … … 2151 2191 ; NEW DRIVE LETTERS 2152 2192 ; ----------------------------------------------------------------------------- 2153 ; Logical Drive-Letters2193 ; BOOKMARK: Logical Drive-Letters 2154 2194 NewDriveLetters db LocIPT_MaxPartitions dup (?) 2155 2195 … … 2160 2200 ; ----------------------------------------------------------------------------- 2161 2201 ; Size-Table (6 bytes per partition) 2202 ; BOOKMARK: Partition Size Table 2162 2203 PartitionSizeTable db LocIPT_MaxPartitions * 6 dup (?) 2163 2204 … … 2167 2208 ; ----------------------------------------------------------------------------- 2168 2209 ; Maximum is 52 word entries till now 2210 ; BOOKMARK: Partition Pointers 2169 2211 PartitionPointers dw 52 dup (?) 2170 2212 … … 2177 2219 2178 2220 ; X-Reference Table (holds new partnr, index is old part nr) 2221 ; BOOKMARK: Xref Table 2179 2222 PartitionXref db LocIPT_MaxPartitions dup (?) 2180 2223 … … 2187 2230 ; 1 - LVM support, but no letter 2188 2231 ; 'C'-'Z' - assigned drive letter 2232 ; BOOKMARK: Volume Drive Letters 2189 2233 PartitionVolumeLetters db LocIPT_MaxPartitions dup (?) 2190 2234 … … 2194 2238 ; MISC VARS AND FLAGS 2195 2239 ; ----------------------------------------------------------------------------- 2240 ; BOOKMARK: Misc Vars and Flags 2196 2241 TotalHarddiscs db ? ; Total harddrives (by POST) 2197 2242 LBASwitchTable db 128 dup (?) ; Bit 25-18 for CHS/LBA Switching … … 2359 2404 ; ----------------------------------------------------------------------------- 2360 2405 ; 2361 ; Temporary buffer for 48h INT13X bios call.2406 ; BOOKMARK: Temporary buffer for 48h INT13X bios call. 2362 2407 ; 2363 2408 … … 2387 2432 ; OLD AND NEW STACKS 2388 2433 ; ----------------------------------------------------------------------------- 2389 2434 ; BOOKMARK: Storage for Old and New Stack Pointers 2390 2435 ; 2391 2436 ; These need to be outside the variable section because AiR-BOOT can restart … … 2428 2473 ENDIF 2429 2474 2475 ; BOOKMARK: End of Module 2430 2476 END AiR_BOOT 2431 2477 -
trunk/BOOTCODE/REGULAR/PARTMAIN.ASM
r51 r52 134 134 ; In: DS:SI - IPT-Entry of partition 135 135 ; DS:PartitionSector - Actual Boot-Record of partition 136 ; Out: *none* (BootRecordCRD updated) 136 ; Out: *none* (BootRecordCRC updated) 137 ; CHECKME: Verify the change (BX points to sector to CRC) is working OK 137 138 PART_UpdateBootRecordCRC Proc Near Uses bx 138 mov si, offset PartitionSector 139 push si 140 ;~ mov si, offset PartitionSector 141 mov si, bx 139 142 mov bx, 4B4Dh ; Magic: 'MK' 140 143 call MBR_GetCheckOfSector 144 pop si 141 145 mov [si+LocIPT_BootRecordCRC], bx 142 146 ret … … 144 148 145 149 146 ;147 ; What happens here ?148 ;149 150 150 151 ; Rousseau: … … 167 168 ; presumably pointed to an area where a null byte was near. 168 169 ; 169 ; Fix: 170 ; Test BX for zero and if so, skip the 170 ; BOOKMARK: The nasty pointer bug 171 171 172 172 … … 781 781 782 782 783 ; Rousseau: added 783 784 784 ; Compare a volume-label in the IPT to the install-volume 785 785 ; SI holds pointer to entry in IPT … … 858 858 859 859 860 ; Setup Phase1 860 861 861 ; If found CY=1, AL=partnum, else CY=0, AL=0FFH 862 ; BOOKMARK: Setup Phase1 862 863 PART_SetupPhase1 Proc Uses bx cx dx si di 863 864 … … 1142 1143 ; This loads the MBR in case of PRI or the EBR in case of LOG partitions. 1143 1144 ; 1145 ; BOOKMARK: PBR/EBR loading 1144 1146 call DriveIO_LoadPartition ; Load Table... [LOAD] 1145 1147 … … 1235 1237 1236 1238 ; 1237 ; Setup 'I13X' signature.1239 ; BOOKMARK: Setup 'I13X' signature. 1238 1240 ; 1239 1241 PSP_ForceI13X: … … 1492 1494 jz PSP_NoVIBR 1493 1495 1496 1494 1497 ; ----------------------------------------------------- CHECKS FOR VIBR 1498 ; BOOKMARK: Check for virus in PBR 1495 1499 push si 1496 1500 mov si, offset PartitionSector … … 1699 1703 ; 1700 1704 1701 ; 1702 ; Fix hidden sectors field 1703 ; 1705 ; BOOKMARK: Fix hidden sectors field 1704 1706 mov ax,[si+LocIPT_AbsoluteBegin] 1705 1707 mov es:[di+1ch], ax ; Low word of 32-bits "hidden sectors" … … 1726 1728 1727 1729 1728 ; FIXME:1730 ; 1729 1731 ; The PBR is already loaded, no need to load it again in the 1730 1732 ; calls below. … … 1732 1734 ; Better use the already done discovery to determine the system. 1733 1735 ; 1734 1736 ; FIXME: PBR Already loaded 1737 1735 1738 ; When FAT12/FAT16/HPFS/JFS then boot-drive-letter can be tested 1736 1739 ; or adjusted. … … 1955 1958 ; WE CONTINUE BOOTING BUT OS/2 - eCS WILL MOST PROBABLY FAIL TO BOOT. 1956 1959 1957 ; FIXME: 1958 ; ISSUE SOME KIND OF WARNING... 1959 1960 ; FIXME: Issue some kind of warning 1961 1960 1962 ;mov ah,07h 1961 1963 ;mov si,offset CheckID_MBR … … 2035 2037 pop si 2036 2038 2039 2040 ; BOOKMARK: Update the CRC of the Partition Boot Record. 2041 ; FIXME: Update CRC on PBR 2042 ;~ mov bx, offset [PBRSector] 2043 ;~ call PART_UpdateBootRecordCRC 2044 2045 2037 2046 ; Setup the registers for the partition location. 2038 2047 mov ax, wptr [si+LocIPT_AbsoluteBegin+0] … … 2042 2051 mov dl, [si+LocIPT_Drive] 2043 2052 2044 ; Write the adjusted JFS PBR to disk. 2053 2054 ; BOOKMARK: Write the adjusted HPFS/JFS PBR to disk. 2045 2055 mov si, offset [PBRSector] 2046 2056 call DriveIO_SaveSector … … 2048 2058 no_jfs_pbr: 2049 2059 popa 2050 2051 2052 ;xor ax,ax2053 ;int 16h2054 2055 2056 2060 2057 2061 … … 2090 2094 boot_from_floppy: 2091 2095 2092 ; 2093 ; Here we copy the prepared partition boot-record to 0000:7C00h 2096 2097 2098 2099 ; 2100 ; Here we copy the prepared boot-record to 0000:7C00h 2094 2101 ; to give it control later on. 2095 2102 ; … … 2197 2204 2198 2205 2199 2206 ; BOOKMARK: JUMP TO PBR CODE 2200 2207 ; ############################### 2201 2208 ; # JUMP TO THE PBR LOADER CODE # -
trunk/BOOTCODE/REGULAR/STD_TEXT.ASM
r51 r52 58 58 ;~ db ' M. Kiewitz <<@ Interim Release @>> (bld: ' 59 59 ;~ db ' M. Kiewitz <<Release Candidate 2>> (bld: ' 60 db ' M. Kiewitz <<Release Candidate 3>> (bld: '60 db ' M. Kiewitz <<Release Candidate 4>> (bld: ' 61 61 db BLDLVL_YEAR 62 62 db BLDLVL_MONTH -
trunk/BOOTCODE/SETUP/PART_SET.ASM
r51 r52 620 620 je PSCPN_NotLVMSupported 621 621 622 ; ------------------------------------------------------------[LVM CHECK]--- 623 ; Load LVM-Sector here and seek to PartitionName 624 ; Set CurPartition_Location information of destination partition 625 mov ax, [si+LocIPT_AbsolutePartTable] 626 mov [CurPartition_Location+0], ax 627 mov ax, [si+LocIPT_AbsolutePartTable+2] 628 mov [CurPartition_Location+2], ax 629 mov ah, byte ptr [si+LocIPT_LocationPartTable+0] 630 mov al, byte ptr [si+LocIPT_Drive] 631 mov [CurPartition_Location+4], ax 632 mov ax, [si+LocIPT_LocationPartTable+1] 633 mov [CurPartition_Location+6], ax 634 mov di, si ; Put SI into DI 635 call DriveIO_LoadLVMSector 636 jnc PSCPN_LVMGotError ; Security again, if problem -> halt 637 push dx 622 ; 623 ; BOOKMARK: LVM Label Manipulations 624 ; 625 626 ; ------------------------------------------------------------[LVM CHECK]--- 627 ; Load LVM-Sector here and seek to PartitionName 628 ; Set CurPartition_Location information of destination partition 629 mov ax, [si+LocIPT_AbsolutePartTable] 630 mov [CurPartition_Location+0], ax 631 mov ax, [si+LocIPT_AbsolutePartTable+2] 632 mov [CurPartition_Location+2], ax 633 mov ah, byte ptr [si+LocIPT_LocationPartTable+0] 634 mov al, byte ptr [si+LocIPT_Drive] 635 mov [CurPartition_Location+4], ax 636 mov ax, [si+LocIPT_LocationPartTable+1] 637 mov [CurPartition_Location+6], ax 638 mov di, si ; Put SI into DI 639 call DriveIO_LoadLVMSector 640 jnc PSCPN_LVMGotError ; Security again, if problem -> halt 641 push dx 638 642 mov ax, [di+LocIPT_AbsoluteBegin] 639 643 mov dx, [di+LocIPT_AbsoluteBegin+2] 640 644 call LVM_SearchForPartition 641 pop dx642 jnc PSCPN_LVMGotError ; Not Found? -> display error and halt645 pop dx 646 jnc PSCPN_LVMGotError ; Not Found? -> display error and halt 643 647 644 648 645 649 ; Point to LVM VolumeName 646 add si, LocLVM_VolumeName 647 648 649 xchg si, di ; SI-IPTEntry, DI-LVM PartName 650 jmp PSCPN_CheckPartName ; Check, if match... 651 652 653 654 PSCPN_LVMGotError: 655 jmp MBR_LoadError 656 657 658 659 ; mov si, di ; Restore SI and bootrecord fall-back 660 PSCPN_NotLVMSupported: 661 ; ----------------------------------------------------[BOOT-RECORD CHECK]--- 662 ; Load Boot-Record... 663 push dx 650 add si, LocLVM_VolumeName 651 652 653 xchg si, di ; SI-IPTEntry, DI-LVM PartName 654 jmp PSCPN_CheckPartName ; Check, if match... 655 656 657 658 PSCPN_LVMGotError: 659 jmp MBR_LoadError 660 661 662 663 ; mov si, di ; Restore SI and bootrecord fall-back 664 PSCPN_NotLVMSupported: 665 ; ----------------------------------------------------[BOOT-RECORD CHECK]--- 666 ; Load Boot-Record... 667 ; BOOKMARK: Load Boot Record 668 push dx 664 669 mov ax, [si+LocIPT_AbsoluteBegin+0] 665 670 mov bx, [si+LocIPT_AbsoluteBegin+2] … … 668 673 mov dl, [si+LocIPT_Drive] 669 674 call DriveIO_LoadPartition 670 pop dx671 672 ; We seek to Partition Label within boot-record here673 mov di, offset PartitionSector674 675 push si675 pop dx 676 677 ; We seek to Partition Label within boot-record here 678 mov di, offset PartitionSector 679 680 push si 676 681 mov al, [si+LocIPT_SystemID] 677 682 call PART_SearchFileSysName 678 683 ; Replies AH - FileSysFlags, AL - UnhiddenID, SI - FileSysNamePtr 679 pop si680 681 test ah, FileSysFlags_NoName ; If NoName by FileSysFlag682 jnz PSCPN_LetUserEditPartName ; -> don't put it into BR at anytime683 test ah, FileSysFlags_FAT32 ; FAT32 specific name getting684 jz PSCPN_ResumeNormal685 add di, 1Ch ; Fix for FAT 32, shit686 PSCPN_ResumeNormal:687 add di, 2Bh ; ES:DI - Name of Partition688 689 690 691 692 693 ; This code is used for BR and LVM checking694 ; Rousseau: Because AiR-BOOT v1.0.8 uses the LVM_VolumeName, which is copied695 ; to the IPT, this compare fails when the LVM_PartitionName is not696 ; the same as the LVM_VolumeName. In that case, only the LVM_VolumeName697 ; is updated. If they are the same, both are upated so they are the same698 ; again after the edit.699 700 PSCPN_CheckPartName:684 pop si 685 686 test ah, FileSysFlags_NoName ; If NoName by FileSysFlag 687 jnz PSCPN_LetUserEditPartName ; -> don't put it into BR at anytime 688 test ah, FileSysFlags_FAT32 ; FAT32 specific name getting 689 jz PSCPN_ResumeNormal 690 add di, 1Ch ; Fix for FAT 32, shit 691 PSCPN_ResumeNormal: 692 add di, 2Bh ; ES:DI - Name of Partition 693 694 695 696 697 698 ; This code is used for BR and LVM checking 699 ; Rousseau: Because AiR-BOOT v1.0.8 uses the LVM_VolumeName, which is copied 700 ; to the IPT, this compare fails when the LVM_PartitionName is not 701 ; the same as the LVM_VolumeName. In that case, only the LVM_VolumeName 702 ; is updated. If they are the same, both are upated so they are the same 703 ; again after the edit. 704 705 PSCPN_CheckPartName: 701 706 702 707 ; Do no synchronization initially. 703 708 mov byte ptr [SyncLvmLabels],0 704 709 705 ; SI = IPT_Enty, DI points to LVM VolumeName.710 ; SI = IPT_Enty, DI points to LVM VolumeName. 706 711 707 712 ; If the partition is an LVM partition then disable editing completely. … … 709 714 jnz no_type_35h 710 715 711 ; Cannot boot LVM-Data partitions712 pusha713 mov cx, 0C04h714 mov si, offset TXT_SETUP_NoEditType35715 call SETUP_ShowErrorBox716 popa716 ; Cannot boot LVM-Data partitions 717 pusha 718 mov cx, 0C04h 719 mov si, offset TXT_SETUP_NoEditType35 720 call SETUP_ShowErrorBox 721 popa 717 722 718 723 … … 740 745 741 746 742 mov cx, 11 ; Partition-Name-Length = 11 Bytes743 push si744 push di747 mov cx, 11 ; Partition-Name-Length = 11 Bytes 748 push si 749 push di 745 750 add si, LocIPT_Name ; DS:SI -> Partition-Name 746 751 repz cmpsb 747 pop di748 pop si749 jne PSCPN_LetUserEditPartName ; -> No BR/LVM Changing/Saving750 751 mov byte ptr [ChangePartNameSave], 1 ; Remember, so we will save to BR752 753 ; SI = IPT_Enty, DI points to LVM PartitionName.754 PSCPN_LetUserEditPartName:755 ; User will now edit the volume label...756 mov cx, 11757 add si, LocIPT_Name ; DS:SI -> Partition-Name758 call VideoIO_LetUserEditString ; -> does actual editing759 jnc PSCPN_AllDone ; Did user abort ?760 761 test byte ptr [ChangePartNameSave], 1762 jz PSCPN_AllDone ; Actually we just skip BR/LVM-Save763 764 ; Check, where to save 2nd destination to...765 766 ;movzx bx, dl767 mov bl,dl768 mov bh,0769 770 cmp byte ptr [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM771 je PSCPN_SaveBootRecord772 773 774 ; Make DI point to LVM VolumeName in LVM-entry775 ;~ sub di,20752 pop di 753 pop si 754 jne PSCPN_LetUserEditPartName ; -> No BR/LVM Changing/Saving 755 756 mov byte ptr [ChangePartNameSave], 1 ; Remember, so we will save to BR 757 758 ; SI = IPT_Enty, DI points to LVM PartitionName. 759 PSCPN_LetUserEditPartName: 760 ; User will now edit the volume label... 761 mov cx, 11 762 add si, LocIPT_Name ; DS:SI -> Partition-Name 763 call VideoIO_LetUserEditString ; -> does actual editing 764 jnc PSCPN_AllDone ; Did user abort ? 765 766 test byte ptr [ChangePartNameSave], 1 767 jz PSCPN_AllDone ; Actually we just skip BR/LVM-Save 768 769 ; Check, where to save 2nd destination to... 770 771 ;movzx bx, dl 772 mov bl,dl 773 mov bh,0 774 775 cmp byte ptr [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM 776 je PSCPN_SaveBootRecord 777 778 779 ; Make DI point to LVM VolumeName in LVM-entry 780 ;~ sub di,20 776 781 777 782 ; Points to LVM VolumeName. … … 831 836 832 837 LVM_no_sync_labels: 833 834 ; Update LVM-CRC now... 835 mov si, offset LVMSector 836 call LVM_UpdateSectorCRC 837 IFDEF ReleaseCode 838 call DriveIO_SaveLVMSector ; Save sector 839 ENDIF 840 jmp PSCPN_AllDone 841 842 ; -----------------------------------------------------[BOOT-RECORD SAVE]--- 843 PSCPN_SaveBootRecord: 844 ; Copy 11 bytes from IPT to Boot-Record 845 mov cx, 11 846 push si 847 rep movsb ; Copy IPT-name to Boot-Record 848 pop si 849 IFDEF ReleaseCode 850 call DriveIO_SavePartition ; Saves Boot-Record 851 ENDIF 852 853 ; And reset VIBR-CRC, otherwise virus-warning and system-halt 854 sub si, LocIPT_Name ; Now pointer points to base again... 855 call PART_UpdateBootRecordCRC 856 857 PSCPN_AllDone: 858 ; This here is done for safety, because we misused CurPartition_Location 859 xor ax, ax 860 mov di, offset CurPartition_Location 861 mov cx, 4 862 rep stosw ; NUL out CurPartition_Location 863 ret 838 ; Update LVM-CRC now... 839 mov si, offset LVMSector 840 call LVM_UpdateSectorCRC 841 IFDEF ReleaseCode 842 call DriveIO_SaveLVMSector ; Save sector 843 ENDIF 844 jmp PSCPN_AllDone 845 846 ; -----------------------------------------------------[BOOT-RECORD SAVE]--- 847 ; BOOKMARK: Save Boot Record (After change from Setup Menu) 848 PSCPN_SaveBootRecord: 849 ; Copy 11 bytes from IPT to Boot-Record 850 mov cx, 11 851 push si 852 rep movsb ; Copy IPT-name to Boot-Record 853 pop si 854 IFDEF ReleaseCode 855 call DriveIO_SavePartition ; Saves Boot-Record 856 ENDIF 857 858 ; And reset VIBR-CRC, otherwise virus-warning and system-halt 859 ; BOOKMARK: Update CRC on Partition Sector 860 sub si, LocIPT_Name ; Now pointer points to base again... 861 mov bx, offset [PartitionSector] 862 call PART_UpdateBootRecordCRC 863 864 PSCPN_AllDone: 865 ; This here is done for safety, because we misused CurPartition_Location 866 xor ax, ax 867 mov di, offset CurPartition_Location 868 mov cx, 4 869 rep stosw ; NUL out CurPartition_Location 870 ret 864 871 PARTSETUP_ChangePartitionName EndP 865 872 -
trunk/BOOTCODE/VERSION.INC
r51 r52 35 35 36 36 ; The Year, Month and Day in BCD so we can easily extract nibbles. 37 AB_YEAR EQU 201 2h38 AB_MONTH EQU 0 9h39 AB_DAY EQU 09h37 AB_YEAR EQU 2013h 38 AB_MONTH EQU 02h 39 AB_DAY EQU 24h 40 40 41 41 ; The Hours, Minutes and Seconds, again in BCD for easy manipulation. 42 AB_HOURS EQU 09h43 AB_MINUTES EQU 09h44 AB_SECONDS EQU 0 9h42 AB_HOURS EQU 21h 43 AB_MINUTES EQU 16h 44 AB_SECONDS EQU 00h 45 45 46 46 ; The AiR-BOOT signature uses big-endian so we shuffle some bits around.
Note:
See TracChangeset
for help on using the changeset viewer.